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

// ChannelAdminLogEventActionChangeTitle represents TL type `channelAdminLogEventActionChangeTitle#e6dfb825`.
// Channel/supergroup title was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeTitle for reference.
type ChannelAdminLogEventActionChangeTitle struct {
	// Previous title
	PrevValue string
	// New title
	NewValue string
}

// ChannelAdminLogEventActionChangeTitleTypeID is TL type id of ChannelAdminLogEventActionChangeTitle.
const ChannelAdminLogEventActionChangeTitleTypeID = 0xe6dfb825

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeTitle) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeTitle{}
)

func ( *ChannelAdminLogEventActionChangeTitle) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == "") {
		return false
	}
	if !(.NewValue == "") {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeTitle from given interface.
func ( *ChannelAdminLogEventActionChangeTitle) ( interface {
	() ( string)
	() ( string)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeTitle) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeTitle",
		ID:   ChannelAdminLogEventActionChangeTitleTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeTitle) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeTitle#e6dfb825 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeTitleTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeTitle) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeTitle#e6dfb825 as nil")
	}
	.PutString(.PrevValue)
	.PutString(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeTitle) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeTitle#e6dfb825 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeTitle#e6dfb825: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeTitle#e6dfb825: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeTitle) () ( string) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeTitle) () ( string) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeAbout represents TL type `channelAdminLogEventActionChangeAbout#55188a2e`.
// The description was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeAbout for reference.
type ChannelAdminLogEventActionChangeAbout struct {
	// Previous description
	PrevValue string
	// New description
	NewValue string
}

// ChannelAdminLogEventActionChangeAboutTypeID is TL type id of ChannelAdminLogEventActionChangeAbout.
const ChannelAdminLogEventActionChangeAboutTypeID = 0x55188a2e

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeAbout) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeAbout{}
)

func ( *ChannelAdminLogEventActionChangeAbout) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == "") {
		return false
	}
	if !(.NewValue == "") {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeAbout from given interface.
func ( *ChannelAdminLogEventActionChangeAbout) ( interface {
	() ( string)
	() ( string)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeAbout) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeAbout",
		ID:   ChannelAdminLogEventActionChangeAboutTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeAbout#55188a2e as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeAboutTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeAbout#55188a2e as nil")
	}
	.PutString(.PrevValue)
	.PutString(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeAbout) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeAbout#55188a2e to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeAbout#55188a2e: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeAbout#55188a2e: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeAbout) () ( string) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeAbout) () ( string) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeUsername represents TL type `channelAdminLogEventActionChangeUsername#6a4afc38`.
// Channel/supergroup username was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeUsername for reference.
type ChannelAdminLogEventActionChangeUsername struct {
	// Old username
	PrevValue string
	// New username
	NewValue string
}

// ChannelAdminLogEventActionChangeUsernameTypeID is TL type id of ChannelAdminLogEventActionChangeUsername.
const ChannelAdminLogEventActionChangeUsernameTypeID = 0x6a4afc38

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeUsername) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeUsername{}
)

func ( *ChannelAdminLogEventActionChangeUsername) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == "") {
		return false
	}
	if !(.NewValue == "") {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeUsername from given interface.
func ( *ChannelAdminLogEventActionChangeUsername) ( interface {
	() ( string)
	() ( string)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeUsername) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeUsername",
		ID:   ChannelAdminLogEventActionChangeUsernameTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeUsername) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeUsername#6a4afc38 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeUsernameTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeUsername) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeUsername#6a4afc38 as nil")
	}
	.PutString(.PrevValue)
	.PutString(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeUsername) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeUsername#6a4afc38 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsername#6a4afc38: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsername#6a4afc38: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeUsername) () ( string) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeUsername) () ( string) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangePhoto represents TL type `channelAdminLogEventActionChangePhoto#434bd2af`.
// The channel/supergroup's picture was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangePhoto for reference.
type ChannelAdminLogEventActionChangePhoto struct {
	// Previous picture
	PrevPhoto PhotoClass
	// New picture
	NewPhoto PhotoClass
}

// ChannelAdminLogEventActionChangePhotoTypeID is TL type id of ChannelAdminLogEventActionChangePhoto.
const ChannelAdminLogEventActionChangePhotoTypeID = 0x434bd2af

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangePhoto) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangePhoto{}
)

func ( *ChannelAdminLogEventActionChangePhoto) () bool {
	if  == nil {
		return true
	}
	if !(.PrevPhoto == nil) {
		return false
	}
	if !(.NewPhoto == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangePhoto from given interface.
func ( *ChannelAdminLogEventActionChangePhoto) ( interface {
	() ( PhotoClass)
	() ( PhotoClass)
}) {
	.PrevPhoto = .()
	.NewPhoto = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangePhoto) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangePhoto",
		ID:   ChannelAdminLogEventActionChangePhotoTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevPhoto",
			SchemaName: "prev_photo",
		},
		{
			Name:       "NewPhoto",
			SchemaName: "new_photo",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangePhoto#434bd2af as nil")
	}
	.PutID(ChannelAdminLogEventActionChangePhotoTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangePhoto#434bd2af as nil")
	}
	if .PrevPhoto == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo is nil")
	}
	if  := .PrevPhoto.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo: %w", )
	}
	if .NewPhoto == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo is nil")
	}
	if  := .NewPhoto.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangePhoto) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangePhoto#434bd2af to nil")
	}
	{
		,  := DecodePhoto()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo: %w", )
		}
		.PrevPhoto = 
	}
	{
		,  := DecodePhoto()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo: %w", )
		}
		.NewPhoto = 
	}
	return nil
}

// GetPrevPhoto returns value of PrevPhoto field.
func ( *ChannelAdminLogEventActionChangePhoto) () ( PhotoClass) {
	if  == nil {
		return
	}
	return .PrevPhoto
}

// GetNewPhoto returns value of NewPhoto field.
func ( *ChannelAdminLogEventActionChangePhoto) () ( PhotoClass) {
	if  == nil {
		return
	}
	return .NewPhoto
}

// ChannelAdminLogEventActionToggleInvites represents TL type `channelAdminLogEventActionToggleInvites#1b7907ae`.
// Invites were enabled/disabled
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleInvites for reference.
type ChannelAdminLogEventActionToggleInvites struct {
	// New value
	NewValue bool
}

// ChannelAdminLogEventActionToggleInvitesTypeID is TL type id of ChannelAdminLogEventActionToggleInvites.
const ChannelAdminLogEventActionToggleInvitesTypeID = 0x1b7907ae

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleInvites) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleInvites{}
)

func ( *ChannelAdminLogEventActionToggleInvites) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleInvites from given interface.
func ( *ChannelAdminLogEventActionToggleInvites) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleInvites) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleInvites",
		ID:   ChannelAdminLogEventActionToggleInvitesTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleInvites) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleInvites#1b7907ae as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleInvitesTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleInvites) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleInvites#1b7907ae as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleInvites) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleInvites#1b7907ae to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleInvites#1b7907ae: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleInvites) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionToggleSignatures represents TL type `channelAdminLogEventActionToggleSignatures#26ae0971`.
// Channel signatures were enabled/disabled
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleSignatures for reference.
type ChannelAdminLogEventActionToggleSignatures struct {
	// New value
	NewValue bool
}

// ChannelAdminLogEventActionToggleSignaturesTypeID is TL type id of ChannelAdminLogEventActionToggleSignatures.
const ChannelAdminLogEventActionToggleSignaturesTypeID = 0x26ae0971

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleSignatures) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleSignatures{}
)

func ( *ChannelAdminLogEventActionToggleSignatures) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleSignatures from given interface.
func ( *ChannelAdminLogEventActionToggleSignatures) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleSignatures) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleSignatures",
		ID:   ChannelAdminLogEventActionToggleSignaturesTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleSignatures) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleSignatures#26ae0971 as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleSignaturesTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleSignatures) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleSignatures#26ae0971 as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleSignatures) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleSignatures#26ae0971 to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleSignatures#26ae0971: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleSignatures) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionUpdatePinned represents TL type `channelAdminLogEventActionUpdatePinned#e9e82c18`.
// A message was pinned
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionUpdatePinned for reference.
type ChannelAdminLogEventActionUpdatePinned struct {
	// The message that was pinned
	Message MessageClass
}

// ChannelAdminLogEventActionUpdatePinnedTypeID is TL type id of ChannelAdminLogEventActionUpdatePinned.
const ChannelAdminLogEventActionUpdatePinnedTypeID = 0xe9e82c18

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionUpdatePinned) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionUpdatePinned{}
)

func ( *ChannelAdminLogEventActionUpdatePinned) () bool {
	if  == nil {
		return true
	}
	if !(.Message == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionUpdatePinned from given interface.
func ( *ChannelAdminLogEventActionUpdatePinned) ( interface {
	() ( MessageClass)
}) {
	.Message = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionUpdatePinned) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionUpdatePinned",
		ID:   ChannelAdminLogEventActionUpdatePinnedTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Message",
			SchemaName: "message",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionUpdatePinned) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionUpdatePinned#e9e82c18 as nil")
	}
	.PutID(ChannelAdminLogEventActionUpdatePinnedTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionUpdatePinned) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionUpdatePinned#e9e82c18 as nil")
	}
	if .Message == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionUpdatePinned#e9e82c18: field message is nil")
	}
	if  := .Message.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionUpdatePinned#e9e82c18: field message: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionUpdatePinned) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionUpdatePinned#e9e82c18 to nil")
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionUpdatePinned#e9e82c18: field message: %w", )
		}
		.Message = 
	}
	return nil
}

// GetMessage returns value of Message field.
func ( *ChannelAdminLogEventActionUpdatePinned) () ( MessageClass) {
	if  == nil {
		return
	}
	return .Message
}

// ChannelAdminLogEventActionEditMessage represents TL type `channelAdminLogEventActionEditMessage#709b2405`.
// A message was edited
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionEditMessage for reference.
type ChannelAdminLogEventActionEditMessage struct {
	// Old message
	PrevMessage MessageClass
	// New message
	NewMessage MessageClass
}

// ChannelAdminLogEventActionEditMessageTypeID is TL type id of ChannelAdminLogEventActionEditMessage.
const ChannelAdminLogEventActionEditMessageTypeID = 0x709b2405

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionEditMessage) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionEditMessage{}
)

func ( *ChannelAdminLogEventActionEditMessage) () bool {
	if  == nil {
		return true
	}
	if !(.PrevMessage == nil) {
		return false
	}
	if !(.NewMessage == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionEditMessage from given interface.
func ( *ChannelAdminLogEventActionEditMessage) ( interface {
	() ( MessageClass)
	() ( MessageClass)
}) {
	.PrevMessage = .()
	.NewMessage = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionEditMessage) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionEditMessage",
		ID:   ChannelAdminLogEventActionEditMessageTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevMessage",
			SchemaName: "prev_message",
		},
		{
			Name:       "NewMessage",
			SchemaName: "new_message",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionEditMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionEditMessage#709b2405 as nil")
	}
	.PutID(ChannelAdminLogEventActionEditMessageTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionEditMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionEditMessage#709b2405 as nil")
	}
	if .PrevMessage == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditMessage#709b2405: field prev_message is nil")
	}
	if  := .PrevMessage.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditMessage#709b2405: field prev_message: %w", )
	}
	if .NewMessage == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditMessage#709b2405: field new_message is nil")
	}
	if  := .NewMessage.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditMessage#709b2405: field new_message: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionEditMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionEditMessage#709b2405 to nil")
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionEditMessage#709b2405: field prev_message: %w", )
		}
		.PrevMessage = 
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionEditMessage#709b2405: field new_message: %w", )
		}
		.NewMessage = 
	}
	return nil
}

// GetPrevMessage returns value of PrevMessage field.
func ( *ChannelAdminLogEventActionEditMessage) () ( MessageClass) {
	if  == nil {
		return
	}
	return .PrevMessage
}

// GetNewMessage returns value of NewMessage field.
func ( *ChannelAdminLogEventActionEditMessage) () ( MessageClass) {
	if  == nil {
		return
	}
	return .NewMessage
}

// ChannelAdminLogEventActionDeleteMessage represents TL type `channelAdminLogEventActionDeleteMessage#42e047bb`.
// A message was deleted
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionDeleteMessage for reference.
type ChannelAdminLogEventActionDeleteMessage struct {
	// The message that was deleted
	Message MessageClass
}

// ChannelAdminLogEventActionDeleteMessageTypeID is TL type id of ChannelAdminLogEventActionDeleteMessage.
const ChannelAdminLogEventActionDeleteMessageTypeID = 0x42e047bb

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionDeleteMessage) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDeleteMessage{}
)

func ( *ChannelAdminLogEventActionDeleteMessage) () bool {
	if  == nil {
		return true
	}
	if !(.Message == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionDeleteMessage from given interface.
func ( *ChannelAdminLogEventActionDeleteMessage) ( interface {
	() ( MessageClass)
}) {
	.Message = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionDeleteMessage) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionDeleteMessage",
		ID:   ChannelAdminLogEventActionDeleteMessageTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Message",
			SchemaName: "message",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionDeleteMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDeleteMessage#42e047bb as nil")
	}
	.PutID(ChannelAdminLogEventActionDeleteMessageTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionDeleteMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDeleteMessage#42e047bb as nil")
	}
	if .Message == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDeleteMessage#42e047bb: field message is nil")
	}
	if  := .Message.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDeleteMessage#42e047bb: field message: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionDeleteMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionDeleteMessage#42e047bb to nil")
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionDeleteMessage#42e047bb: field message: %w", )
		}
		.Message = 
	}
	return nil
}

// GetMessage returns value of Message field.
func ( *ChannelAdminLogEventActionDeleteMessage) () ( MessageClass) {
	if  == nil {
		return
	}
	return .Message
}

// ChannelAdminLogEventActionParticipantJoin represents TL type `channelAdminLogEventActionParticipantJoin#183040d3`.
// A user has joined the group (in the case of big groups, info of the user that has
// joined isn't shown)
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoin for reference.
type ChannelAdminLogEventActionParticipantJoin struct {
}

// ChannelAdminLogEventActionParticipantJoinTypeID is TL type id of ChannelAdminLogEventActionParticipantJoin.
const ChannelAdminLogEventActionParticipantJoinTypeID = 0x183040d3

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantJoin) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoin{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantJoin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoin#183040d3 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantJoinTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantJoin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoin#183040d3 as nil")
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantJoin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantJoin#183040d3 to nil")
	}
	return nil
}

// ChannelAdminLogEventActionParticipantLeave represents TL type `channelAdminLogEventActionParticipantLeave#f89777f2`.
// A user left the channel/supergroup (in the case of big groups, info of the user that
// has joined isn't shown)
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantLeave for reference.
type ChannelAdminLogEventActionParticipantLeave struct {
}

// ChannelAdminLogEventActionParticipantLeaveTypeID is TL type id of ChannelAdminLogEventActionParticipantLeave.
const ChannelAdminLogEventActionParticipantLeaveTypeID = 0xf89777f2

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantLeave) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantLeave{}
)

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantLeave) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantLeave#f89777f2 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantLeaveTypeID)
	return .EncodeBare()
}

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

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

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

// ChannelAdminLogEventActionParticipantInvite represents TL type `channelAdminLogEventActionParticipantInvite#e31c34d8`.
// A user was invited to the group
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantInvite for reference.
type ChannelAdminLogEventActionParticipantInvite struct {
	// The user that was invited
	Participant ChannelParticipantClass
}

// ChannelAdminLogEventActionParticipantInviteTypeID is TL type id of ChannelAdminLogEventActionParticipantInvite.
const ChannelAdminLogEventActionParticipantInviteTypeID = 0xe31c34d8

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantInvite) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantInvite{}
)

func ( *ChannelAdminLogEventActionParticipantInvite) () bool {
	if  == nil {
		return true
	}
	if !(.Participant == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantInvite from given interface.
func ( *ChannelAdminLogEventActionParticipantInvite) ( interface {
	() ( ChannelParticipantClass)
}) {
	.Participant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantInvite) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantInvite",
		ID:   ChannelAdminLogEventActionParticipantInviteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantInvite#e31c34d8 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantInviteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantInvite#e31c34d8 as nil")
	}
	if .Participant == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant is nil")
	}
	if  := .Participant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantInvite#e31c34d8 to nil")
	}
	{
		,  := DecodeChannelParticipant()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant: %w", )
		}
		.Participant = 
	}
	return nil
}

// GetParticipant returns value of Participant field.
func ( *ChannelAdminLogEventActionParticipantInvite) () ( ChannelParticipantClass) {
	if  == nil {
		return
	}
	return .Participant
}

// ChannelAdminLogEventActionParticipantToggleBan represents TL type `channelAdminLogEventActionParticipantToggleBan#e6d83d7e`.
// The banned rights¹ of a user were changed
//
// Links:
//  1. https://core.telegram.org/api/rights
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan for reference.
type ChannelAdminLogEventActionParticipantToggleBan struct {
	// Old banned rights of user
	PrevParticipant ChannelParticipantClass
	// New banned rights of user
	NewParticipant ChannelParticipantClass
}

// ChannelAdminLogEventActionParticipantToggleBanTypeID is TL type id of ChannelAdminLogEventActionParticipantToggleBan.
const ChannelAdminLogEventActionParticipantToggleBanTypeID = 0xe6d83d7e

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantToggleBan) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantToggleBan{}
)

func ( *ChannelAdminLogEventActionParticipantToggleBan) () bool {
	if  == nil {
		return true
	}
	if !(.PrevParticipant == nil) {
		return false
	}
	if !(.NewParticipant == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantToggleBan from given interface.
func ( *ChannelAdminLogEventActionParticipantToggleBan) ( interface {
	() ( ChannelParticipantClass)
	() ( ChannelParticipantClass)
}) {
	.PrevParticipant = .()
	.NewParticipant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantToggleBan) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantToggleBan",
		ID:   ChannelAdminLogEventActionParticipantToggleBanTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevParticipant",
			SchemaName: "prev_participant",
		},
		{
			Name:       "NewParticipant",
			SchemaName: "new_participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantToggleBan) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantToggleBanTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantToggleBan) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e as nil")
	}
	if .PrevParticipant == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant is nil")
	}
	if  := .PrevParticipant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant: %w", )
	}
	if .NewParticipant == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant is nil")
	}
	if  := .NewParticipant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantToggleBan) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e to nil")
	}
	{
		,  := DecodeChannelParticipant()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant: %w", )
		}
		.PrevParticipant = 
	}
	{
		,  := DecodeChannelParticipant()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant: %w", )
		}
		.NewParticipant = 
	}
	return nil
}

// GetPrevParticipant returns value of PrevParticipant field.
func ( *ChannelAdminLogEventActionParticipantToggleBan) () ( ChannelParticipantClass) {
	if  == nil {
		return
	}
	return .PrevParticipant
}

// GetNewParticipant returns value of NewParticipant field.
func ( *ChannelAdminLogEventActionParticipantToggleBan) () ( ChannelParticipantClass) {
	if  == nil {
		return
	}
	return .NewParticipant
}

// ChannelAdminLogEventActionParticipantToggleAdmin represents TL type `channelAdminLogEventActionParticipantToggleAdmin#d5676710`.
// The admin rights¹ of a user were changed
//
// Links:
//  1. https://core.telegram.org/api/rights
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin for reference.
type ChannelAdminLogEventActionParticipantToggleAdmin struct {
	// Previous admin rights
	PrevParticipant ChannelParticipantClass
	// New admin rights
	NewParticipant ChannelParticipantClass
}

// ChannelAdminLogEventActionParticipantToggleAdminTypeID is TL type id of ChannelAdminLogEventActionParticipantToggleAdmin.
const ChannelAdminLogEventActionParticipantToggleAdminTypeID = 0xd5676710

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantToggleAdmin) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantToggleAdmin{}
)

func ( *ChannelAdminLogEventActionParticipantToggleAdmin) () bool {
	if  == nil {
		return true
	}
	if !(.PrevParticipant == nil) {
		return false
	}
	if !(.NewParticipant == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantToggleAdmin from given interface.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) ( interface {
	() ( ChannelParticipantClass)
	() ( ChannelParticipantClass)
}) {
	.PrevParticipant = .()
	.NewParticipant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantToggleAdmin",
		ID:   ChannelAdminLogEventActionParticipantToggleAdminTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevParticipant",
			SchemaName: "prev_participant",
		},
		{
			Name:       "NewParticipant",
			SchemaName: "new_participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantToggleAdmin#d5676710 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantToggleAdminTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantToggleAdmin#d5676710 as nil")
	}
	if .PrevParticipant == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant is nil")
	}
	if  := .PrevParticipant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant: %w", )
	}
	if .NewParticipant == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant is nil")
	}
	if  := .NewParticipant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantToggleAdmin#d5676710 to nil")
	}
	{
		,  := DecodeChannelParticipant()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant: %w", )
		}
		.PrevParticipant = 
	}
	{
		,  := DecodeChannelParticipant()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant: %w", )
		}
		.NewParticipant = 
	}
	return nil
}

// GetPrevParticipant returns value of PrevParticipant field.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) () ( ChannelParticipantClass) {
	if  == nil {
		return
	}
	return .PrevParticipant
}

// GetNewParticipant returns value of NewParticipant field.
func ( *ChannelAdminLogEventActionParticipantToggleAdmin) () ( ChannelParticipantClass) {
	if  == nil {
		return
	}
	return .NewParticipant
}

// ChannelAdminLogEventActionChangeStickerSet represents TL type `channelAdminLogEventActionChangeStickerSet#b1c3caa7`.
// The supergroup's stickerset was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeStickerSet for reference.
type ChannelAdminLogEventActionChangeStickerSet struct {
	// Previous stickerset
	PrevStickerset InputStickerSetClass
	// New stickerset
	NewStickerset InputStickerSetClass
}

// ChannelAdminLogEventActionChangeStickerSetTypeID is TL type id of ChannelAdminLogEventActionChangeStickerSet.
const ChannelAdminLogEventActionChangeStickerSetTypeID = 0xb1c3caa7

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeStickerSet) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeStickerSet{}
)

func ( *ChannelAdminLogEventActionChangeStickerSet) () bool {
	if  == nil {
		return true
	}
	if !(.PrevStickerset == nil) {
		return false
	}
	if !(.NewStickerset == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeStickerSet from given interface.
func ( *ChannelAdminLogEventActionChangeStickerSet) ( interface {
	() ( InputStickerSetClass)
	() ( InputStickerSetClass)
}) {
	.PrevStickerset = .()
	.NewStickerset = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeStickerSet) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeStickerSet",
		ID:   ChannelAdminLogEventActionChangeStickerSetTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevStickerset",
			SchemaName: "prev_stickerset",
		},
		{
			Name:       "NewStickerset",
			SchemaName: "new_stickerset",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeStickerSet#b1c3caa7 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeStickerSetTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeStickerSet#b1c3caa7 as nil")
	}
	if .PrevStickerset == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset is nil")
	}
	if  := .PrevStickerset.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset: %w", )
	}
	if .NewStickerset == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset is nil")
	}
	if  := .NewStickerset.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeStickerSet) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeStickerSet#b1c3caa7 to nil")
	}
	{
		,  := DecodeInputStickerSet()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset: %w", )
		}
		.PrevStickerset = 
	}
	{
		,  := DecodeInputStickerSet()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset: %w", )
		}
		.NewStickerset = 
	}
	return nil
}

// GetPrevStickerset returns value of PrevStickerset field.
func ( *ChannelAdminLogEventActionChangeStickerSet) () ( InputStickerSetClass) {
	if  == nil {
		return
	}
	return .PrevStickerset
}

// GetNewStickerset returns value of NewStickerset field.
func ( *ChannelAdminLogEventActionChangeStickerSet) () ( InputStickerSetClass) {
	if  == nil {
		return
	}
	return .NewStickerset
}

// ChannelAdminLogEventActionTogglePreHistoryHidden represents TL type `channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1`.
// The hidden prehistory setting was changed¹
//
// Links:
//  1. https://core.telegram.org/method/channels.togglePreHistoryHidden
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionTogglePreHistoryHidden for reference.
type ChannelAdminLogEventActionTogglePreHistoryHidden struct {
	// New value
	NewValue bool
}

// ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID is TL type id of ChannelAdminLogEventActionTogglePreHistoryHidden.
const ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID = 0x5f5c95f1

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionTogglePreHistoryHidden) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionTogglePreHistoryHidden{}
)

func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionTogglePreHistoryHidden from given interface.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionTogglePreHistoryHidden",
		ID:   ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 as nil")
	}
	.PutID(ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionTogglePreHistoryHidden) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionDefaultBannedRights represents TL type `channelAdminLogEventActionDefaultBannedRights#2df5fc0a`.
// The default banned rights were modified
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionDefaultBannedRights for reference.
type ChannelAdminLogEventActionDefaultBannedRights struct {
	// Previous global banned rights¹
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	PrevBannedRights ChatBannedRights
	// New global banned rights¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	NewBannedRights ChatBannedRights
}

// ChannelAdminLogEventActionDefaultBannedRightsTypeID is TL type id of ChannelAdminLogEventActionDefaultBannedRights.
const ChannelAdminLogEventActionDefaultBannedRightsTypeID = 0x2df5fc0a

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionDefaultBannedRights) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDefaultBannedRights{}
)

func ( *ChannelAdminLogEventActionDefaultBannedRights) () bool {
	if  == nil {
		return true
	}
	if !(.PrevBannedRights.Zero()) {
		return false
	}
	if !(.NewBannedRights.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionDefaultBannedRights from given interface.
func ( *ChannelAdminLogEventActionDefaultBannedRights) ( interface {
	() ( ChatBannedRights)
	() ( ChatBannedRights)
}) {
	.PrevBannedRights = .()
	.NewBannedRights = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionDefaultBannedRights) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionDefaultBannedRights",
		ID:   ChannelAdminLogEventActionDefaultBannedRightsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevBannedRights",
			SchemaName: "prev_banned_rights",
		},
		{
			Name:       "NewBannedRights",
			SchemaName: "new_banned_rights",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionDefaultBannedRights) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a as nil")
	}
	.PutID(ChannelAdminLogEventActionDefaultBannedRightsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionDefaultBannedRights) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a as nil")
	}
	if  := .PrevBannedRights.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field prev_banned_rights: %w", )
	}
	if  := .NewBannedRights.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field new_banned_rights: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionDefaultBannedRights) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a to nil")
	}
	{
		if  := .PrevBannedRights.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field prev_banned_rights: %w", )
		}
	}
	{
		if  := .NewBannedRights.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field new_banned_rights: %w", )
		}
	}
	return nil
}

// GetPrevBannedRights returns value of PrevBannedRights field.
func ( *ChannelAdminLogEventActionDefaultBannedRights) () ( ChatBannedRights) {
	if  == nil {
		return
	}
	return .PrevBannedRights
}

// GetNewBannedRights returns value of NewBannedRights field.
func ( *ChannelAdminLogEventActionDefaultBannedRights) () ( ChatBannedRights) {
	if  == nil {
		return
	}
	return .NewBannedRights
}

// ChannelAdminLogEventActionStopPoll represents TL type `channelAdminLogEventActionStopPoll#8f079643`.
// A poll was stopped
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionStopPoll for reference.
type ChannelAdminLogEventActionStopPoll struct {
	// The poll that was stopped
	Message MessageClass
}

// ChannelAdminLogEventActionStopPollTypeID is TL type id of ChannelAdminLogEventActionStopPoll.
const ChannelAdminLogEventActionStopPollTypeID = 0x8f079643

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionStopPoll) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionStopPoll{}
)

func ( *ChannelAdminLogEventActionStopPoll) () bool {
	if  == nil {
		return true
	}
	if !(.Message == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionStopPoll from given interface.
func ( *ChannelAdminLogEventActionStopPoll) ( interface {
	() ( MessageClass)
}) {
	.Message = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionStopPoll) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionStopPoll",
		ID:   ChannelAdminLogEventActionStopPollTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Message",
			SchemaName: "message",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionStopPoll) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionStopPoll#8f079643 as nil")
	}
	.PutID(ChannelAdminLogEventActionStopPollTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionStopPoll) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionStopPoll#8f079643 as nil")
	}
	if .Message == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionStopPoll#8f079643: field message is nil")
	}
	if  := .Message.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionStopPoll#8f079643: field message: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionStopPoll) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionStopPoll#8f079643 to nil")
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionStopPoll#8f079643: field message: %w", )
		}
		.Message = 
	}
	return nil
}

// GetMessage returns value of Message field.
func ( *ChannelAdminLogEventActionStopPoll) () ( MessageClass) {
	if  == nil {
		return
	}
	return .Message
}

// ChannelAdminLogEventActionChangeLinkedChat represents TL type `channelAdminLogEventActionChangeLinkedChat#50c7ac8`.
// The linked chat was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeLinkedChat for reference.
type ChannelAdminLogEventActionChangeLinkedChat struct {
	// Previous linked chat
	PrevValue int64
	// New linked chat
	NewValue int64
}

// ChannelAdminLogEventActionChangeLinkedChatTypeID is TL type id of ChannelAdminLogEventActionChangeLinkedChat.
const ChannelAdminLogEventActionChangeLinkedChatTypeID = 0x50c7ac8

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeLinkedChat) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeLinkedChat{}
)

func ( *ChannelAdminLogEventActionChangeLinkedChat) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == 0) {
		return false
	}
	if !(.NewValue == 0) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeLinkedChat from given interface.
func ( *ChannelAdminLogEventActionChangeLinkedChat) ( interface {
	() ( int64)
	() ( int64)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeLinkedChat) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeLinkedChat",
		ID:   ChannelAdminLogEventActionChangeLinkedChatTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeLinkedChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeLinkedChat#50c7ac8 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeLinkedChatTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeLinkedChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeLinkedChat#50c7ac8 as nil")
	}
	.PutLong(.PrevValue)
	.PutLong(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeLinkedChat) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeLinkedChat#50c7ac8 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeLinkedChat#50c7ac8: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeLinkedChat#50c7ac8: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeLinkedChat) () ( int64) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeLinkedChat) () ( int64) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeLocation represents TL type `channelAdminLogEventActionChangeLocation#e6b76ae`.
// The geogroup location was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeLocation for reference.
type ChannelAdminLogEventActionChangeLocation struct {
	// Previous location
	PrevValue ChannelLocationClass
	// New location
	NewValue ChannelLocationClass
}

// ChannelAdminLogEventActionChangeLocationTypeID is TL type id of ChannelAdminLogEventActionChangeLocation.
const ChannelAdminLogEventActionChangeLocationTypeID = 0xe6b76ae

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeLocation) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeLocation{}
)

func ( *ChannelAdminLogEventActionChangeLocation) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == nil) {
		return false
	}
	if !(.NewValue == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeLocation from given interface.
func ( *ChannelAdminLogEventActionChangeLocation) ( interface {
	() ( ChannelLocationClass)
	() ( ChannelLocationClass)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeLocation) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeLocation",
		ID:   ChannelAdminLogEventActionChangeLocationTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeLocation#e6b76ae as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeLocationTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeLocation#e6b76ae as nil")
	}
	if .PrevValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value is nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value: %w", )
	}
	if .NewValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value is nil")
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeLocation) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeLocation#e6b76ae to nil")
	}
	{
		,  := DecodeChannelLocation()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := DecodeChannelLocation()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeLocation) () ( ChannelLocationClass) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeLocation) () ( ChannelLocationClass) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionToggleSlowMode represents TL type `channelAdminLogEventActionToggleSlowMode#53909779`.
// Slow mode setting for supergroups was changed¹
//
// Links:
//  1. https://core.telegram.org/method/channels.toggleSlowMode
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode for reference.
type ChannelAdminLogEventActionToggleSlowMode struct {
	// Previous slow mode value
	PrevValue int
	// New slow mode value
	NewValue int
}

// ChannelAdminLogEventActionToggleSlowModeTypeID is TL type id of ChannelAdminLogEventActionToggleSlowMode.
const ChannelAdminLogEventActionToggleSlowModeTypeID = 0x53909779

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleSlowMode) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleSlowMode{}
)

func ( *ChannelAdminLogEventActionToggleSlowMode) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == 0) {
		return false
	}
	if !(.NewValue == 0) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleSlowMode from given interface.
func ( *ChannelAdminLogEventActionToggleSlowMode) ( interface {
	() ( int)
	() ( int)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleSlowMode) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleSlowMode",
		ID:   ChannelAdminLogEventActionToggleSlowModeTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleSlowMode) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleSlowMode#53909779 as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleSlowModeTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleSlowMode) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleSlowMode#53909779 as nil")
	}
	.PutInt(.PrevValue)
	.PutInt(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleSlowMode) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleSlowMode#53909779 to nil")
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleSlowMode#53909779: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleSlowMode#53909779: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionToggleSlowMode) () ( int) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleSlowMode) () ( int) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionStartGroupCall represents TL type `channelAdminLogEventActionStartGroupCall#23209745`.
// A group call was started
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionStartGroupCall for reference.
type ChannelAdminLogEventActionStartGroupCall struct {
	// Group call
	Call InputGroupCall
}

// ChannelAdminLogEventActionStartGroupCallTypeID is TL type id of ChannelAdminLogEventActionStartGroupCall.
const ChannelAdminLogEventActionStartGroupCallTypeID = 0x23209745

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionStartGroupCall) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionStartGroupCall{}
)

func ( *ChannelAdminLogEventActionStartGroupCall) () bool {
	if  == nil {
		return true
	}
	if !(.Call.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionStartGroupCall from given interface.
func ( *ChannelAdminLogEventActionStartGroupCall) ( interface {
	() ( InputGroupCall)
}) {
	.Call = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionStartGroupCall) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionStartGroupCall",
		ID:   ChannelAdminLogEventActionStartGroupCallTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Call",
			SchemaName: "call",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionStartGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionStartGroupCall#23209745 as nil")
	}
	.PutID(ChannelAdminLogEventActionStartGroupCallTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionStartGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionStartGroupCall#23209745 as nil")
	}
	if  := .Call.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionStartGroupCall#23209745: field call: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionStartGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionStartGroupCall#23209745 to nil")
	}
	{
		if  := .Call.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionStartGroupCall#23209745: field call: %w", )
		}
	}
	return nil
}

// GetCall returns value of Call field.
func ( *ChannelAdminLogEventActionStartGroupCall) () ( InputGroupCall) {
	if  == nil {
		return
	}
	return .Call
}

// ChannelAdminLogEventActionDiscardGroupCall represents TL type `channelAdminLogEventActionDiscardGroupCall#db9f9140`.
// A group call was terminated
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionDiscardGroupCall for reference.
type ChannelAdminLogEventActionDiscardGroupCall struct {
	// The group call that was terminated
	Call InputGroupCall
}

// ChannelAdminLogEventActionDiscardGroupCallTypeID is TL type id of ChannelAdminLogEventActionDiscardGroupCall.
const ChannelAdminLogEventActionDiscardGroupCallTypeID = 0xdb9f9140

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionDiscardGroupCall) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDiscardGroupCall{}
)

func ( *ChannelAdminLogEventActionDiscardGroupCall) () bool {
	if  == nil {
		return true
	}
	if !(.Call.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionDiscardGroupCall from given interface.
func ( *ChannelAdminLogEventActionDiscardGroupCall) ( interface {
	() ( InputGroupCall)
}) {
	.Call = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionDiscardGroupCall) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionDiscardGroupCall",
		ID:   ChannelAdminLogEventActionDiscardGroupCallTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Call",
			SchemaName: "call",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionDiscardGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDiscardGroupCall#db9f9140 as nil")
	}
	.PutID(ChannelAdminLogEventActionDiscardGroupCallTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionDiscardGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDiscardGroupCall#db9f9140 as nil")
	}
	if  := .Call.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDiscardGroupCall#db9f9140: field call: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionDiscardGroupCall) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionDiscardGroupCall#db9f9140 to nil")
	}
	{
		if  := .Call.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionDiscardGroupCall#db9f9140: field call: %w", )
		}
	}
	return nil
}

// GetCall returns value of Call field.
func ( *ChannelAdminLogEventActionDiscardGroupCall) () ( InputGroupCall) {
	if  == nil {
		return
	}
	return .Call
}

// ChannelAdminLogEventActionParticipantMute represents TL type `channelAdminLogEventActionParticipantMute#f92424d2`.
// A group call participant was muted
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantMute for reference.
type ChannelAdminLogEventActionParticipantMute struct {
	// The participant that was muted
	Participant GroupCallParticipant
}

// ChannelAdminLogEventActionParticipantMuteTypeID is TL type id of ChannelAdminLogEventActionParticipantMute.
const ChannelAdminLogEventActionParticipantMuteTypeID = 0xf92424d2

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantMute) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantMute{}
)

func ( *ChannelAdminLogEventActionParticipantMute) () bool {
	if  == nil {
		return true
	}
	if !(.Participant.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantMute from given interface.
func ( *ChannelAdminLogEventActionParticipantMute) ( interface {
	() ( GroupCallParticipant)
}) {
	.Participant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantMute) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantMute",
		ID:   ChannelAdminLogEventActionParticipantMuteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantMute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantMuteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantMute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil")
	}
	if  := .Participant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantMute#f92424d2: field participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantMute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantMute#f92424d2 to nil")
	}
	{
		if  := .Participant.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantMute#f92424d2: field participant: %w", )
		}
	}
	return nil
}

// GetParticipant returns value of Participant field.
func ( *ChannelAdminLogEventActionParticipantMute) () ( GroupCallParticipant) {
	if  == nil {
		return
	}
	return .Participant
}

// ChannelAdminLogEventActionParticipantUnmute represents TL type `channelAdminLogEventActionParticipantUnmute#e64429c0`.
// A group call participant was unmuted
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantUnmute for reference.
type ChannelAdminLogEventActionParticipantUnmute struct {
	// The participant that was unmuted
	Participant GroupCallParticipant
}

// ChannelAdminLogEventActionParticipantUnmuteTypeID is TL type id of ChannelAdminLogEventActionParticipantUnmute.
const ChannelAdminLogEventActionParticipantUnmuteTypeID = 0xe64429c0

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantUnmute) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantUnmute{}
)

func ( *ChannelAdminLogEventActionParticipantUnmute) () bool {
	if  == nil {
		return true
	}
	if !(.Participant.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantUnmute from given interface.
func ( *ChannelAdminLogEventActionParticipantUnmute) ( interface {
	() ( GroupCallParticipant)
}) {
	.Participant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantUnmute) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantUnmute",
		ID:   ChannelAdminLogEventActionParticipantUnmuteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantUnmute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantUnmute#e64429c0 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantUnmuteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantUnmute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantUnmute#e64429c0 as nil")
	}
	if  := .Participant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantUnmute#e64429c0: field participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantUnmute) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantUnmute#e64429c0 to nil")
	}
	{
		if  := .Participant.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantUnmute#e64429c0: field participant: %w", )
		}
	}
	return nil
}

// GetParticipant returns value of Participant field.
func ( *ChannelAdminLogEventActionParticipantUnmute) () ( GroupCallParticipant) {
	if  == nil {
		return
	}
	return .Participant
}

// ChannelAdminLogEventActionToggleGroupCallSetting represents TL type `channelAdminLogEventActionToggleGroupCallSetting#56d6a247`.
// Group call settings were changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleGroupCallSetting for reference.
type ChannelAdminLogEventActionToggleGroupCallSetting struct {
	// Whether all users are muted by default upon joining
	JoinMuted bool
}

// ChannelAdminLogEventActionToggleGroupCallSettingTypeID is TL type id of ChannelAdminLogEventActionToggleGroupCallSetting.
const ChannelAdminLogEventActionToggleGroupCallSettingTypeID = 0x56d6a247

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleGroupCallSetting) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleGroupCallSetting{}
)

func ( *ChannelAdminLogEventActionToggleGroupCallSetting) () bool {
	if  == nil {
		return true
	}
	if !(.JoinMuted == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleGroupCallSetting from given interface.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) ( interface {
	() ( bool)
}) {
	.JoinMuted = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleGroupCallSetting",
		ID:   ChannelAdminLogEventActionToggleGroupCallSettingTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "JoinMuted",
			SchemaName: "join_muted",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleGroupCallSettingTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 as nil")
	}
	.PutBool(.JoinMuted)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247: field join_muted: %w", )
		}
		.JoinMuted = 
	}
	return nil
}

// GetJoinMuted returns value of JoinMuted field.
func ( *ChannelAdminLogEventActionToggleGroupCallSetting) () ( bool) {
	if  == nil {
		return
	}
	return .JoinMuted
}

// ChannelAdminLogEventActionParticipantJoinByInvite represents TL type `channelAdminLogEventActionParticipantJoinByInvite#fe9fc158`.
// A user joined the supergroup/channel¹ using a specific invite link
//
// Links:
//  1. https://core.telegram.org/api/channel
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoinByInvite for reference.
type ChannelAdminLogEventActionParticipantJoinByInvite struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The participant joined by importing a chat folder deep link »¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/links#chat-folder-links
	ViaChatlist bool
	// The invite link used to join the supergroup/channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Invite ExportedChatInviteClass
}

// ChannelAdminLogEventActionParticipantJoinByInviteTypeID is TL type id of ChannelAdminLogEventActionParticipantJoinByInvite.
const ChannelAdminLogEventActionParticipantJoinByInviteTypeID = 0xfe9fc158

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantJoinByInvite) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoinByInvite{}
)

func ( *ChannelAdminLogEventActionParticipantJoinByInvite) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.ViaChatlist == false) {
		return false
	}
	if !(.Invite == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantJoinByInvite from given interface.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) ( interface {
	() ( bool)
	() ( ExportedChatInviteClass)
}) {
	.ViaChatlist = .()
	.Invite = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantJoinByInvite",
		ID:   ChannelAdminLogEventActionParticipantJoinByInviteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ViaChatlist",
			SchemaName: "via_chatlist",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "Invite",
			SchemaName: "invite",
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) () {
	if !(.ViaChatlist == false) {
		.Flags.Set(0)
	}
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantJoinByInviteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field flags: %w", )
	}
	if .Invite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite is nil")
	}
	if  := .Invite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field flags: %w", )
		}
	}
	.ViaChatlist = .Flags.Has(0)
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite: %w", )
		}
		.Invite = 
	}
	return nil
}

// SetViaChatlist sets value of ViaChatlist conditional field.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) ( bool) {
	if  {
		.Flags.Set(0)
		.ViaChatlist = true
	} else {
		.Flags.Unset(0)
		.ViaChatlist = false
	}
}

// GetViaChatlist returns value of ViaChatlist conditional field.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) () ( bool) {
	if  == nil {
		return
	}
	return .Flags.Has(0)
}

// GetInvite returns value of Invite field.
func ( *ChannelAdminLogEventActionParticipantJoinByInvite) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .Invite
}

// ChannelAdminLogEventActionExportedInviteDelete represents TL type `channelAdminLogEventActionExportedInviteDelete#5a50fca4`.
// A chat invite was deleted
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionExportedInviteDelete for reference.
type ChannelAdminLogEventActionExportedInviteDelete struct {
	// The deleted chat invite
	Invite ExportedChatInviteClass
}

// ChannelAdminLogEventActionExportedInviteDeleteTypeID is TL type id of ChannelAdminLogEventActionExportedInviteDelete.
const ChannelAdminLogEventActionExportedInviteDeleteTypeID = 0x5a50fca4

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionExportedInviteDelete) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteDelete{}
)

func ( *ChannelAdminLogEventActionExportedInviteDelete) () bool {
	if  == nil {
		return true
	}
	if !(.Invite == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionExportedInviteDelete from given interface.
func ( *ChannelAdminLogEventActionExportedInviteDelete) ( interface {
	() ( ExportedChatInviteClass)
}) {
	.Invite = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionExportedInviteDelete) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionExportedInviteDelete",
		ID:   ChannelAdminLogEventActionExportedInviteDeleteTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Invite",
			SchemaName: "invite",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionExportedInviteDelete) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteDelete#5a50fca4 as nil")
	}
	.PutID(ChannelAdminLogEventActionExportedInviteDeleteTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionExportedInviteDelete) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteDelete#5a50fca4 as nil")
	}
	if .Invite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite is nil")
	}
	if  := .Invite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionExportedInviteDelete) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionExportedInviteDelete#5a50fca4 to nil")
	}
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite: %w", )
		}
		.Invite = 
	}
	return nil
}

// GetInvite returns value of Invite field.
func ( *ChannelAdminLogEventActionExportedInviteDelete) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .Invite
}

// ChannelAdminLogEventActionExportedInviteRevoke represents TL type `channelAdminLogEventActionExportedInviteRevoke#410a134e`.
// A specific invite link was revoked
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionExportedInviteRevoke for reference.
type ChannelAdminLogEventActionExportedInviteRevoke struct {
	// The invite link that was revoked
	Invite ExportedChatInviteClass
}

// ChannelAdminLogEventActionExportedInviteRevokeTypeID is TL type id of ChannelAdminLogEventActionExportedInviteRevoke.
const ChannelAdminLogEventActionExportedInviteRevokeTypeID = 0x410a134e

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionExportedInviteRevoke) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteRevoke{}
)

func ( *ChannelAdminLogEventActionExportedInviteRevoke) () bool {
	if  == nil {
		return true
	}
	if !(.Invite == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionExportedInviteRevoke from given interface.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) ( interface {
	() ( ExportedChatInviteClass)
}) {
	.Invite = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionExportedInviteRevoke",
		ID:   ChannelAdminLogEventActionExportedInviteRevokeTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Invite",
			SchemaName: "invite",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteRevoke#410a134e as nil")
	}
	.PutID(ChannelAdminLogEventActionExportedInviteRevokeTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteRevoke#410a134e as nil")
	}
	if .Invite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite is nil")
	}
	if  := .Invite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionExportedInviteRevoke#410a134e to nil")
	}
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite: %w", )
		}
		.Invite = 
	}
	return nil
}

// GetInvite returns value of Invite field.
func ( *ChannelAdminLogEventActionExportedInviteRevoke) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .Invite
}

// ChannelAdminLogEventActionExportedInviteEdit represents TL type `channelAdminLogEventActionExportedInviteEdit#e90ebb59`.
// A chat invite was edited
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionExportedInviteEdit for reference.
type ChannelAdminLogEventActionExportedInviteEdit struct {
	// Previous chat invite information
	PrevInvite ExportedChatInviteClass
	// New chat invite information
	NewInvite ExportedChatInviteClass
}

// ChannelAdminLogEventActionExportedInviteEditTypeID is TL type id of ChannelAdminLogEventActionExportedInviteEdit.
const ChannelAdminLogEventActionExportedInviteEditTypeID = 0xe90ebb59

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionExportedInviteEdit) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteEdit{}
)

func ( *ChannelAdminLogEventActionExportedInviteEdit) () bool {
	if  == nil {
		return true
	}
	if !(.PrevInvite == nil) {
		return false
	}
	if !(.NewInvite == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionExportedInviteEdit from given interface.
func ( *ChannelAdminLogEventActionExportedInviteEdit) ( interface {
	() ( ExportedChatInviteClass)
	() ( ExportedChatInviteClass)
}) {
	.PrevInvite = .()
	.NewInvite = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionExportedInviteEdit) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionExportedInviteEdit",
		ID:   ChannelAdminLogEventActionExportedInviteEditTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevInvite",
			SchemaName: "prev_invite",
		},
		{
			Name:       "NewInvite",
			SchemaName: "new_invite",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionExportedInviteEdit) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteEdit#e90ebb59 as nil")
	}
	.PutID(ChannelAdminLogEventActionExportedInviteEditTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionExportedInviteEdit) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionExportedInviteEdit#e90ebb59 as nil")
	}
	if .PrevInvite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite is nil")
	}
	if  := .PrevInvite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite: %w", )
	}
	if .NewInvite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite is nil")
	}
	if  := .NewInvite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionExportedInviteEdit) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionExportedInviteEdit#e90ebb59 to nil")
	}
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite: %w", )
		}
		.PrevInvite = 
	}
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite: %w", )
		}
		.NewInvite = 
	}
	return nil
}

// GetPrevInvite returns value of PrevInvite field.
func ( *ChannelAdminLogEventActionExportedInviteEdit) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .PrevInvite
}

// GetNewInvite returns value of NewInvite field.
func ( *ChannelAdminLogEventActionExportedInviteEdit) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .NewInvite
}

// ChannelAdminLogEventActionParticipantVolume represents TL type `channelAdminLogEventActionParticipantVolume#3e7f6847`.
// channelAdminLogEvent.user_id has set the volume of participant.peer to participant
// volume
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantVolume for reference.
type ChannelAdminLogEventActionParticipantVolume struct {
	// The participant whose volume was changed
	Participant GroupCallParticipant
}

// ChannelAdminLogEventActionParticipantVolumeTypeID is TL type id of ChannelAdminLogEventActionParticipantVolume.
const ChannelAdminLogEventActionParticipantVolumeTypeID = 0x3e7f6847

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantVolume) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantVolume{}
)

func ( *ChannelAdminLogEventActionParticipantVolume) () bool {
	if  == nil {
		return true
	}
	if !(.Participant.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantVolume from given interface.
func ( *ChannelAdminLogEventActionParticipantVolume) ( interface {
	() ( GroupCallParticipant)
}) {
	.Participant = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantVolume) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantVolume",
		ID:   ChannelAdminLogEventActionParticipantVolumeTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Participant",
			SchemaName: "participant",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantVolume) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantVolume#3e7f6847 as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantVolumeTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantVolume) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantVolume#3e7f6847 as nil")
	}
	if  := .Participant.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantVolume#3e7f6847: field participant: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantVolume) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantVolume#3e7f6847 to nil")
	}
	{
		if  := .Participant.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantVolume#3e7f6847: field participant: %w", )
		}
	}
	return nil
}

// GetParticipant returns value of Participant field.
func ( *ChannelAdminLogEventActionParticipantVolume) () ( GroupCallParticipant) {
	if  == nil {
		return
	}
	return .Participant
}

// ChannelAdminLogEventActionChangeHistoryTTL represents TL type `channelAdminLogEventActionChangeHistoryTTL#6e941a38`.
// The Time-To-Live of messages in this chat was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeHistoryTTL for reference.
type ChannelAdminLogEventActionChangeHistoryTTL struct {
	// Previous value
	PrevValue int
	// New value
	NewValue int
}

// ChannelAdminLogEventActionChangeHistoryTTLTypeID is TL type id of ChannelAdminLogEventActionChangeHistoryTTL.
const ChannelAdminLogEventActionChangeHistoryTTLTypeID = 0x6e941a38

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeHistoryTTL) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeHistoryTTL{}
)

func ( *ChannelAdminLogEventActionChangeHistoryTTL) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == 0) {
		return false
	}
	if !(.NewValue == 0) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeHistoryTTL from given interface.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) ( interface {
	() ( int)
	() ( int)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeHistoryTTL",
		ID:   ChannelAdminLogEventActionChangeHistoryTTLTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeHistoryTTL#6e941a38 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeHistoryTTLTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeHistoryTTL#6e941a38 as nil")
	}
	.PutInt(.PrevValue)
	.PutInt(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeHistoryTTL#6e941a38 to nil")
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeHistoryTTL#6e941a38: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeHistoryTTL#6e941a38: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) () ( int) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeHistoryTTL) () ( int) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionParticipantJoinByRequest represents TL type `channelAdminLogEventActionParticipantJoinByRequest#afb6144a`.
// A new member was accepted to the chat by an admin
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoinByRequest for reference.
type ChannelAdminLogEventActionParticipantJoinByRequest struct {
	// The invite link that was used to join the chat
	Invite ExportedChatInviteClass
	// ID of the admin that approved the invite
	ApprovedBy int64
}

// ChannelAdminLogEventActionParticipantJoinByRequestTypeID is TL type id of ChannelAdminLogEventActionParticipantJoinByRequest.
const ChannelAdminLogEventActionParticipantJoinByRequestTypeID = 0xafb6144a

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionParticipantJoinByRequest) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoinByRequest{}
)

func ( *ChannelAdminLogEventActionParticipantJoinByRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Invite == nil) {
		return false
	}
	if !(.ApprovedBy == 0) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionParticipantJoinByRequest from given interface.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) ( interface {
	() ( ExportedChatInviteClass)
	() ( int64)
}) {
	.Invite = .()
	.ApprovedBy = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionParticipantJoinByRequest",
		ID:   ChannelAdminLogEventActionParticipantJoinByRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Invite",
			SchemaName: "invite",
		},
		{
			Name:       "ApprovedBy",
			SchemaName: "approved_by",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a as nil")
	}
	.PutID(ChannelAdminLogEventActionParticipantJoinByRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a as nil")
	}
	if .Invite == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite is nil")
	}
	if  := .Invite.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite: %w", )
	}
	.PutLong(.ApprovedBy)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a to nil")
	}
	{
		,  := DecodeExportedChatInvite()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite: %w", )
		}
		.Invite = 
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field approved_by: %w", )
		}
		.ApprovedBy = 
	}
	return nil
}

// GetInvite returns value of Invite field.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) () ( ExportedChatInviteClass) {
	if  == nil {
		return
	}
	return .Invite
}

// GetApprovedBy returns value of ApprovedBy field.
func ( *ChannelAdminLogEventActionParticipantJoinByRequest) () ( int64) {
	if  == nil {
		return
	}
	return .ApprovedBy
}

// ChannelAdminLogEventActionToggleNoForwards represents TL type `channelAdminLogEventActionToggleNoForwards#cb2ac766`.
// Forwards were enabled or disabled
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleNoForwards for reference.
type ChannelAdminLogEventActionToggleNoForwards struct {
	// Old value
	NewValue bool
}

// ChannelAdminLogEventActionToggleNoForwardsTypeID is TL type id of ChannelAdminLogEventActionToggleNoForwards.
const ChannelAdminLogEventActionToggleNoForwardsTypeID = 0xcb2ac766

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleNoForwards) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleNoForwards{}
)

func ( *ChannelAdminLogEventActionToggleNoForwards) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleNoForwards from given interface.
func ( *ChannelAdminLogEventActionToggleNoForwards) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleNoForwards) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleNoForwards",
		ID:   ChannelAdminLogEventActionToggleNoForwardsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleNoForwards) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleNoForwards#cb2ac766 as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleNoForwardsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleNoForwards) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleNoForwards#cb2ac766 as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleNoForwards) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleNoForwards#cb2ac766 to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleNoForwards#cb2ac766: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleNoForwards) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionSendMessage represents TL type `channelAdminLogEventActionSendMessage#278f2868`.
// A message was posted in a channel
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionSendMessage for reference.
type ChannelAdminLogEventActionSendMessage struct {
	// The message that was sent
	Message MessageClass
}

// ChannelAdminLogEventActionSendMessageTypeID is TL type id of ChannelAdminLogEventActionSendMessage.
const ChannelAdminLogEventActionSendMessageTypeID = 0x278f2868

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionSendMessage) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionSendMessage{}
)

func ( *ChannelAdminLogEventActionSendMessage) () bool {
	if  == nil {
		return true
	}
	if !(.Message == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionSendMessage from given interface.
func ( *ChannelAdminLogEventActionSendMessage) ( interface {
	() ( MessageClass)
}) {
	.Message = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionSendMessage) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionSendMessage",
		ID:   ChannelAdminLogEventActionSendMessageTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Message",
			SchemaName: "message",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionSendMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionSendMessage#278f2868 as nil")
	}
	.PutID(ChannelAdminLogEventActionSendMessageTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionSendMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionSendMessage#278f2868 as nil")
	}
	if .Message == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionSendMessage#278f2868: field message is nil")
	}
	if  := .Message.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionSendMessage#278f2868: field message: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionSendMessage) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionSendMessage#278f2868 to nil")
	}
	{
		,  := DecodeMessage()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionSendMessage#278f2868: field message: %w", )
		}
		.Message = 
	}
	return nil
}

// GetMessage returns value of Message field.
func ( *ChannelAdminLogEventActionSendMessage) () ( MessageClass) {
	if  == nil {
		return
	}
	return .Message
}

// ChannelAdminLogEventActionChangeAvailableReactions represents TL type `channelAdminLogEventActionChangeAvailableReactions#be4e0ef8`.
// The set of allowed message reactions »¹ for this channel has changed
//
// Links:
//  1. https://core.telegram.org/api/reactions
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeAvailableReactions for reference.
type ChannelAdminLogEventActionChangeAvailableReactions struct {
	// Previously allowed reaction emojis
	PrevValue ChatReactionsClass
	// New allowed reaction emojis
	NewValue ChatReactionsClass
}

// ChannelAdminLogEventActionChangeAvailableReactionsTypeID is TL type id of ChannelAdminLogEventActionChangeAvailableReactions.
const ChannelAdminLogEventActionChangeAvailableReactionsTypeID = 0xbe4e0ef8

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeAvailableReactions) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeAvailableReactions{}
)

func ( *ChannelAdminLogEventActionChangeAvailableReactions) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == nil) {
		return false
	}
	if !(.NewValue == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeAvailableReactions from given interface.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) ( interface {
	() ( ChatReactionsClass)
	() ( ChatReactionsClass)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeAvailableReactions",
		ID:   ChannelAdminLogEventActionChangeAvailableReactionsTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeAvailableReactionsTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 as nil")
	}
	if .PrevValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value is nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value: %w", )
	}
	if .NewValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value is nil")
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 to nil")
	}
	{
		,  := DecodeChatReactions()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := DecodeChatReactions()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) () ( ChatReactionsClass) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeAvailableReactions) () ( ChatReactionsClass) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeUsernames represents TL type `channelAdminLogEventActionChangeUsernames#f04fb3a9`.
// The list of usernames associated with the channel was changed
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeUsernames for reference.
type ChannelAdminLogEventActionChangeUsernames struct {
	// Previous set of usernames
	PrevValue []string
	// New set of usernames
	NewValue []string
}

// ChannelAdminLogEventActionChangeUsernamesTypeID is TL type id of ChannelAdminLogEventActionChangeUsernames.
const ChannelAdminLogEventActionChangeUsernamesTypeID = 0xf04fb3a9

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeUsernames) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeUsernames{}
)

func ( *ChannelAdminLogEventActionChangeUsernames) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == nil) {
		return false
	}
	if !(.NewValue == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeUsernames from given interface.
func ( *ChannelAdminLogEventActionChangeUsernames) ( interface {
	() ( []string)
	() ( []string)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeUsernames) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeUsernames",
		ID:   ChannelAdminLogEventActionChangeUsernamesTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeUsernames) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeUsernames#f04fb3a9 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeUsernamesTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeUsernames) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeUsernames#f04fb3a9 as nil")
	}
	.PutVectorHeader(len(.PrevValue))
	for ,  := range .PrevValue {
		.PutString()
	}
	.PutVectorHeader(len(.NewValue))
	for ,  := range .NewValue {
		.PutString()
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeUsernames) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeUsernames#f04fb3a9 to nil")
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field prev_value: %w", )
		}

		if  > 0 {
			.PrevValue = make([]string, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .String()
			if  != nil {
				return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field prev_value: %w", )
			}
			.PrevValue = append(.PrevValue, )
		}
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field new_value: %w", )
		}

		if  > 0 {
			.NewValue = make([]string, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .String()
			if  != nil {
				return fmt.Errorf("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field new_value: %w", )
			}
			.NewValue = append(.NewValue, )
		}
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeUsernames) () ( []string) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeUsernames) () ( []string) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionToggleForum represents TL type `channelAdminLogEventActionToggleForum#2cc6383`.
// Forum¹ functionality was enabled or disabled.
//
// Links:
//  1. https://core.telegram.org/api/forum
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleForum for reference.
type ChannelAdminLogEventActionToggleForum struct {
	// Whether forum¹ functionality was enabled or disabled.
	//
	// Links:
	//  1) https://core.telegram.org/api/forum
	NewValue bool
}

// ChannelAdminLogEventActionToggleForumTypeID is TL type id of ChannelAdminLogEventActionToggleForum.
const ChannelAdminLogEventActionToggleForumTypeID = 0x2cc6383

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleForum) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleForum{}
)

func ( *ChannelAdminLogEventActionToggleForum) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleForum from given interface.
func ( *ChannelAdminLogEventActionToggleForum) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleForum) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleForum",
		ID:   ChannelAdminLogEventActionToggleForumTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleForum) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleForum#2cc6383 as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleForumTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleForum) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleForum#2cc6383 as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleForum) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleForum#2cc6383 to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleForum#2cc6383: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleForum) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionCreateTopic represents TL type `channelAdminLogEventActionCreateTopic#58707d28`.
// A forum topic¹ was created
//
// Links:
//  1. https://core.telegram.org/api/forum#forum-topics
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionCreateTopic for reference.
type ChannelAdminLogEventActionCreateTopic struct {
	// The forum topic¹ that was created
	//
	// Links:
	//  1) https://core.telegram.org/api/forum#forum-topics
	Topic ForumTopicClass
}

// ChannelAdminLogEventActionCreateTopicTypeID is TL type id of ChannelAdminLogEventActionCreateTopic.
const ChannelAdminLogEventActionCreateTopicTypeID = 0x58707d28

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionCreateTopic) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionCreateTopic{}
)

func ( *ChannelAdminLogEventActionCreateTopic) () bool {
	if  == nil {
		return true
	}
	if !(.Topic == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionCreateTopic from given interface.
func ( *ChannelAdminLogEventActionCreateTopic) ( interface {
	() ( ForumTopicClass)
}) {
	.Topic = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionCreateTopic) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionCreateTopic",
		ID:   ChannelAdminLogEventActionCreateTopicTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Topic",
			SchemaName: "topic",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionCreateTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionCreateTopic#58707d28 as nil")
	}
	.PutID(ChannelAdminLogEventActionCreateTopicTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionCreateTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionCreateTopic#58707d28 as nil")
	}
	if .Topic == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionCreateTopic#58707d28: field topic is nil")
	}
	if  := .Topic.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionCreateTopic#58707d28: field topic: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionCreateTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionCreateTopic#58707d28 to nil")
	}
	{
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionCreateTopic#58707d28: field topic: %w", )
		}
		.Topic = 
	}
	return nil
}

// GetTopic returns value of Topic field.
func ( *ChannelAdminLogEventActionCreateTopic) () ( ForumTopicClass) {
	if  == nil {
		return
	}
	return .Topic
}

// ChannelAdminLogEventActionEditTopic represents TL type `channelAdminLogEventActionEditTopic#f06fe208`.
// A forum topic¹ was edited
//
// Links:
//  1. https://core.telegram.org/api/forum#forum-topics
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionEditTopic for reference.
type ChannelAdminLogEventActionEditTopic struct {
	// Previous topic information
	PrevTopic ForumTopicClass
	// New topic information
	NewTopic ForumTopicClass
}

// ChannelAdminLogEventActionEditTopicTypeID is TL type id of ChannelAdminLogEventActionEditTopic.
const ChannelAdminLogEventActionEditTopicTypeID = 0xf06fe208

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionEditTopic) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionEditTopic{}
)

func ( *ChannelAdminLogEventActionEditTopic) () bool {
	if  == nil {
		return true
	}
	if !(.PrevTopic == nil) {
		return false
	}
	if !(.NewTopic == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionEditTopic from given interface.
func ( *ChannelAdminLogEventActionEditTopic) ( interface {
	() ( ForumTopicClass)
	() ( ForumTopicClass)
}) {
	.PrevTopic = .()
	.NewTopic = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionEditTopic) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionEditTopic",
		ID:   ChannelAdminLogEventActionEditTopicTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevTopic",
			SchemaName: "prev_topic",
		},
		{
			Name:       "NewTopic",
			SchemaName: "new_topic",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionEditTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionEditTopic#f06fe208 as nil")
	}
	.PutID(ChannelAdminLogEventActionEditTopicTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionEditTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionEditTopic#f06fe208 as nil")
	}
	if .PrevTopic == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic is nil")
	}
	if  := .PrevTopic.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic: %w", )
	}
	if .NewTopic == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field new_topic is nil")
	}
	if  := .NewTopic.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field new_topic: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionEditTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionEditTopic#f06fe208 to nil")
	}
	{
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic: %w", )
		}
		.PrevTopic = 
	}
	{
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionEditTopic#f06fe208: field new_topic: %w", )
		}
		.NewTopic = 
	}
	return nil
}

// GetPrevTopic returns value of PrevTopic field.
func ( *ChannelAdminLogEventActionEditTopic) () ( ForumTopicClass) {
	if  == nil {
		return
	}
	return .PrevTopic
}

// GetNewTopic returns value of NewTopic field.
func ( *ChannelAdminLogEventActionEditTopic) () ( ForumTopicClass) {
	if  == nil {
		return
	}
	return .NewTopic
}

// ChannelAdminLogEventActionDeleteTopic represents TL type `channelAdminLogEventActionDeleteTopic#ae168909`.
// A forum topic¹ was deleted
//
// Links:
//  1. https://core.telegram.org/api/forum#forum-topics
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionDeleteTopic for reference.
type ChannelAdminLogEventActionDeleteTopic struct {
	// The forum topic¹ that was deleted
	//
	// Links:
	//  1) https://core.telegram.org/api/forum#forum-topics
	Topic ForumTopicClass
}

// ChannelAdminLogEventActionDeleteTopicTypeID is TL type id of ChannelAdminLogEventActionDeleteTopic.
const ChannelAdminLogEventActionDeleteTopicTypeID = 0xae168909

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionDeleteTopic) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDeleteTopic{}
)

func ( *ChannelAdminLogEventActionDeleteTopic) () bool {
	if  == nil {
		return true
	}
	if !(.Topic == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionDeleteTopic from given interface.
func ( *ChannelAdminLogEventActionDeleteTopic) ( interface {
	() ( ForumTopicClass)
}) {
	.Topic = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionDeleteTopic) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionDeleteTopic",
		ID:   ChannelAdminLogEventActionDeleteTopicTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Topic",
			SchemaName: "topic",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionDeleteTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDeleteTopic#ae168909 as nil")
	}
	.PutID(ChannelAdminLogEventActionDeleteTopicTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionDeleteTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionDeleteTopic#ae168909 as nil")
	}
	if .Topic == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDeleteTopic#ae168909: field topic is nil")
	}
	if  := .Topic.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionDeleteTopic#ae168909: field topic: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionDeleteTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionDeleteTopic#ae168909 to nil")
	}
	{
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionDeleteTopic#ae168909: field topic: %w", )
		}
		.Topic = 
	}
	return nil
}

// GetTopic returns value of Topic field.
func ( *ChannelAdminLogEventActionDeleteTopic) () ( ForumTopicClass) {
	if  == nil {
		return
	}
	return .Topic
}

// ChannelAdminLogEventActionPinTopic represents TL type `channelAdminLogEventActionPinTopic#5d8d353b`.
// A forum topic¹ was pinned or unpinned
//
// Links:
//  1. https://core.telegram.org/api/forum#forum-topics
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionPinTopic for reference.
type ChannelAdminLogEventActionPinTopic struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Previous topic information
	//
	// Use SetPrevTopic and GetPrevTopic helpers.
	PrevTopic ForumTopicClass
	// New topic information
	//
	// Use SetNewTopic and GetNewTopic helpers.
	NewTopic ForumTopicClass
}

// ChannelAdminLogEventActionPinTopicTypeID is TL type id of ChannelAdminLogEventActionPinTopic.
const ChannelAdminLogEventActionPinTopicTypeID = 0x5d8d353b

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionPinTopic) () ChannelAdminLogEventActionClass { return & }

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionPinTopic{}
)

func ( *ChannelAdminLogEventActionPinTopic) () bool {
	if  == nil {
		return true
	}
	if !(.Flags.Zero()) {
		return false
	}
	if !(.PrevTopic == nil) {
		return false
	}
	if !(.NewTopic == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionPinTopic from given interface.
func ( *ChannelAdminLogEventActionPinTopic) ( interface {
	() ( ForumTopicClass,  bool)
	() ( ForumTopicClass,  bool)
}) {
	if ,  := .();  {
		.PrevTopic = 
	}

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

}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionPinTopic) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionPinTopic",
		ID:   ChannelAdminLogEventActionPinTopicTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevTopic",
			SchemaName: "prev_topic",
			Null:       !.Flags.Has(0),
		},
		{
			Name:       "NewTopic",
			SchemaName: "new_topic",
			Null:       !.Flags.Has(1),
		},
	}
	return 
}

// SetFlags sets flags for non-zero fields.
func ( *ChannelAdminLogEventActionPinTopic) () {
	if !(.PrevTopic == nil) {
		.Flags.Set(0)
	}
	if !(.NewTopic == nil) {
		.Flags.Set(1)
	}
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionPinTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionPinTopic#5d8d353b as nil")
	}
	.PutID(ChannelAdminLogEventActionPinTopicTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionPinTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionPinTopic#5d8d353b as nil")
	}
	.SetFlags()
	if  := .Flags.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field flags: %w", )
	}
	if .Flags.Has(0) {
		if .PrevTopic == nil {
			return fmt.Errorf("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic is nil")
		}
		if  := .PrevTopic.Encode();  != nil {
			return fmt.Errorf("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic: %w", )
		}
	}
	if .Flags.Has(1) {
		if .NewTopic == nil {
			return fmt.Errorf("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic is nil")
		}
		if  := .NewTopic.Encode();  != nil {
			return fmt.Errorf("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic: %w", )
		}
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionPinTopic) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionPinTopic#5d8d353b to nil")
	}
	{
		if  := .Flags.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field flags: %w", )
		}
	}
	if .Flags.Has(0) {
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic: %w", )
		}
		.PrevTopic = 
	}
	if .Flags.Has(1) {
		,  := DecodeForumTopic()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic: %w", )
		}
		.NewTopic = 
	}
	return nil
}

// SetPrevTopic sets value of PrevTopic conditional field.
func ( *ChannelAdminLogEventActionPinTopic) ( ForumTopicClass) {
	.Flags.Set(0)
	.PrevTopic = 
}

// GetPrevTopic returns value of PrevTopic conditional field and
// boolean which is true if field was set.
func ( *ChannelAdminLogEventActionPinTopic) () ( ForumTopicClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(0) {
		return , false
	}
	return .PrevTopic, true
}

// SetNewTopic sets value of NewTopic conditional field.
func ( *ChannelAdminLogEventActionPinTopic) ( ForumTopicClass) {
	.Flags.Set(1)
	.NewTopic = 
}

// GetNewTopic returns value of NewTopic conditional field and
// boolean which is true if field was set.
func ( *ChannelAdminLogEventActionPinTopic) () ( ForumTopicClass,  bool) {
	if  == nil {
		return
	}
	if !.Flags.Has(1) {
		return , false
	}
	return .NewTopic, true
}

// ChannelAdminLogEventActionToggleAntiSpam represents TL type `channelAdminLogEventActionToggleAntiSpam#64f36dfc`.
// Native antispam¹ functionality was enabled or disabled.
//
// Links:
//  1. https://core.telegram.org/api/antispam
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionToggleAntiSpam for reference.
type ChannelAdminLogEventActionToggleAntiSpam struct {
	// Whether antispam functionality was enabled or disabled.
	NewValue bool
}

// ChannelAdminLogEventActionToggleAntiSpamTypeID is TL type id of ChannelAdminLogEventActionToggleAntiSpam.
const ChannelAdminLogEventActionToggleAntiSpamTypeID = 0x64f36dfc

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionToggleAntiSpam) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleAntiSpam{}
)

func ( *ChannelAdminLogEventActionToggleAntiSpam) () bool {
	if  == nil {
		return true
	}
	if !(.NewValue == false) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionToggleAntiSpam from given interface.
func ( *ChannelAdminLogEventActionToggleAntiSpam) ( interface {
	() ( bool)
}) {
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionToggleAntiSpam) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionToggleAntiSpam",
		ID:   ChannelAdminLogEventActionToggleAntiSpamTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionToggleAntiSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleAntiSpam#64f36dfc as nil")
	}
	.PutID(ChannelAdminLogEventActionToggleAntiSpamTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionToggleAntiSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionToggleAntiSpam#64f36dfc as nil")
	}
	.PutBool(.NewValue)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionToggleAntiSpam) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionToggleAntiSpam#64f36dfc to nil")
	}
	{
		,  := .Bool()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionToggleAntiSpam#64f36dfc: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionToggleAntiSpam) () ( bool) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangePeerColor represents TL type `channelAdminLogEventActionChangePeerColor#5796e780`.
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangePeerColor for reference.
type ChannelAdminLogEventActionChangePeerColor struct {
	// PrevValue field of ChannelAdminLogEventActionChangePeerColor.
	PrevValue PeerColor
	// NewValue field of ChannelAdminLogEventActionChangePeerColor.
	NewValue PeerColor
}

// ChannelAdminLogEventActionChangePeerColorTypeID is TL type id of ChannelAdminLogEventActionChangePeerColor.
const ChannelAdminLogEventActionChangePeerColorTypeID = 0x5796e780

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangePeerColor) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangePeerColor{}
)

func ( *ChannelAdminLogEventActionChangePeerColor) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue.Zero()) {
		return false
	}
	if !(.NewValue.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangePeerColor from given interface.
func ( *ChannelAdminLogEventActionChangePeerColor) ( interface {
	() ( PeerColor)
	() ( PeerColor)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangePeerColor) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangePeerColor",
		ID:   ChannelAdminLogEventActionChangePeerColorTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangePeerColor#5796e780 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangePeerColorTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangePeerColor#5796e780 as nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePeerColor#5796e780: field prev_value: %w", )
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangePeerColor#5796e780: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangePeerColor#5796e780 to nil")
	}
	{
		if  := .PrevValue.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangePeerColor#5796e780: field prev_value: %w", )
		}
	}
	{
		if  := .NewValue.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangePeerColor#5796e780: field new_value: %w", )
		}
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangePeerColor) () ( PeerColor) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangePeerColor) () ( PeerColor) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeProfilePeerColor represents TL type `channelAdminLogEventActionChangeProfilePeerColor#5e477b25`.
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeProfilePeerColor for reference.
type ChannelAdminLogEventActionChangeProfilePeerColor struct {
	// PrevValue field of ChannelAdminLogEventActionChangeProfilePeerColor.
	PrevValue PeerColor
	// NewValue field of ChannelAdminLogEventActionChangeProfilePeerColor.
	NewValue PeerColor
}

// ChannelAdminLogEventActionChangeProfilePeerColorTypeID is TL type id of ChannelAdminLogEventActionChangeProfilePeerColor.
const ChannelAdminLogEventActionChangeProfilePeerColorTypeID = 0x5e477b25

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeProfilePeerColor) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeProfilePeerColor{}
)

func ( *ChannelAdminLogEventActionChangeProfilePeerColor) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue.Zero()) {
		return false
	}
	if !(.NewValue.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeProfilePeerColor from given interface.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) ( interface {
	() ( PeerColor)
	() ( PeerColor)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeProfilePeerColor",
		ID:   ChannelAdminLogEventActionChangeProfilePeerColorTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeProfilePeerColorTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 as nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field prev_value: %w", )
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 to nil")
	}
	{
		if  := .PrevValue.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field prev_value: %w", )
		}
	}
	{
		if  := .NewValue.Decode();  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field new_value: %w", )
		}
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) () ( PeerColor) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeProfilePeerColor) () ( PeerColor) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeWallpaper represents TL type `channelAdminLogEventActionChangeWallpaper#31bb5d52`.
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeWallpaper for reference.
type ChannelAdminLogEventActionChangeWallpaper struct {
	// PrevValue field of ChannelAdminLogEventActionChangeWallpaper.
	PrevValue WallPaperClass
	// NewValue field of ChannelAdminLogEventActionChangeWallpaper.
	NewValue WallPaperClass
}

// ChannelAdminLogEventActionChangeWallpaperTypeID is TL type id of ChannelAdminLogEventActionChangeWallpaper.
const ChannelAdminLogEventActionChangeWallpaperTypeID = 0x31bb5d52

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeWallpaper) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeWallpaper{}
)

func ( *ChannelAdminLogEventActionChangeWallpaper) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == nil) {
		return false
	}
	if !(.NewValue == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeWallpaper from given interface.
func ( *ChannelAdminLogEventActionChangeWallpaper) ( interface {
	() ( WallPaperClass)
	() ( WallPaperClass)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeWallpaper) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeWallpaper",
		ID:   ChannelAdminLogEventActionChangeWallpaperTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeWallpaper) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeWallpaper#31bb5d52 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeWallpaperTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeWallpaper) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeWallpaper#31bb5d52 as nil")
	}
	if .PrevValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value is nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value: %w", )
	}
	if .NewValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value is nil")
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeWallpaper) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeWallpaper#31bb5d52 to nil")
	}
	{
		,  := DecodeWallPaper()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := DecodeWallPaper()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeWallpaper) () ( WallPaperClass) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeWallpaper) () ( WallPaperClass) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionChangeEmojiStatus represents TL type `channelAdminLogEventActionChangeEmojiStatus#3ea9feb1`.
//
// See https://core.telegram.org/constructor/channelAdminLogEventActionChangeEmojiStatus for reference.
type ChannelAdminLogEventActionChangeEmojiStatus struct {
	// PrevValue field of ChannelAdminLogEventActionChangeEmojiStatus.
	PrevValue EmojiStatusClass
	// NewValue field of ChannelAdminLogEventActionChangeEmojiStatus.
	NewValue EmojiStatusClass
}

// ChannelAdminLogEventActionChangeEmojiStatusTypeID is TL type id of ChannelAdminLogEventActionChangeEmojiStatus.
const ChannelAdminLogEventActionChangeEmojiStatusTypeID = 0x3ea9feb1

// construct implements constructor of ChannelAdminLogEventActionClass.
func ( ChannelAdminLogEventActionChangeEmojiStatus) () ChannelAdminLogEventActionClass {
	return &
}

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

	_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeEmojiStatus{}
)

func ( *ChannelAdminLogEventActionChangeEmojiStatus) () bool {
	if  == nil {
		return true
	}
	if !(.PrevValue == nil) {
		return false
	}
	if !(.NewValue == nil) {
		return false
	}

	return true
}

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

// FillFrom fills ChannelAdminLogEventActionChangeEmojiStatus from given interface.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) ( interface {
	() ( EmojiStatusClass)
	() ( EmojiStatusClass)
}) {
	.PrevValue = .()
	.NewValue = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) () tdp.Type {
	 := tdp.Type{
		Name: "channelAdminLogEventActionChangeEmojiStatus",
		ID:   ChannelAdminLogEventActionChangeEmojiStatusTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "PrevValue",
			SchemaName: "prev_value",
		},
		{
			Name:       "NewValue",
			SchemaName: "new_value",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 as nil")
	}
	.PutID(ChannelAdminLogEventActionChangeEmojiStatusTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 as nil")
	}
	if .PrevValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value is nil")
	}
	if  := .PrevValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value: %w", )
	}
	if .NewValue == nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value is nil")
	}
	if  := .NewValue.Encode();  != nil {
		return fmt.Errorf("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value: %w", )
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 to nil")
	}
	{
		,  := DecodeEmojiStatus()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value: %w", )
		}
		.PrevValue = 
	}
	{
		,  := DecodeEmojiStatus()
		if  != nil {
			return fmt.Errorf("unable to decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value: %w", )
		}
		.NewValue = 
	}
	return nil
}

// GetPrevValue returns value of PrevValue field.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) () ( EmojiStatusClass) {
	if  == nil {
		return
	}
	return .PrevValue
}

// GetNewValue returns value of NewValue field.
func ( *ChannelAdminLogEventActionChangeEmojiStatus) () ( EmojiStatusClass) {
	if  == nil {
		return
	}
	return .NewValue
}

// ChannelAdminLogEventActionClassName is schema name of ChannelAdminLogEventActionClass.
const ChannelAdminLogEventActionClassName = "ChannelAdminLogEventAction"

// ChannelAdminLogEventActionClass represents ChannelAdminLogEventAction generic type.
//
// See https://core.telegram.org/type/ChannelAdminLogEventAction for reference.
//
// Example:
//
//	g, err := tg.DecodeChannelAdminLogEventAction(buf)
//	if err != nil {
//	    panic(err)
//	}
//	switch v := g.(type) {
//	case *tg.ChannelAdminLogEventActionChangeTitle: // channelAdminLogEventActionChangeTitle#e6dfb825
//	case *tg.ChannelAdminLogEventActionChangeAbout: // channelAdminLogEventActionChangeAbout#55188a2e
//	case *tg.ChannelAdminLogEventActionChangeUsername: // channelAdminLogEventActionChangeUsername#6a4afc38
//	case *tg.ChannelAdminLogEventActionChangePhoto: // channelAdminLogEventActionChangePhoto#434bd2af
//	case *tg.ChannelAdminLogEventActionToggleInvites: // channelAdminLogEventActionToggleInvites#1b7907ae
//	case *tg.ChannelAdminLogEventActionToggleSignatures: // channelAdminLogEventActionToggleSignatures#26ae0971
//	case *tg.ChannelAdminLogEventActionUpdatePinned: // channelAdminLogEventActionUpdatePinned#e9e82c18
//	case *tg.ChannelAdminLogEventActionEditMessage: // channelAdminLogEventActionEditMessage#709b2405
//	case *tg.ChannelAdminLogEventActionDeleteMessage: // channelAdminLogEventActionDeleteMessage#42e047bb
//	case *tg.ChannelAdminLogEventActionParticipantJoin: // channelAdminLogEventActionParticipantJoin#183040d3
//	case *tg.ChannelAdminLogEventActionParticipantLeave: // channelAdminLogEventActionParticipantLeave#f89777f2
//	case *tg.ChannelAdminLogEventActionParticipantInvite: // channelAdminLogEventActionParticipantInvite#e31c34d8
//	case *tg.ChannelAdminLogEventActionParticipantToggleBan: // channelAdminLogEventActionParticipantToggleBan#e6d83d7e
//	case *tg.ChannelAdminLogEventActionParticipantToggleAdmin: // channelAdminLogEventActionParticipantToggleAdmin#d5676710
//	case *tg.ChannelAdminLogEventActionChangeStickerSet: // channelAdminLogEventActionChangeStickerSet#b1c3caa7
//	case *tg.ChannelAdminLogEventActionTogglePreHistoryHidden: // channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1
//	case *tg.ChannelAdminLogEventActionDefaultBannedRights: // channelAdminLogEventActionDefaultBannedRights#2df5fc0a
//	case *tg.ChannelAdminLogEventActionStopPoll: // channelAdminLogEventActionStopPoll#8f079643
//	case *tg.ChannelAdminLogEventActionChangeLinkedChat: // channelAdminLogEventActionChangeLinkedChat#50c7ac8
//	case *tg.ChannelAdminLogEventActionChangeLocation: // channelAdminLogEventActionChangeLocation#e6b76ae
//	case *tg.ChannelAdminLogEventActionToggleSlowMode: // channelAdminLogEventActionToggleSlowMode#53909779
//	case *tg.ChannelAdminLogEventActionStartGroupCall: // channelAdminLogEventActionStartGroupCall#23209745
//	case *tg.ChannelAdminLogEventActionDiscardGroupCall: // channelAdminLogEventActionDiscardGroupCall#db9f9140
//	case *tg.ChannelAdminLogEventActionParticipantMute: // channelAdminLogEventActionParticipantMute#f92424d2
//	case *tg.ChannelAdminLogEventActionParticipantUnmute: // channelAdminLogEventActionParticipantUnmute#e64429c0
//	case *tg.ChannelAdminLogEventActionToggleGroupCallSetting: // channelAdminLogEventActionToggleGroupCallSetting#56d6a247
//	case *tg.ChannelAdminLogEventActionParticipantJoinByInvite: // channelAdminLogEventActionParticipantJoinByInvite#fe9fc158
//	case *tg.ChannelAdminLogEventActionExportedInviteDelete: // channelAdminLogEventActionExportedInviteDelete#5a50fca4
//	case *tg.ChannelAdminLogEventActionExportedInviteRevoke: // channelAdminLogEventActionExportedInviteRevoke#410a134e
//	case *tg.ChannelAdminLogEventActionExportedInviteEdit: // channelAdminLogEventActionExportedInviteEdit#e90ebb59
//	case *tg.ChannelAdminLogEventActionParticipantVolume: // channelAdminLogEventActionParticipantVolume#3e7f6847
//	case *tg.ChannelAdminLogEventActionChangeHistoryTTL: // channelAdminLogEventActionChangeHistoryTTL#6e941a38
//	case *tg.ChannelAdminLogEventActionParticipantJoinByRequest: // channelAdminLogEventActionParticipantJoinByRequest#afb6144a
//	case *tg.ChannelAdminLogEventActionToggleNoForwards: // channelAdminLogEventActionToggleNoForwards#cb2ac766
//	case *tg.ChannelAdminLogEventActionSendMessage: // channelAdminLogEventActionSendMessage#278f2868
//	case *tg.ChannelAdminLogEventActionChangeAvailableReactions: // channelAdminLogEventActionChangeAvailableReactions#be4e0ef8
//	case *tg.ChannelAdminLogEventActionChangeUsernames: // channelAdminLogEventActionChangeUsernames#f04fb3a9
//	case *tg.ChannelAdminLogEventActionToggleForum: // channelAdminLogEventActionToggleForum#2cc6383
//	case *tg.ChannelAdminLogEventActionCreateTopic: // channelAdminLogEventActionCreateTopic#58707d28
//	case *tg.ChannelAdminLogEventActionEditTopic: // channelAdminLogEventActionEditTopic#f06fe208
//	case *tg.ChannelAdminLogEventActionDeleteTopic: // channelAdminLogEventActionDeleteTopic#ae168909
//	case *tg.ChannelAdminLogEventActionPinTopic: // channelAdminLogEventActionPinTopic#5d8d353b
//	case *tg.ChannelAdminLogEventActionToggleAntiSpam: // channelAdminLogEventActionToggleAntiSpam#64f36dfc
//	case *tg.ChannelAdminLogEventActionChangePeerColor: // channelAdminLogEventActionChangePeerColor#5796e780
//	case *tg.ChannelAdminLogEventActionChangeProfilePeerColor: // channelAdminLogEventActionChangeProfilePeerColor#5e477b25
//	case *tg.ChannelAdminLogEventActionChangeWallpaper: // channelAdminLogEventActionChangeWallpaper#31bb5d52
//	case *tg.ChannelAdminLogEventActionChangeEmojiStatus: // channelAdminLogEventActionChangeEmojiStatus#3ea9feb1
//	default: panic(v)
//	}
type ChannelAdminLogEventActionClass interface {
	bin.Encoder
	bin.Decoder
	bin.BareEncoder
	bin.BareDecoder
	construct() ChannelAdminLogEventActionClass

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

// DecodeChannelAdminLogEventAction implements binary de-serialization for ChannelAdminLogEventActionClass.
func ( *bin.Buffer) (ChannelAdminLogEventActionClass, error) {
	,  := .PeekID()
	if  != nil {
		return nil, 
	}
	switch  {
	case ChannelAdminLogEventActionChangeTitleTypeID:
		// Decoding channelAdminLogEventActionChangeTitle#e6dfb825.
		 := ChannelAdminLogEventActionChangeTitle{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeAboutTypeID:
		// Decoding channelAdminLogEventActionChangeAbout#55188a2e.
		 := ChannelAdminLogEventActionChangeAbout{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeUsernameTypeID:
		// Decoding channelAdminLogEventActionChangeUsername#6a4afc38.
		 := ChannelAdminLogEventActionChangeUsername{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangePhotoTypeID:
		// Decoding channelAdminLogEventActionChangePhoto#434bd2af.
		 := ChannelAdminLogEventActionChangePhoto{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleInvitesTypeID:
		// Decoding channelAdminLogEventActionToggleInvites#1b7907ae.
		 := ChannelAdminLogEventActionToggleInvites{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleSignaturesTypeID:
		// Decoding channelAdminLogEventActionToggleSignatures#26ae0971.
		 := ChannelAdminLogEventActionToggleSignatures{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionUpdatePinnedTypeID:
		// Decoding channelAdminLogEventActionUpdatePinned#e9e82c18.
		 := ChannelAdminLogEventActionUpdatePinned{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionEditMessageTypeID:
		// Decoding channelAdminLogEventActionEditMessage#709b2405.
		 := ChannelAdminLogEventActionEditMessage{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionDeleteMessageTypeID:
		// Decoding channelAdminLogEventActionDeleteMessage#42e047bb.
		 := ChannelAdminLogEventActionDeleteMessage{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantJoinTypeID:
		// Decoding channelAdminLogEventActionParticipantJoin#183040d3.
		 := ChannelAdminLogEventActionParticipantJoin{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantLeaveTypeID:
		// Decoding channelAdminLogEventActionParticipantLeave#f89777f2.
		 := ChannelAdminLogEventActionParticipantLeave{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantInviteTypeID:
		// Decoding channelAdminLogEventActionParticipantInvite#e31c34d8.
		 := ChannelAdminLogEventActionParticipantInvite{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantToggleBanTypeID:
		// Decoding channelAdminLogEventActionParticipantToggleBan#e6d83d7e.
		 := ChannelAdminLogEventActionParticipantToggleBan{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantToggleAdminTypeID:
		// Decoding channelAdminLogEventActionParticipantToggleAdmin#d5676710.
		 := ChannelAdminLogEventActionParticipantToggleAdmin{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeStickerSetTypeID:
		// Decoding channelAdminLogEventActionChangeStickerSet#b1c3caa7.
		 := ChannelAdminLogEventActionChangeStickerSet{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID:
		// Decoding channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1.
		 := ChannelAdminLogEventActionTogglePreHistoryHidden{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionDefaultBannedRightsTypeID:
		// Decoding channelAdminLogEventActionDefaultBannedRights#2df5fc0a.
		 := ChannelAdminLogEventActionDefaultBannedRights{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionStopPollTypeID:
		// Decoding channelAdminLogEventActionStopPoll#8f079643.
		 := ChannelAdminLogEventActionStopPoll{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeLinkedChatTypeID:
		// Decoding channelAdminLogEventActionChangeLinkedChat#50c7ac8.
		 := ChannelAdminLogEventActionChangeLinkedChat{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeLocationTypeID:
		// Decoding channelAdminLogEventActionChangeLocation#e6b76ae.
		 := ChannelAdminLogEventActionChangeLocation{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleSlowModeTypeID:
		// Decoding channelAdminLogEventActionToggleSlowMode#53909779.
		 := ChannelAdminLogEventActionToggleSlowMode{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionStartGroupCallTypeID:
		// Decoding channelAdminLogEventActionStartGroupCall#23209745.
		 := ChannelAdminLogEventActionStartGroupCall{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionDiscardGroupCallTypeID:
		// Decoding channelAdminLogEventActionDiscardGroupCall#db9f9140.
		 := ChannelAdminLogEventActionDiscardGroupCall{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantMuteTypeID:
		// Decoding channelAdminLogEventActionParticipantMute#f92424d2.
		 := ChannelAdminLogEventActionParticipantMute{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantUnmuteTypeID:
		// Decoding channelAdminLogEventActionParticipantUnmute#e64429c0.
		 := ChannelAdminLogEventActionParticipantUnmute{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleGroupCallSettingTypeID:
		// Decoding channelAdminLogEventActionToggleGroupCallSetting#56d6a247.
		 := ChannelAdminLogEventActionToggleGroupCallSetting{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantJoinByInviteTypeID:
		// Decoding channelAdminLogEventActionParticipantJoinByInvite#fe9fc158.
		 := ChannelAdminLogEventActionParticipantJoinByInvite{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionExportedInviteDeleteTypeID:
		// Decoding channelAdminLogEventActionExportedInviteDelete#5a50fca4.
		 := ChannelAdminLogEventActionExportedInviteDelete{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionExportedInviteRevokeTypeID:
		// Decoding channelAdminLogEventActionExportedInviteRevoke#410a134e.
		 := ChannelAdminLogEventActionExportedInviteRevoke{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionExportedInviteEditTypeID:
		// Decoding channelAdminLogEventActionExportedInviteEdit#e90ebb59.
		 := ChannelAdminLogEventActionExportedInviteEdit{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantVolumeTypeID:
		// Decoding channelAdminLogEventActionParticipantVolume#3e7f6847.
		 := ChannelAdminLogEventActionParticipantVolume{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeHistoryTTLTypeID:
		// Decoding channelAdminLogEventActionChangeHistoryTTL#6e941a38.
		 := ChannelAdminLogEventActionChangeHistoryTTL{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionParticipantJoinByRequestTypeID:
		// Decoding channelAdminLogEventActionParticipantJoinByRequest#afb6144a.
		 := ChannelAdminLogEventActionParticipantJoinByRequest{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleNoForwardsTypeID:
		// Decoding channelAdminLogEventActionToggleNoForwards#cb2ac766.
		 := ChannelAdminLogEventActionToggleNoForwards{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionSendMessageTypeID:
		// Decoding channelAdminLogEventActionSendMessage#278f2868.
		 := ChannelAdminLogEventActionSendMessage{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeAvailableReactionsTypeID:
		// Decoding channelAdminLogEventActionChangeAvailableReactions#be4e0ef8.
		 := ChannelAdminLogEventActionChangeAvailableReactions{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeUsernamesTypeID:
		// Decoding channelAdminLogEventActionChangeUsernames#f04fb3a9.
		 := ChannelAdminLogEventActionChangeUsernames{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleForumTypeID:
		// Decoding channelAdminLogEventActionToggleForum#2cc6383.
		 := ChannelAdminLogEventActionToggleForum{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionCreateTopicTypeID:
		// Decoding channelAdminLogEventActionCreateTopic#58707d28.
		 := ChannelAdminLogEventActionCreateTopic{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionEditTopicTypeID:
		// Decoding channelAdminLogEventActionEditTopic#f06fe208.
		 := ChannelAdminLogEventActionEditTopic{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionDeleteTopicTypeID:
		// Decoding channelAdminLogEventActionDeleteTopic#ae168909.
		 := ChannelAdminLogEventActionDeleteTopic{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionPinTopicTypeID:
		// Decoding channelAdminLogEventActionPinTopic#5d8d353b.
		 := ChannelAdminLogEventActionPinTopic{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionToggleAntiSpamTypeID:
		// Decoding channelAdminLogEventActionToggleAntiSpam#64f36dfc.
		 := ChannelAdminLogEventActionToggleAntiSpam{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangePeerColorTypeID:
		// Decoding channelAdminLogEventActionChangePeerColor#5796e780.
		 := ChannelAdminLogEventActionChangePeerColor{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeProfilePeerColorTypeID:
		// Decoding channelAdminLogEventActionChangeProfilePeerColor#5e477b25.
		 := ChannelAdminLogEventActionChangeProfilePeerColor{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeWallpaperTypeID:
		// Decoding channelAdminLogEventActionChangeWallpaper#31bb5d52.
		 := ChannelAdminLogEventActionChangeWallpaper{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	case ChannelAdminLogEventActionChangeEmojiStatusTypeID:
		// Decoding channelAdminLogEventActionChangeEmojiStatus#3ea9feb1.
		 := ChannelAdminLogEventActionChangeEmojiStatus{}
		if  := .Decode();  != nil {
			return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", )
		}
		return &, nil
	default:
		return nil, fmt.Errorf("unable to decode ChannelAdminLogEventActionClass: %w", bin.NewUnexpectedID())
	}
}

// ChannelAdminLogEventAction boxes the ChannelAdminLogEventActionClass providing a helper.
type ChannelAdminLogEventActionBox struct {
	ChannelAdminLogEventAction ChannelAdminLogEventActionClass
}

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

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