package tg
import (
"context"
"errors"
"fmt"
"sort"
"strings"
"go.uber.org/multierr"
"github.com/gotd/td/bin"
"github.com/gotd/td/tdjson"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tgerr"
)
var (
_ = bin .Buffer {}
_ = context .Background ()
_ = fmt .Stringer (nil )
_ = strings .Builder {}
_ = errors .Is
_ = multierr .AppendInto
_ = sort .Ints
_ = tdp .Format
_ = tgerr .Error {}
_ = tdjson .Encoder {}
)
type ChannelAdminLogEventActionChangeTitle struct {
PrevValue string
NewValue string
}
const ChannelAdminLogEventActionChangeTitleTypeID = 0xe6dfb825
func (c ChannelAdminLogEventActionChangeTitle ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeTitle {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeTitle {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeTitle {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeTitle {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeTitle {}
)
func (c *ChannelAdminLogEventActionChangeTitle ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == "" ) {
return false
}
if !(c .NewValue == "" ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeTitle ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeTitle(nil)"
}
type Alias ChannelAdminLogEventActionChangeTitle
return fmt .Sprintf ("ChannelAdminLogEventActionChangeTitle%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeTitle ) FillFrom (from interface {
GetPrevValue () (value string )
GetNewValue () (value string )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeTitle ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeTitleTypeID
}
func (*ChannelAdminLogEventActionChangeTitle ) TypeName () string {
return "channelAdminLogEventActionChangeTitle"
}
func (c *ChannelAdminLogEventActionChangeTitle ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeTitle" ,
ID : ChannelAdminLogEventActionChangeTitleTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeTitle ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeTitle#e6dfb825 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeTitleTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeTitle ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeTitle#e6dfb825 as nil" )
}
b .PutString (c .PrevValue )
b .PutString (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionChangeTitle ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeTitle#e6dfb825 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeTitleTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeTitle#e6dfb825: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeTitle ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeTitle#e6dfb825 to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeTitle#e6dfb825: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeTitle#e6dfb825: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeTitle ) GetPrevValue () (value string ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeTitle ) GetNewValue () (value string ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeAbout struct {
PrevValue string
NewValue string
}
const ChannelAdminLogEventActionChangeAboutTypeID = 0x55188a2e
func (c ChannelAdminLogEventActionChangeAbout ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeAbout {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeAbout {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeAbout {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeAbout {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeAbout {}
)
func (c *ChannelAdminLogEventActionChangeAbout ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == "" ) {
return false
}
if !(c .NewValue == "" ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeAbout ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeAbout(nil)"
}
type Alias ChannelAdminLogEventActionChangeAbout
return fmt .Sprintf ("ChannelAdminLogEventActionChangeAbout%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeAbout ) FillFrom (from interface {
GetPrevValue () (value string )
GetNewValue () (value string )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeAbout ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeAboutTypeID
}
func (*ChannelAdminLogEventActionChangeAbout ) TypeName () string {
return "channelAdminLogEventActionChangeAbout"
}
func (c *ChannelAdminLogEventActionChangeAbout ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeAbout" ,
ID : ChannelAdminLogEventActionChangeAboutTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeAbout ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeAbout#55188a2e as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeAboutTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeAbout ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeAbout#55188a2e as nil" )
}
b .PutString (c .PrevValue )
b .PutString (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionChangeAbout ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeAbout#55188a2e to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeAboutTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAbout#55188a2e: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeAbout ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeAbout#55188a2e to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAbout#55188a2e: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAbout#55188a2e: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeAbout ) GetPrevValue () (value string ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeAbout ) GetNewValue () (value string ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeUsername struct {
PrevValue string
NewValue string
}
const ChannelAdminLogEventActionChangeUsernameTypeID = 0x6a4afc38
func (c ChannelAdminLogEventActionChangeUsername ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeUsername {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeUsername {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeUsername {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeUsername {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeUsername {}
)
func (c *ChannelAdminLogEventActionChangeUsername ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == "" ) {
return false
}
if !(c .NewValue == "" ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeUsername ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeUsername(nil)"
}
type Alias ChannelAdminLogEventActionChangeUsername
return fmt .Sprintf ("ChannelAdminLogEventActionChangeUsername%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeUsername ) FillFrom (from interface {
GetPrevValue () (value string )
GetNewValue () (value string )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeUsername ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeUsernameTypeID
}
func (*ChannelAdminLogEventActionChangeUsername ) TypeName () string {
return "channelAdminLogEventActionChangeUsername"
}
func (c *ChannelAdminLogEventActionChangeUsername ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeUsername" ,
ID : ChannelAdminLogEventActionChangeUsernameTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeUsername ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeUsername#6a4afc38 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeUsernameTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeUsername ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeUsername#6a4afc38 as nil" )
}
b .PutString (c .PrevValue )
b .PutString (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionChangeUsername ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeUsername#6a4afc38 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeUsernameTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsername#6a4afc38: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeUsername ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeUsername#6a4afc38 to nil" )
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsername#6a4afc38: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsername#6a4afc38: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeUsername ) GetPrevValue () (value string ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeUsername ) GetNewValue () (value string ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangePhoto struct {
PrevPhoto PhotoClass
NewPhoto PhotoClass
}
const ChannelAdminLogEventActionChangePhotoTypeID = 0x434bd2af
func (c ChannelAdminLogEventActionChangePhoto ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangePhoto {}
_ bin .Decoder = &ChannelAdminLogEventActionChangePhoto {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangePhoto {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangePhoto {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangePhoto {}
)
func (c *ChannelAdminLogEventActionChangePhoto ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevPhoto == nil ) {
return false
}
if !(c .NewPhoto == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangePhoto ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangePhoto(nil)"
}
type Alias ChannelAdminLogEventActionChangePhoto
return fmt .Sprintf ("ChannelAdminLogEventActionChangePhoto%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangePhoto ) FillFrom (from interface {
GetPrevPhoto () (value PhotoClass )
GetNewPhoto () (value PhotoClass )
}) {
c .PrevPhoto = from .GetPrevPhoto ()
c .NewPhoto = from .GetNewPhoto ()
}
func (*ChannelAdminLogEventActionChangePhoto ) TypeID () uint32 {
return ChannelAdminLogEventActionChangePhotoTypeID
}
func (*ChannelAdminLogEventActionChangePhoto ) TypeName () string {
return "channelAdminLogEventActionChangePhoto"
}
func (c *ChannelAdminLogEventActionChangePhoto ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangePhoto" ,
ID : ChannelAdminLogEventActionChangePhotoTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevPhoto" ,
SchemaName : "prev_photo" ,
},
{
Name : "NewPhoto" ,
SchemaName : "new_photo" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangePhoto ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangePhoto#434bd2af as nil" )
}
b .PutID (ChannelAdminLogEventActionChangePhotoTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangePhoto ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangePhoto#434bd2af as nil" )
}
if c .PrevPhoto == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo is nil" )
}
if err := c .PrevPhoto .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo: %w" , err )
}
if c .NewPhoto == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo is nil" )
}
if err := c .NewPhoto .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangePhoto ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangePhoto#434bd2af to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangePhotoTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePhoto#434bd2af: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangePhoto ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangePhoto#434bd2af to nil" )
}
{
value , err := DecodePhoto (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePhoto#434bd2af: field prev_photo: %w" , err )
}
c .PrevPhoto = value
}
{
value , err := DecodePhoto (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePhoto#434bd2af: field new_photo: %w" , err )
}
c .NewPhoto = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangePhoto ) GetPrevPhoto () (value PhotoClass ) {
if c == nil {
return
}
return c .PrevPhoto
}
func (c *ChannelAdminLogEventActionChangePhoto ) GetNewPhoto () (value PhotoClass ) {
if c == nil {
return
}
return c .NewPhoto
}
type ChannelAdminLogEventActionToggleInvites struct {
NewValue bool
}
const ChannelAdminLogEventActionToggleInvitesTypeID = 0x1b7907ae
func (c ChannelAdminLogEventActionToggleInvites ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleInvites {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleInvites {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleInvites {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleInvites {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleInvites {}
)
func (c *ChannelAdminLogEventActionToggleInvites ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleInvites ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleInvites(nil)"
}
type Alias ChannelAdminLogEventActionToggleInvites
return fmt .Sprintf ("ChannelAdminLogEventActionToggleInvites%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleInvites ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleInvites ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleInvitesTypeID
}
func (*ChannelAdminLogEventActionToggleInvites ) TypeName () string {
return "channelAdminLogEventActionToggleInvites"
}
func (c *ChannelAdminLogEventActionToggleInvites ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleInvites" ,
ID : ChannelAdminLogEventActionToggleInvitesTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleInvites ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleInvites#1b7907ae as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleInvitesTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleInvites ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleInvites#1b7907ae as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleInvites ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleInvites#1b7907ae to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleInvitesTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleInvites#1b7907ae: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleInvites ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleInvites#1b7907ae to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleInvites#1b7907ae: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleInvites ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionToggleSignatures struct {
NewValue bool
}
const ChannelAdminLogEventActionToggleSignaturesTypeID = 0x26ae0971
func (c ChannelAdminLogEventActionToggleSignatures ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleSignatures {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleSignatures {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleSignatures {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleSignatures {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleSignatures {}
)
func (c *ChannelAdminLogEventActionToggleSignatures ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleSignatures ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleSignatures(nil)"
}
type Alias ChannelAdminLogEventActionToggleSignatures
return fmt .Sprintf ("ChannelAdminLogEventActionToggleSignatures%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleSignatures ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleSignatures ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleSignaturesTypeID
}
func (*ChannelAdminLogEventActionToggleSignatures ) TypeName () string {
return "channelAdminLogEventActionToggleSignatures"
}
func (c *ChannelAdminLogEventActionToggleSignatures ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleSignatures" ,
ID : ChannelAdminLogEventActionToggleSignaturesTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleSignatures ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleSignatures#26ae0971 as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleSignaturesTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleSignatures ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleSignatures#26ae0971 as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleSignatures ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleSignatures#26ae0971 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleSignaturesTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleSignatures#26ae0971: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleSignatures ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleSignatures#26ae0971 to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleSignatures#26ae0971: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleSignatures ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionUpdatePinned struct {
Message MessageClass
}
const ChannelAdminLogEventActionUpdatePinnedTypeID = 0xe9e82c18
func (c ChannelAdminLogEventActionUpdatePinned ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionUpdatePinned {}
_ bin .Decoder = &ChannelAdminLogEventActionUpdatePinned {}
_ bin .BareEncoder = &ChannelAdminLogEventActionUpdatePinned {}
_ bin .BareDecoder = &ChannelAdminLogEventActionUpdatePinned {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionUpdatePinned {}
)
func (c *ChannelAdminLogEventActionUpdatePinned ) Zero () bool {
if c == nil {
return true
}
if !(c .Message == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionUpdatePinned ) String () string {
if c == nil {
return "ChannelAdminLogEventActionUpdatePinned(nil)"
}
type Alias ChannelAdminLogEventActionUpdatePinned
return fmt .Sprintf ("ChannelAdminLogEventActionUpdatePinned%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionUpdatePinned ) FillFrom (from interface {
GetMessage () (value MessageClass )
}) {
c .Message = from .GetMessage ()
}
func (*ChannelAdminLogEventActionUpdatePinned ) TypeID () uint32 {
return ChannelAdminLogEventActionUpdatePinnedTypeID
}
func (*ChannelAdminLogEventActionUpdatePinned ) TypeName () string {
return "channelAdminLogEventActionUpdatePinned"
}
func (c *ChannelAdminLogEventActionUpdatePinned ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionUpdatePinned" ,
ID : ChannelAdminLogEventActionUpdatePinnedTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Message" ,
SchemaName : "message" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionUpdatePinned ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionUpdatePinned#e9e82c18 as nil" )
}
b .PutID (ChannelAdminLogEventActionUpdatePinnedTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionUpdatePinned ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionUpdatePinned#e9e82c18 as nil" )
}
if c .Message == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionUpdatePinned#e9e82c18: field message is nil" )
}
if err := c .Message .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionUpdatePinned#e9e82c18: field message: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionUpdatePinned ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionUpdatePinned#e9e82c18 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionUpdatePinnedTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionUpdatePinned#e9e82c18: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionUpdatePinned ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionUpdatePinned#e9e82c18 to nil" )
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionUpdatePinned#e9e82c18: field message: %w" , err )
}
c .Message = value
}
return nil
}
func (c *ChannelAdminLogEventActionUpdatePinned ) GetMessage () (value MessageClass ) {
if c == nil {
return
}
return c .Message
}
type ChannelAdminLogEventActionEditMessage struct {
PrevMessage MessageClass
NewMessage MessageClass
}
const ChannelAdminLogEventActionEditMessageTypeID = 0x709b2405
func (c ChannelAdminLogEventActionEditMessage ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionEditMessage {}
_ bin .Decoder = &ChannelAdminLogEventActionEditMessage {}
_ bin .BareEncoder = &ChannelAdminLogEventActionEditMessage {}
_ bin .BareDecoder = &ChannelAdminLogEventActionEditMessage {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionEditMessage {}
)
func (c *ChannelAdminLogEventActionEditMessage ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevMessage == nil ) {
return false
}
if !(c .NewMessage == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionEditMessage ) String () string {
if c == nil {
return "ChannelAdminLogEventActionEditMessage(nil)"
}
type Alias ChannelAdminLogEventActionEditMessage
return fmt .Sprintf ("ChannelAdminLogEventActionEditMessage%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionEditMessage ) FillFrom (from interface {
GetPrevMessage () (value MessageClass )
GetNewMessage () (value MessageClass )
}) {
c .PrevMessage = from .GetPrevMessage ()
c .NewMessage = from .GetNewMessage ()
}
func (*ChannelAdminLogEventActionEditMessage ) TypeID () uint32 {
return ChannelAdminLogEventActionEditMessageTypeID
}
func (*ChannelAdminLogEventActionEditMessage ) TypeName () string {
return "channelAdminLogEventActionEditMessage"
}
func (c *ChannelAdminLogEventActionEditMessage ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionEditMessage" ,
ID : ChannelAdminLogEventActionEditMessageTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevMessage" ,
SchemaName : "prev_message" ,
},
{
Name : "NewMessage" ,
SchemaName : "new_message" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionEditMessage ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionEditMessage#709b2405 as nil" )
}
b .PutID (ChannelAdminLogEventActionEditMessageTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionEditMessage ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionEditMessage#709b2405 as nil" )
}
if c .PrevMessage == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditMessage#709b2405: field prev_message is nil" )
}
if err := c .PrevMessage .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditMessage#709b2405: field prev_message: %w" , err )
}
if c .NewMessage == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditMessage#709b2405: field new_message is nil" )
}
if err := c .NewMessage .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditMessage#709b2405: field new_message: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionEditMessage ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionEditMessage#709b2405 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionEditMessageTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditMessage#709b2405: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionEditMessage ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionEditMessage#709b2405 to nil" )
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditMessage#709b2405: field prev_message: %w" , err )
}
c .PrevMessage = value
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditMessage#709b2405: field new_message: %w" , err )
}
c .NewMessage = value
}
return nil
}
func (c *ChannelAdminLogEventActionEditMessage ) GetPrevMessage () (value MessageClass ) {
if c == nil {
return
}
return c .PrevMessage
}
func (c *ChannelAdminLogEventActionEditMessage ) GetNewMessage () (value MessageClass ) {
if c == nil {
return
}
return c .NewMessage
}
type ChannelAdminLogEventActionDeleteMessage struct {
Message MessageClass
}
const ChannelAdminLogEventActionDeleteMessageTypeID = 0x42e047bb
func (c ChannelAdminLogEventActionDeleteMessage ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionDeleteMessage {}
_ bin .Decoder = &ChannelAdminLogEventActionDeleteMessage {}
_ bin .BareEncoder = &ChannelAdminLogEventActionDeleteMessage {}
_ bin .BareDecoder = &ChannelAdminLogEventActionDeleteMessage {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDeleteMessage {}
)
func (c *ChannelAdminLogEventActionDeleteMessage ) Zero () bool {
if c == nil {
return true
}
if !(c .Message == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionDeleteMessage ) String () string {
if c == nil {
return "ChannelAdminLogEventActionDeleteMessage(nil)"
}
type Alias ChannelAdminLogEventActionDeleteMessage
return fmt .Sprintf ("ChannelAdminLogEventActionDeleteMessage%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionDeleteMessage ) FillFrom (from interface {
GetMessage () (value MessageClass )
}) {
c .Message = from .GetMessage ()
}
func (*ChannelAdminLogEventActionDeleteMessage ) TypeID () uint32 {
return ChannelAdminLogEventActionDeleteMessageTypeID
}
func (*ChannelAdminLogEventActionDeleteMessage ) TypeName () string {
return "channelAdminLogEventActionDeleteMessage"
}
func (c *ChannelAdminLogEventActionDeleteMessage ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionDeleteMessage" ,
ID : ChannelAdminLogEventActionDeleteMessageTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Message" ,
SchemaName : "message" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionDeleteMessage ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDeleteMessage#42e047bb as nil" )
}
b .PutID (ChannelAdminLogEventActionDeleteMessageTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionDeleteMessage ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDeleteMessage#42e047bb as nil" )
}
if c .Message == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDeleteMessage#42e047bb: field message is nil" )
}
if err := c .Message .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDeleteMessage#42e047bb: field message: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionDeleteMessage ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDeleteMessage#42e047bb to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionDeleteMessageTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDeleteMessage#42e047bb: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionDeleteMessage ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDeleteMessage#42e047bb to nil" )
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDeleteMessage#42e047bb: field message: %w" , err )
}
c .Message = value
}
return nil
}
func (c *ChannelAdminLogEventActionDeleteMessage ) GetMessage () (value MessageClass ) {
if c == nil {
return
}
return c .Message
}
type ChannelAdminLogEventActionParticipantJoin struct {
}
const ChannelAdminLogEventActionParticipantJoinTypeID = 0x183040d3
func (c ChannelAdminLogEventActionParticipantJoin ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantJoin {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantJoin {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantJoin {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantJoin {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoin {}
)
func (c *ChannelAdminLogEventActionParticipantJoin ) Zero () bool {
if c == nil {
return true
}
return true
}
func (c *ChannelAdminLogEventActionParticipantJoin ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantJoin(nil)"
}
type Alias ChannelAdminLogEventActionParticipantJoin
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantJoin%+v" , Alias (*c ))
}
func (*ChannelAdminLogEventActionParticipantJoin ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantJoinTypeID
}
func (*ChannelAdminLogEventActionParticipantJoin ) TypeName () string {
return "channelAdminLogEventActionParticipantJoin"
}
func (c *ChannelAdminLogEventActionParticipantJoin ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantJoin" ,
ID : ChannelAdminLogEventActionParticipantJoinTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (c *ChannelAdminLogEventActionParticipantJoin ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoin#183040d3 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantJoinTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoin ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoin#183040d3 as nil" )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantJoin ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoin#183040d3 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantJoinTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoin#183040d3: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoin ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoin#183040d3 to nil" )
}
return nil
}
type ChannelAdminLogEventActionParticipantLeave struct {
}
const ChannelAdminLogEventActionParticipantLeaveTypeID = 0xf89777f2
func (c ChannelAdminLogEventActionParticipantLeave ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantLeave {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantLeave {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantLeave {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantLeave {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantLeave {}
)
func (c *ChannelAdminLogEventActionParticipantLeave ) Zero () bool {
if c == nil {
return true
}
return true
}
func (c *ChannelAdminLogEventActionParticipantLeave ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantLeave(nil)"
}
type Alias ChannelAdminLogEventActionParticipantLeave
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantLeave%+v" , Alias (*c ))
}
func (*ChannelAdminLogEventActionParticipantLeave ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantLeaveTypeID
}
func (*ChannelAdminLogEventActionParticipantLeave ) TypeName () string {
return "channelAdminLogEventActionParticipantLeave"
}
func (c *ChannelAdminLogEventActionParticipantLeave ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantLeave" ,
ID : ChannelAdminLogEventActionParticipantLeaveTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {}
return typ
}
func (c *ChannelAdminLogEventActionParticipantLeave ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantLeave#f89777f2 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantLeaveTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantLeave ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantLeave#f89777f2 as nil" )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantLeave ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantLeave#f89777f2 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantLeaveTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantLeave#f89777f2: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantLeave ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantLeave#f89777f2 to nil" )
}
return nil
}
type ChannelAdminLogEventActionParticipantInvite struct {
Participant ChannelParticipantClass
}
const ChannelAdminLogEventActionParticipantInviteTypeID = 0xe31c34d8
func (c ChannelAdminLogEventActionParticipantInvite ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantInvite {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantInvite {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantInvite {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantInvite {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantInvite {}
)
func (c *ChannelAdminLogEventActionParticipantInvite ) Zero () bool {
if c == nil {
return true
}
if !(c .Participant == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantInvite ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantInvite(nil)"
}
type Alias ChannelAdminLogEventActionParticipantInvite
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantInvite%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantInvite ) FillFrom (from interface {
GetParticipant () (value ChannelParticipantClass )
}) {
c .Participant = from .GetParticipant ()
}
func (*ChannelAdminLogEventActionParticipantInvite ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantInviteTypeID
}
func (*ChannelAdminLogEventActionParticipantInvite ) TypeName () string {
return "channelAdminLogEventActionParticipantInvite"
}
func (c *ChannelAdminLogEventActionParticipantInvite ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantInvite" ,
ID : ChannelAdminLogEventActionParticipantInviteTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Participant" ,
SchemaName : "participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantInvite ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantInvite#e31c34d8 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantInviteTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantInvite ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantInvite#e31c34d8 as nil" )
}
if c .Participant == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant is nil" )
}
if err := c .Participant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantInvite ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantInvite#e31c34d8 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantInviteTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantInvite#e31c34d8: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantInvite ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantInvite#e31c34d8 to nil" )
}
{
value , err := DecodeChannelParticipant (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantInvite#e31c34d8: field participant: %w" , err )
}
c .Participant = value
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantInvite ) GetParticipant () (value ChannelParticipantClass ) {
if c == nil {
return
}
return c .Participant
}
type ChannelAdminLogEventActionParticipantToggleBan struct {
PrevParticipant ChannelParticipantClass
NewParticipant ChannelParticipantClass
}
const ChannelAdminLogEventActionParticipantToggleBanTypeID = 0xe6d83d7e
func (c ChannelAdminLogEventActionParticipantToggleBan ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantToggleBan {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantToggleBan {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantToggleBan {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantToggleBan {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantToggleBan {}
)
func (c *ChannelAdminLogEventActionParticipantToggleBan ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevParticipant == nil ) {
return false
}
if !(c .NewParticipant == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantToggleBan(nil)"
}
type Alias ChannelAdminLogEventActionParticipantToggleBan
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantToggleBan%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) FillFrom (from interface {
GetPrevParticipant () (value ChannelParticipantClass )
GetNewParticipant () (value ChannelParticipantClass )
}) {
c .PrevParticipant = from .GetPrevParticipant ()
c .NewParticipant = from .GetNewParticipant ()
}
func (*ChannelAdminLogEventActionParticipantToggleBan ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantToggleBanTypeID
}
func (*ChannelAdminLogEventActionParticipantToggleBan ) TypeName () string {
return "channelAdminLogEventActionParticipantToggleBan"
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantToggleBan" ,
ID : ChannelAdminLogEventActionParticipantToggleBanTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevParticipant" ,
SchemaName : "prev_participant" ,
},
{
Name : "NewParticipant" ,
SchemaName : "new_participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantToggleBanTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e as nil" )
}
if c .PrevParticipant == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant is nil" )
}
if err := c .PrevParticipant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant: %w" , err )
}
if c .NewParticipant == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant is nil" )
}
if err := c .NewParticipant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantToggleBanTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e to nil" )
}
{
value , err := DecodeChannelParticipant (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field prev_participant: %w" , err )
}
c .PrevParticipant = value
}
{
value , err := DecodeChannelParticipant (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleBan#e6d83d7e: field new_participant: %w" , err )
}
c .NewParticipant = value
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) GetPrevParticipant () (value ChannelParticipantClass ) {
if c == nil {
return
}
return c .PrevParticipant
}
func (c *ChannelAdminLogEventActionParticipantToggleBan ) GetNewParticipant () (value ChannelParticipantClass ) {
if c == nil {
return
}
return c .NewParticipant
}
type ChannelAdminLogEventActionParticipantToggleAdmin struct {
PrevParticipant ChannelParticipantClass
NewParticipant ChannelParticipantClass
}
const ChannelAdminLogEventActionParticipantToggleAdminTypeID = 0xd5676710
func (c ChannelAdminLogEventActionParticipantToggleAdmin ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantToggleAdmin {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantToggleAdmin {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantToggleAdmin {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantToggleAdmin {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantToggleAdmin {}
)
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevParticipant == nil ) {
return false
}
if !(c .NewParticipant == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantToggleAdmin(nil)"
}
type Alias ChannelAdminLogEventActionParticipantToggleAdmin
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantToggleAdmin%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) FillFrom (from interface {
GetPrevParticipant () (value ChannelParticipantClass )
GetNewParticipant () (value ChannelParticipantClass )
}) {
c .PrevParticipant = from .GetPrevParticipant ()
c .NewParticipant = from .GetNewParticipant ()
}
func (*ChannelAdminLogEventActionParticipantToggleAdmin ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantToggleAdminTypeID
}
func (*ChannelAdminLogEventActionParticipantToggleAdmin ) TypeName () string {
return "channelAdminLogEventActionParticipantToggleAdmin"
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantToggleAdmin" ,
ID : ChannelAdminLogEventActionParticipantToggleAdminTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevParticipant" ,
SchemaName : "prev_participant" ,
},
{
Name : "NewParticipant" ,
SchemaName : "new_participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantToggleAdmin#d5676710 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantToggleAdminTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantToggleAdmin#d5676710 as nil" )
}
if c .PrevParticipant == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant is nil" )
}
if err := c .PrevParticipant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant: %w" , err )
}
if c .NewParticipant == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant is nil" )
}
if err := c .NewParticipant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantToggleAdmin#d5676710 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantToggleAdminTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleAdmin#d5676710: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantToggleAdmin#d5676710 to nil" )
}
{
value , err := DecodeChannelParticipant (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field prev_participant: %w" , err )
}
c .PrevParticipant = value
}
{
value , err := DecodeChannelParticipant (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantToggleAdmin#d5676710: field new_participant: %w" , err )
}
c .NewParticipant = value
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) GetPrevParticipant () (value ChannelParticipantClass ) {
if c == nil {
return
}
return c .PrevParticipant
}
func (c *ChannelAdminLogEventActionParticipantToggleAdmin ) GetNewParticipant () (value ChannelParticipantClass ) {
if c == nil {
return
}
return c .NewParticipant
}
type ChannelAdminLogEventActionChangeStickerSet struct {
PrevStickerset InputStickerSetClass
NewStickerset InputStickerSetClass
}
const ChannelAdminLogEventActionChangeStickerSetTypeID = 0xb1c3caa7
func (c ChannelAdminLogEventActionChangeStickerSet ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeStickerSet {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeStickerSet {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeStickerSet {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeStickerSet {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeStickerSet {}
)
func (c *ChannelAdminLogEventActionChangeStickerSet ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevStickerset == nil ) {
return false
}
if !(c .NewStickerset == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeStickerSet(nil)"
}
type Alias ChannelAdminLogEventActionChangeStickerSet
return fmt .Sprintf ("ChannelAdminLogEventActionChangeStickerSet%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) FillFrom (from interface {
GetPrevStickerset () (value InputStickerSetClass )
GetNewStickerset () (value InputStickerSetClass )
}) {
c .PrevStickerset = from .GetPrevStickerset ()
c .NewStickerset = from .GetNewStickerset ()
}
func (*ChannelAdminLogEventActionChangeStickerSet ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeStickerSetTypeID
}
func (*ChannelAdminLogEventActionChangeStickerSet ) TypeName () string {
return "channelAdminLogEventActionChangeStickerSet"
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeStickerSet" ,
ID : ChannelAdminLogEventActionChangeStickerSetTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevStickerset" ,
SchemaName : "prev_stickerset" ,
},
{
Name : "NewStickerset" ,
SchemaName : "new_stickerset" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeStickerSet#b1c3caa7 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeStickerSetTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeStickerSet#b1c3caa7 as nil" )
}
if c .PrevStickerset == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset is nil" )
}
if err := c .PrevStickerset .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset: %w" , err )
}
if c .NewStickerset == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset is nil" )
}
if err := c .NewStickerset .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeStickerSet#b1c3caa7 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeStickerSetTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeStickerSet#b1c3caa7: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeStickerSet#b1c3caa7 to nil" )
}
{
value , err := DecodeInputStickerSet (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field prev_stickerset: %w" , err )
}
c .PrevStickerset = value
}
{
value , err := DecodeInputStickerSet (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeStickerSet#b1c3caa7: field new_stickerset: %w" , err )
}
c .NewStickerset = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) GetPrevStickerset () (value InputStickerSetClass ) {
if c == nil {
return
}
return c .PrevStickerset
}
func (c *ChannelAdminLogEventActionChangeStickerSet ) GetNewStickerset () (value InputStickerSetClass ) {
if c == nil {
return
}
return c .NewStickerset
}
type ChannelAdminLogEventActionTogglePreHistoryHidden struct {
NewValue bool
}
const ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID = 0x5f5c95f1
func (c ChannelAdminLogEventActionTogglePreHistoryHidden ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionTogglePreHistoryHidden {}
_ bin .Decoder = &ChannelAdminLogEventActionTogglePreHistoryHidden {}
_ bin .BareEncoder = &ChannelAdminLogEventActionTogglePreHistoryHidden {}
_ bin .BareDecoder = &ChannelAdminLogEventActionTogglePreHistoryHidden {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionTogglePreHistoryHidden {}
)
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) String () string {
if c == nil {
return "ChannelAdminLogEventActionTogglePreHistoryHidden(nil)"
}
type Alias ChannelAdminLogEventActionTogglePreHistoryHidden
return fmt .Sprintf ("ChannelAdminLogEventActionTogglePreHistoryHidden%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionTogglePreHistoryHidden ) TypeID () uint32 {
return ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID
}
func (*ChannelAdminLogEventActionTogglePreHistoryHidden ) TypeName () string {
return "channelAdminLogEventActionTogglePreHistoryHidden"
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionTogglePreHistoryHidden" ,
ID : ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 as nil" )
}
b .PutID (ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionTogglePreHistoryHidden ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionDefaultBannedRights struct {
PrevBannedRights ChatBannedRights
NewBannedRights ChatBannedRights
}
const ChannelAdminLogEventActionDefaultBannedRightsTypeID = 0x2df5fc0a
func (c ChannelAdminLogEventActionDefaultBannedRights ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionDefaultBannedRights {}
_ bin .Decoder = &ChannelAdminLogEventActionDefaultBannedRights {}
_ bin .BareEncoder = &ChannelAdminLogEventActionDefaultBannedRights {}
_ bin .BareDecoder = &ChannelAdminLogEventActionDefaultBannedRights {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDefaultBannedRights {}
)
func (c *ChannelAdminLogEventActionDefaultBannedRights ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevBannedRights .Zero ()) {
return false
}
if !(c .NewBannedRights .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) String () string {
if c == nil {
return "ChannelAdminLogEventActionDefaultBannedRights(nil)"
}
type Alias ChannelAdminLogEventActionDefaultBannedRights
return fmt .Sprintf ("ChannelAdminLogEventActionDefaultBannedRights%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) FillFrom (from interface {
GetPrevBannedRights () (value ChatBannedRights )
GetNewBannedRights () (value ChatBannedRights )
}) {
c .PrevBannedRights = from .GetPrevBannedRights ()
c .NewBannedRights = from .GetNewBannedRights ()
}
func (*ChannelAdminLogEventActionDefaultBannedRights ) TypeID () uint32 {
return ChannelAdminLogEventActionDefaultBannedRightsTypeID
}
func (*ChannelAdminLogEventActionDefaultBannedRights ) TypeName () string {
return "channelAdminLogEventActionDefaultBannedRights"
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionDefaultBannedRights" ,
ID : ChannelAdminLogEventActionDefaultBannedRightsTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevBannedRights" ,
SchemaName : "prev_banned_rights" ,
},
{
Name : "NewBannedRights" ,
SchemaName : "new_banned_rights" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a as nil" )
}
b .PutID (ChannelAdminLogEventActionDefaultBannedRightsTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a as nil" )
}
if err := c .PrevBannedRights .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field prev_banned_rights: %w" , err )
}
if err := c .NewBannedRights .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field new_banned_rights: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionDefaultBannedRightsTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a to nil" )
}
{
if err := c .PrevBannedRights .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field prev_banned_rights: %w" , err )
}
}
{
if err := c .NewBannedRights .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDefaultBannedRights#2df5fc0a: field new_banned_rights: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) GetPrevBannedRights () (value ChatBannedRights ) {
if c == nil {
return
}
return c .PrevBannedRights
}
func (c *ChannelAdminLogEventActionDefaultBannedRights ) GetNewBannedRights () (value ChatBannedRights ) {
if c == nil {
return
}
return c .NewBannedRights
}
type ChannelAdminLogEventActionStopPoll struct {
Message MessageClass
}
const ChannelAdminLogEventActionStopPollTypeID = 0x8f079643
func (c ChannelAdminLogEventActionStopPoll ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionStopPoll {}
_ bin .Decoder = &ChannelAdminLogEventActionStopPoll {}
_ bin .BareEncoder = &ChannelAdminLogEventActionStopPoll {}
_ bin .BareDecoder = &ChannelAdminLogEventActionStopPoll {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionStopPoll {}
)
func (c *ChannelAdminLogEventActionStopPoll ) Zero () bool {
if c == nil {
return true
}
if !(c .Message == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionStopPoll ) String () string {
if c == nil {
return "ChannelAdminLogEventActionStopPoll(nil)"
}
type Alias ChannelAdminLogEventActionStopPoll
return fmt .Sprintf ("ChannelAdminLogEventActionStopPoll%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionStopPoll ) FillFrom (from interface {
GetMessage () (value MessageClass )
}) {
c .Message = from .GetMessage ()
}
func (*ChannelAdminLogEventActionStopPoll ) TypeID () uint32 {
return ChannelAdminLogEventActionStopPollTypeID
}
func (*ChannelAdminLogEventActionStopPoll ) TypeName () string {
return "channelAdminLogEventActionStopPoll"
}
func (c *ChannelAdminLogEventActionStopPoll ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionStopPoll" ,
ID : ChannelAdminLogEventActionStopPollTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Message" ,
SchemaName : "message" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionStopPoll ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionStopPoll#8f079643 as nil" )
}
b .PutID (ChannelAdminLogEventActionStopPollTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionStopPoll ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionStopPoll#8f079643 as nil" )
}
if c .Message == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionStopPoll#8f079643: field message is nil" )
}
if err := c .Message .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionStopPoll#8f079643: field message: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionStopPoll ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionStopPoll#8f079643 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionStopPollTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionStopPoll#8f079643: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionStopPoll ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionStopPoll#8f079643 to nil" )
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionStopPoll#8f079643: field message: %w" , err )
}
c .Message = value
}
return nil
}
func (c *ChannelAdminLogEventActionStopPoll ) GetMessage () (value MessageClass ) {
if c == nil {
return
}
return c .Message
}
type ChannelAdminLogEventActionChangeLinkedChat struct {
PrevValue int64
NewValue int64
}
const ChannelAdminLogEventActionChangeLinkedChatTypeID = 0x50c7ac8
func (c ChannelAdminLogEventActionChangeLinkedChat ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeLinkedChat {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeLinkedChat {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeLinkedChat {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeLinkedChat {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeLinkedChat {}
)
func (c *ChannelAdminLogEventActionChangeLinkedChat ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == 0 ) {
return false
}
if !(c .NewValue == 0 ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeLinkedChat(nil)"
}
type Alias ChannelAdminLogEventActionChangeLinkedChat
return fmt .Sprintf ("ChannelAdminLogEventActionChangeLinkedChat%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) FillFrom (from interface {
GetPrevValue () (value int64 )
GetNewValue () (value int64 )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeLinkedChat ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeLinkedChatTypeID
}
func (*ChannelAdminLogEventActionChangeLinkedChat ) TypeName () string {
return "channelAdminLogEventActionChangeLinkedChat"
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeLinkedChat" ,
ID : ChannelAdminLogEventActionChangeLinkedChatTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeLinkedChat#50c7ac8 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeLinkedChatTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeLinkedChat#50c7ac8 as nil" )
}
b .PutLong (c .PrevValue )
b .PutLong (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeLinkedChat#50c7ac8 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeLinkedChatTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLinkedChat#50c7ac8: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeLinkedChat#50c7ac8 to nil" )
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLinkedChat#50c7ac8: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLinkedChat#50c7ac8: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) GetPrevValue () (value int64 ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeLinkedChat ) GetNewValue () (value int64 ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeLocation struct {
PrevValue ChannelLocationClass
NewValue ChannelLocationClass
}
const ChannelAdminLogEventActionChangeLocationTypeID = 0xe6b76ae
func (c ChannelAdminLogEventActionChangeLocation ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeLocation {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeLocation {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeLocation {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeLocation {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeLocation {}
)
func (c *ChannelAdminLogEventActionChangeLocation ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == nil ) {
return false
}
if !(c .NewValue == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeLocation ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeLocation(nil)"
}
type Alias ChannelAdminLogEventActionChangeLocation
return fmt .Sprintf ("ChannelAdminLogEventActionChangeLocation%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeLocation ) FillFrom (from interface {
GetPrevValue () (value ChannelLocationClass )
GetNewValue () (value ChannelLocationClass )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeLocation ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeLocationTypeID
}
func (*ChannelAdminLogEventActionChangeLocation ) TypeName () string {
return "channelAdminLogEventActionChangeLocation"
}
func (c *ChannelAdminLogEventActionChangeLocation ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeLocation" ,
ID : ChannelAdminLogEventActionChangeLocationTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeLocation ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeLocation#e6b76ae as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeLocationTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeLocation ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeLocation#e6b76ae as nil" )
}
if c .PrevValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value is nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value: %w" , err )
}
if c .NewValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value is nil" )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeLocation ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeLocation#e6b76ae to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeLocationTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLocation#e6b76ae: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeLocation ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeLocation#e6b76ae to nil" )
}
{
value , err := DecodeChannelLocation (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLocation#e6b76ae: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := DecodeChannelLocation (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeLocation#e6b76ae: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeLocation ) GetPrevValue () (value ChannelLocationClass ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeLocation ) GetNewValue () (value ChannelLocationClass ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionToggleSlowMode struct {
PrevValue int
NewValue int
}
const ChannelAdminLogEventActionToggleSlowModeTypeID = 0x53909779
func (c ChannelAdminLogEventActionToggleSlowMode ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleSlowMode {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleSlowMode {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleSlowMode {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleSlowMode {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleSlowMode {}
)
func (c *ChannelAdminLogEventActionToggleSlowMode ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == 0 ) {
return false
}
if !(c .NewValue == 0 ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleSlowMode(nil)"
}
type Alias ChannelAdminLogEventActionToggleSlowMode
return fmt .Sprintf ("ChannelAdminLogEventActionToggleSlowMode%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) FillFrom (from interface {
GetPrevValue () (value int )
GetNewValue () (value int )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleSlowMode ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleSlowModeTypeID
}
func (*ChannelAdminLogEventActionToggleSlowMode ) TypeName () string {
return "channelAdminLogEventActionToggleSlowMode"
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleSlowMode" ,
ID : ChannelAdminLogEventActionToggleSlowModeTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleSlowMode#53909779 as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleSlowModeTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleSlowMode#53909779 as nil" )
}
b .PutInt (c .PrevValue )
b .PutInt (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleSlowMode#53909779 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleSlowModeTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleSlowMode#53909779: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleSlowMode#53909779 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleSlowMode#53909779: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleSlowMode#53909779: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) GetPrevValue () (value int ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionToggleSlowMode ) GetNewValue () (value int ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionStartGroupCall struct {
Call InputGroupCall
}
const ChannelAdminLogEventActionStartGroupCallTypeID = 0x23209745
func (c ChannelAdminLogEventActionStartGroupCall ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionStartGroupCall {}
_ bin .Decoder = &ChannelAdminLogEventActionStartGroupCall {}
_ bin .BareEncoder = &ChannelAdminLogEventActionStartGroupCall {}
_ bin .BareDecoder = &ChannelAdminLogEventActionStartGroupCall {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionStartGroupCall {}
)
func (c *ChannelAdminLogEventActionStartGroupCall ) Zero () bool {
if c == nil {
return true
}
if !(c .Call .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionStartGroupCall ) String () string {
if c == nil {
return "ChannelAdminLogEventActionStartGroupCall(nil)"
}
type Alias ChannelAdminLogEventActionStartGroupCall
return fmt .Sprintf ("ChannelAdminLogEventActionStartGroupCall%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionStartGroupCall ) FillFrom (from interface {
GetCall () (value InputGroupCall )
}) {
c .Call = from .GetCall ()
}
func (*ChannelAdminLogEventActionStartGroupCall ) TypeID () uint32 {
return ChannelAdminLogEventActionStartGroupCallTypeID
}
func (*ChannelAdminLogEventActionStartGroupCall ) TypeName () string {
return "channelAdminLogEventActionStartGroupCall"
}
func (c *ChannelAdminLogEventActionStartGroupCall ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionStartGroupCall" ,
ID : ChannelAdminLogEventActionStartGroupCallTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Call" ,
SchemaName : "call" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionStartGroupCall ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionStartGroupCall#23209745 as nil" )
}
b .PutID (ChannelAdminLogEventActionStartGroupCallTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionStartGroupCall ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionStartGroupCall#23209745 as nil" )
}
if err := c .Call .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionStartGroupCall#23209745: field call: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionStartGroupCall ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionStartGroupCall#23209745 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionStartGroupCallTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionStartGroupCall#23209745: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionStartGroupCall ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionStartGroupCall#23209745 to nil" )
}
{
if err := c .Call .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionStartGroupCall#23209745: field call: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionStartGroupCall ) GetCall () (value InputGroupCall ) {
if c == nil {
return
}
return c .Call
}
type ChannelAdminLogEventActionDiscardGroupCall struct {
Call InputGroupCall
}
const ChannelAdminLogEventActionDiscardGroupCallTypeID = 0xdb9f9140
func (c ChannelAdminLogEventActionDiscardGroupCall ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionDiscardGroupCall {}
_ bin .Decoder = &ChannelAdminLogEventActionDiscardGroupCall {}
_ bin .BareEncoder = &ChannelAdminLogEventActionDiscardGroupCall {}
_ bin .BareDecoder = &ChannelAdminLogEventActionDiscardGroupCall {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDiscardGroupCall {}
)
func (c *ChannelAdminLogEventActionDiscardGroupCall ) Zero () bool {
if c == nil {
return true
}
if !(c .Call .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) String () string {
if c == nil {
return "ChannelAdminLogEventActionDiscardGroupCall(nil)"
}
type Alias ChannelAdminLogEventActionDiscardGroupCall
return fmt .Sprintf ("ChannelAdminLogEventActionDiscardGroupCall%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) FillFrom (from interface {
GetCall () (value InputGroupCall )
}) {
c .Call = from .GetCall ()
}
func (*ChannelAdminLogEventActionDiscardGroupCall ) TypeID () uint32 {
return ChannelAdminLogEventActionDiscardGroupCallTypeID
}
func (*ChannelAdminLogEventActionDiscardGroupCall ) TypeName () string {
return "channelAdminLogEventActionDiscardGroupCall"
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionDiscardGroupCall" ,
ID : ChannelAdminLogEventActionDiscardGroupCallTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Call" ,
SchemaName : "call" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDiscardGroupCall#db9f9140 as nil" )
}
b .PutID (ChannelAdminLogEventActionDiscardGroupCallTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDiscardGroupCall#db9f9140 as nil" )
}
if err := c .Call .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDiscardGroupCall#db9f9140: field call: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDiscardGroupCall#db9f9140 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionDiscardGroupCallTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDiscardGroupCall#db9f9140: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDiscardGroupCall#db9f9140 to nil" )
}
{
if err := c .Call .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDiscardGroupCall#db9f9140: field call: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionDiscardGroupCall ) GetCall () (value InputGroupCall ) {
if c == nil {
return
}
return c .Call
}
type ChannelAdminLogEventActionParticipantMute struct {
Participant GroupCallParticipant
}
const ChannelAdminLogEventActionParticipantMuteTypeID = 0xf92424d2
func (c ChannelAdminLogEventActionParticipantMute ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantMute {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantMute {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantMute {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantMute {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantMute {}
)
func (c *ChannelAdminLogEventActionParticipantMute ) Zero () bool {
if c == nil {
return true
}
if !(c .Participant .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantMute ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantMute(nil)"
}
type Alias ChannelAdminLogEventActionParticipantMute
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantMute%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantMute ) FillFrom (from interface {
GetParticipant () (value GroupCallParticipant )
}) {
c .Participant = from .GetParticipant ()
}
func (*ChannelAdminLogEventActionParticipantMute ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantMuteTypeID
}
func (*ChannelAdminLogEventActionParticipantMute ) TypeName () string {
return "channelAdminLogEventActionParticipantMute"
}
func (c *ChannelAdminLogEventActionParticipantMute ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantMute" ,
ID : ChannelAdminLogEventActionParticipantMuteTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Participant" ,
SchemaName : "participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantMute ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantMuteTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantMute ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantMute#f92424d2 as nil" )
}
if err := c .Participant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantMute#f92424d2: field participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantMute ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantMute#f92424d2 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantMuteTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantMute#f92424d2: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantMute ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantMute#f92424d2 to nil" )
}
{
if err := c .Participant .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantMute#f92424d2: field participant: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantMute ) GetParticipant () (value GroupCallParticipant ) {
if c == nil {
return
}
return c .Participant
}
type ChannelAdminLogEventActionParticipantUnmute struct {
Participant GroupCallParticipant
}
const ChannelAdminLogEventActionParticipantUnmuteTypeID = 0xe64429c0
func (c ChannelAdminLogEventActionParticipantUnmute ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantUnmute {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantUnmute {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantUnmute {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantUnmute {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantUnmute {}
)
func (c *ChannelAdminLogEventActionParticipantUnmute ) Zero () bool {
if c == nil {
return true
}
if !(c .Participant .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantUnmute(nil)"
}
type Alias ChannelAdminLogEventActionParticipantUnmute
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantUnmute%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) FillFrom (from interface {
GetParticipant () (value GroupCallParticipant )
}) {
c .Participant = from .GetParticipant ()
}
func (*ChannelAdminLogEventActionParticipantUnmute ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantUnmuteTypeID
}
func (*ChannelAdminLogEventActionParticipantUnmute ) TypeName () string {
return "channelAdminLogEventActionParticipantUnmute"
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantUnmute" ,
ID : ChannelAdminLogEventActionParticipantUnmuteTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Participant" ,
SchemaName : "participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantUnmute#e64429c0 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantUnmuteTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantUnmute#e64429c0 as nil" )
}
if err := c .Participant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantUnmute#e64429c0: field participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantUnmute#e64429c0 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantUnmuteTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantUnmute#e64429c0: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantUnmute#e64429c0 to nil" )
}
{
if err := c .Participant .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantUnmute#e64429c0: field participant: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantUnmute ) GetParticipant () (value GroupCallParticipant ) {
if c == nil {
return
}
return c .Participant
}
type ChannelAdminLogEventActionToggleGroupCallSetting struct {
JoinMuted bool
}
const ChannelAdminLogEventActionToggleGroupCallSettingTypeID = 0x56d6a247
func (c ChannelAdminLogEventActionToggleGroupCallSetting ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleGroupCallSetting {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleGroupCallSetting {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleGroupCallSetting {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleGroupCallSetting {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleGroupCallSetting {}
)
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) Zero () bool {
if c == nil {
return true
}
if !(c .JoinMuted == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleGroupCallSetting(nil)"
}
type Alias ChannelAdminLogEventActionToggleGroupCallSetting
return fmt .Sprintf ("ChannelAdminLogEventActionToggleGroupCallSetting%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) FillFrom (from interface {
GetJoinMuted () (value bool )
}) {
c .JoinMuted = from .GetJoinMuted ()
}
func (*ChannelAdminLogEventActionToggleGroupCallSetting ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleGroupCallSettingTypeID
}
func (*ChannelAdminLogEventActionToggleGroupCallSetting ) TypeName () string {
return "channelAdminLogEventActionToggleGroupCallSetting"
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleGroupCallSetting" ,
ID : ChannelAdminLogEventActionToggleGroupCallSettingTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "JoinMuted" ,
SchemaName : "join_muted" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleGroupCallSettingTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 as nil" )
}
b .PutBool (c .JoinMuted )
return nil
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleGroupCallSettingTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247 to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleGroupCallSetting#56d6a247: field join_muted: %w" , err )
}
c .JoinMuted = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleGroupCallSetting ) GetJoinMuted () (value bool ) {
if c == nil {
return
}
return c .JoinMuted
}
type ChannelAdminLogEventActionParticipantJoinByInvite struct {
Flags bin .Fields
ViaChatlist bool
Invite ExportedChatInviteClass
}
const ChannelAdminLogEventActionParticipantJoinByInviteTypeID = 0xfe9fc158
func (c ChannelAdminLogEventActionParticipantJoinByInvite ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantJoinByInvite {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantJoinByInvite {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantJoinByInvite {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantJoinByInvite {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoinByInvite {}
)
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) Zero () bool {
if c == nil {
return true
}
if !(c .Flags .Zero ()) {
return false
}
if !(c .ViaChatlist == false ) {
return false
}
if !(c .Invite == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantJoinByInvite(nil)"
}
type Alias ChannelAdminLogEventActionParticipantJoinByInvite
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantJoinByInvite%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) FillFrom (from interface {
GetViaChatlist () (value bool )
GetInvite () (value ExportedChatInviteClass )
}) {
c .ViaChatlist = from .GetViaChatlist ()
c .Invite = from .GetInvite ()
}
func (*ChannelAdminLogEventActionParticipantJoinByInvite ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantJoinByInviteTypeID
}
func (*ChannelAdminLogEventActionParticipantJoinByInvite ) TypeName () string {
return "channelAdminLogEventActionParticipantJoinByInvite"
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantJoinByInvite" ,
ID : ChannelAdminLogEventActionParticipantJoinByInviteTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "ViaChatlist" ,
SchemaName : "via_chatlist" ,
Null : !c .Flags .Has (0 ),
},
{
Name : "Invite" ,
SchemaName : "invite" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) SetFlags () {
if !(c .ViaChatlist == false ) {
c .Flags .Set (0 )
}
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantJoinByInviteTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 as nil" )
}
c .SetFlags ()
if err := c .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field flags: %w" , err )
}
if c .Invite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite is nil" )
}
if err := c .Invite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantJoinByInviteTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158 to nil" )
}
{
if err := c .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field flags: %w" , err )
}
}
c .ViaChatlist = c .Flags .Has (0 )
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByInvite#fe9fc158: field invite: %w" , err )
}
c .Invite = value
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) SetViaChatlist (value bool ) {
if value {
c .Flags .Set (0 )
c .ViaChatlist = true
} else {
c .Flags .Unset (0 )
c .ViaChatlist = false
}
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) GetViaChatlist () (value bool ) {
if c == nil {
return
}
return c .Flags .Has (0 )
}
func (c *ChannelAdminLogEventActionParticipantJoinByInvite ) GetInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .Invite
}
type ChannelAdminLogEventActionExportedInviteDelete struct {
Invite ExportedChatInviteClass
}
const ChannelAdminLogEventActionExportedInviteDeleteTypeID = 0x5a50fca4
func (c ChannelAdminLogEventActionExportedInviteDelete ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionExportedInviteDelete {}
_ bin .Decoder = &ChannelAdminLogEventActionExportedInviteDelete {}
_ bin .BareEncoder = &ChannelAdminLogEventActionExportedInviteDelete {}
_ bin .BareDecoder = &ChannelAdminLogEventActionExportedInviteDelete {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteDelete {}
)
func (c *ChannelAdminLogEventActionExportedInviteDelete ) Zero () bool {
if c == nil {
return true
}
if !(c .Invite == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) String () string {
if c == nil {
return "ChannelAdminLogEventActionExportedInviteDelete(nil)"
}
type Alias ChannelAdminLogEventActionExportedInviteDelete
return fmt .Sprintf ("ChannelAdminLogEventActionExportedInviteDelete%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) FillFrom (from interface {
GetInvite () (value ExportedChatInviteClass )
}) {
c .Invite = from .GetInvite ()
}
func (*ChannelAdminLogEventActionExportedInviteDelete ) TypeID () uint32 {
return ChannelAdminLogEventActionExportedInviteDeleteTypeID
}
func (*ChannelAdminLogEventActionExportedInviteDelete ) TypeName () string {
return "channelAdminLogEventActionExportedInviteDelete"
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionExportedInviteDelete" ,
ID : ChannelAdminLogEventActionExportedInviteDeleteTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Invite" ,
SchemaName : "invite" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteDelete#5a50fca4 as nil" )
}
b .PutID (ChannelAdminLogEventActionExportedInviteDeleteTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteDelete#5a50fca4 as nil" )
}
if c .Invite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite is nil" )
}
if err := c .Invite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteDelete#5a50fca4 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionExportedInviteDeleteTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteDelete#5a50fca4: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteDelete#5a50fca4 to nil" )
}
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteDelete#5a50fca4: field invite: %w" , err )
}
c .Invite = value
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteDelete ) GetInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .Invite
}
type ChannelAdminLogEventActionExportedInviteRevoke struct {
Invite ExportedChatInviteClass
}
const ChannelAdminLogEventActionExportedInviteRevokeTypeID = 0x410a134e
func (c ChannelAdminLogEventActionExportedInviteRevoke ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionExportedInviteRevoke {}
_ bin .Decoder = &ChannelAdminLogEventActionExportedInviteRevoke {}
_ bin .BareEncoder = &ChannelAdminLogEventActionExportedInviteRevoke {}
_ bin .BareDecoder = &ChannelAdminLogEventActionExportedInviteRevoke {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteRevoke {}
)
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) Zero () bool {
if c == nil {
return true
}
if !(c .Invite == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) String () string {
if c == nil {
return "ChannelAdminLogEventActionExportedInviteRevoke(nil)"
}
type Alias ChannelAdminLogEventActionExportedInviteRevoke
return fmt .Sprintf ("ChannelAdminLogEventActionExportedInviteRevoke%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) FillFrom (from interface {
GetInvite () (value ExportedChatInviteClass )
}) {
c .Invite = from .GetInvite ()
}
func (*ChannelAdminLogEventActionExportedInviteRevoke ) TypeID () uint32 {
return ChannelAdminLogEventActionExportedInviteRevokeTypeID
}
func (*ChannelAdminLogEventActionExportedInviteRevoke ) TypeName () string {
return "channelAdminLogEventActionExportedInviteRevoke"
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionExportedInviteRevoke" ,
ID : ChannelAdminLogEventActionExportedInviteRevokeTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Invite" ,
SchemaName : "invite" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteRevoke#410a134e as nil" )
}
b .PutID (ChannelAdminLogEventActionExportedInviteRevokeTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteRevoke#410a134e as nil" )
}
if c .Invite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite is nil" )
}
if err := c .Invite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteRevoke#410a134e to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionExportedInviteRevokeTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteRevoke#410a134e: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteRevoke#410a134e to nil" )
}
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteRevoke#410a134e: field invite: %w" , err )
}
c .Invite = value
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteRevoke ) GetInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .Invite
}
type ChannelAdminLogEventActionExportedInviteEdit struct {
PrevInvite ExportedChatInviteClass
NewInvite ExportedChatInviteClass
}
const ChannelAdminLogEventActionExportedInviteEditTypeID = 0xe90ebb59
func (c ChannelAdminLogEventActionExportedInviteEdit ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionExportedInviteEdit {}
_ bin .Decoder = &ChannelAdminLogEventActionExportedInviteEdit {}
_ bin .BareEncoder = &ChannelAdminLogEventActionExportedInviteEdit {}
_ bin .BareDecoder = &ChannelAdminLogEventActionExportedInviteEdit {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionExportedInviteEdit {}
)
func (c *ChannelAdminLogEventActionExportedInviteEdit ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevInvite == nil ) {
return false
}
if !(c .NewInvite == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) String () string {
if c == nil {
return "ChannelAdminLogEventActionExportedInviteEdit(nil)"
}
type Alias ChannelAdminLogEventActionExportedInviteEdit
return fmt .Sprintf ("ChannelAdminLogEventActionExportedInviteEdit%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) FillFrom (from interface {
GetPrevInvite () (value ExportedChatInviteClass )
GetNewInvite () (value ExportedChatInviteClass )
}) {
c .PrevInvite = from .GetPrevInvite ()
c .NewInvite = from .GetNewInvite ()
}
func (*ChannelAdminLogEventActionExportedInviteEdit ) TypeID () uint32 {
return ChannelAdminLogEventActionExportedInviteEditTypeID
}
func (*ChannelAdminLogEventActionExportedInviteEdit ) TypeName () string {
return "channelAdminLogEventActionExportedInviteEdit"
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionExportedInviteEdit" ,
ID : ChannelAdminLogEventActionExportedInviteEditTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevInvite" ,
SchemaName : "prev_invite" ,
},
{
Name : "NewInvite" ,
SchemaName : "new_invite" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteEdit#e90ebb59 as nil" )
}
b .PutID (ChannelAdminLogEventActionExportedInviteEditTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionExportedInviteEdit#e90ebb59 as nil" )
}
if c .PrevInvite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite is nil" )
}
if err := c .PrevInvite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite: %w" , err )
}
if c .NewInvite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite is nil" )
}
if err := c .NewInvite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteEdit#e90ebb59 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionExportedInviteEditTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteEdit#e90ebb59: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionExportedInviteEdit#e90ebb59 to nil" )
}
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field prev_invite: %w" , err )
}
c .PrevInvite = value
}
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionExportedInviteEdit#e90ebb59: field new_invite: %w" , err )
}
c .NewInvite = value
}
return nil
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) GetPrevInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .PrevInvite
}
func (c *ChannelAdminLogEventActionExportedInviteEdit ) GetNewInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .NewInvite
}
type ChannelAdminLogEventActionParticipantVolume struct {
Participant GroupCallParticipant
}
const ChannelAdminLogEventActionParticipantVolumeTypeID = 0x3e7f6847
func (c ChannelAdminLogEventActionParticipantVolume ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantVolume {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantVolume {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantVolume {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantVolume {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantVolume {}
)
func (c *ChannelAdminLogEventActionParticipantVolume ) Zero () bool {
if c == nil {
return true
}
if !(c .Participant .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantVolume ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantVolume(nil)"
}
type Alias ChannelAdminLogEventActionParticipantVolume
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantVolume%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantVolume ) FillFrom (from interface {
GetParticipant () (value GroupCallParticipant )
}) {
c .Participant = from .GetParticipant ()
}
func (*ChannelAdminLogEventActionParticipantVolume ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantVolumeTypeID
}
func (*ChannelAdminLogEventActionParticipantVolume ) TypeName () string {
return "channelAdminLogEventActionParticipantVolume"
}
func (c *ChannelAdminLogEventActionParticipantVolume ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantVolume" ,
ID : ChannelAdminLogEventActionParticipantVolumeTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Participant" ,
SchemaName : "participant" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantVolume ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantVolume#3e7f6847 as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantVolumeTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantVolume ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantVolume#3e7f6847 as nil" )
}
if err := c .Participant .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantVolume#3e7f6847: field participant: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantVolume ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantVolume#3e7f6847 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantVolumeTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantVolume#3e7f6847: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantVolume ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantVolume#3e7f6847 to nil" )
}
{
if err := c .Participant .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantVolume#3e7f6847: field participant: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantVolume ) GetParticipant () (value GroupCallParticipant ) {
if c == nil {
return
}
return c .Participant
}
type ChannelAdminLogEventActionChangeHistoryTTL struct {
PrevValue int
NewValue int
}
const ChannelAdminLogEventActionChangeHistoryTTLTypeID = 0x6e941a38
func (c ChannelAdminLogEventActionChangeHistoryTTL ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeHistoryTTL {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeHistoryTTL {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeHistoryTTL {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeHistoryTTL {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeHistoryTTL {}
)
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == 0 ) {
return false
}
if !(c .NewValue == 0 ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeHistoryTTL(nil)"
}
type Alias ChannelAdminLogEventActionChangeHistoryTTL
return fmt .Sprintf ("ChannelAdminLogEventActionChangeHistoryTTL%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) FillFrom (from interface {
GetPrevValue () (value int )
GetNewValue () (value int )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeHistoryTTL ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeHistoryTTLTypeID
}
func (*ChannelAdminLogEventActionChangeHistoryTTL ) TypeName () string {
return "channelAdminLogEventActionChangeHistoryTTL"
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeHistoryTTL" ,
ID : ChannelAdminLogEventActionChangeHistoryTTLTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeHistoryTTL#6e941a38 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeHistoryTTLTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeHistoryTTL#6e941a38 as nil" )
}
b .PutInt (c .PrevValue )
b .PutInt (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeHistoryTTL#6e941a38 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeHistoryTTLTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeHistoryTTL#6e941a38: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeHistoryTTL#6e941a38 to nil" )
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeHistoryTTL#6e941a38: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := b .Int ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeHistoryTTL#6e941a38: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) GetPrevValue () (value int ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeHistoryTTL ) GetNewValue () (value int ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionParticipantJoinByRequest struct {
Invite ExportedChatInviteClass
ApprovedBy int64
}
const ChannelAdminLogEventActionParticipantJoinByRequestTypeID = 0xafb6144a
func (c ChannelAdminLogEventActionParticipantJoinByRequest ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionParticipantJoinByRequest {}
_ bin .Decoder = &ChannelAdminLogEventActionParticipantJoinByRequest {}
_ bin .BareEncoder = &ChannelAdminLogEventActionParticipantJoinByRequest {}
_ bin .BareDecoder = &ChannelAdminLogEventActionParticipantJoinByRequest {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionParticipantJoinByRequest {}
)
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) Zero () bool {
if c == nil {
return true
}
if !(c .Invite == nil ) {
return false
}
if !(c .ApprovedBy == 0 ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) String () string {
if c == nil {
return "ChannelAdminLogEventActionParticipantJoinByRequest(nil)"
}
type Alias ChannelAdminLogEventActionParticipantJoinByRequest
return fmt .Sprintf ("ChannelAdminLogEventActionParticipantJoinByRequest%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) FillFrom (from interface {
GetInvite () (value ExportedChatInviteClass )
GetApprovedBy () (value int64 )
}) {
c .Invite = from .GetInvite ()
c .ApprovedBy = from .GetApprovedBy ()
}
func (*ChannelAdminLogEventActionParticipantJoinByRequest ) TypeID () uint32 {
return ChannelAdminLogEventActionParticipantJoinByRequestTypeID
}
func (*ChannelAdminLogEventActionParticipantJoinByRequest ) TypeName () string {
return "channelAdminLogEventActionParticipantJoinByRequest"
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionParticipantJoinByRequest" ,
ID : ChannelAdminLogEventActionParticipantJoinByRequestTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Invite" ,
SchemaName : "invite" ,
},
{
Name : "ApprovedBy" ,
SchemaName : "approved_by" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a as nil" )
}
b .PutID (ChannelAdminLogEventActionParticipantJoinByRequestTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a as nil" )
}
if c .Invite == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite is nil" )
}
if err := c .Invite .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite: %w" , err )
}
b .PutLong (c .ApprovedBy )
return nil
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionParticipantJoinByRequestTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a to nil" )
}
{
value , err := DecodeExportedChatInvite (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field invite: %w" , err )
}
c .Invite = value
}
{
value , err := b .Long ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionParticipantJoinByRequest#afb6144a: field approved_by: %w" , err )
}
c .ApprovedBy = value
}
return nil
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) GetInvite () (value ExportedChatInviteClass ) {
if c == nil {
return
}
return c .Invite
}
func (c *ChannelAdminLogEventActionParticipantJoinByRequest ) GetApprovedBy () (value int64 ) {
if c == nil {
return
}
return c .ApprovedBy
}
type ChannelAdminLogEventActionToggleNoForwards struct {
NewValue bool
}
const ChannelAdminLogEventActionToggleNoForwardsTypeID = 0xcb2ac766
func (c ChannelAdminLogEventActionToggleNoForwards ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleNoForwards {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleNoForwards {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleNoForwards {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleNoForwards {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleNoForwards {}
)
func (c *ChannelAdminLogEventActionToggleNoForwards ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleNoForwards(nil)"
}
type Alias ChannelAdminLogEventActionToggleNoForwards
return fmt .Sprintf ("ChannelAdminLogEventActionToggleNoForwards%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleNoForwards ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleNoForwardsTypeID
}
func (*ChannelAdminLogEventActionToggleNoForwards ) TypeName () string {
return "channelAdminLogEventActionToggleNoForwards"
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleNoForwards" ,
ID : ChannelAdminLogEventActionToggleNoForwardsTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleNoForwards#cb2ac766 as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleNoForwardsTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleNoForwards#cb2ac766 as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleNoForwards#cb2ac766 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleNoForwardsTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleNoForwards#cb2ac766: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleNoForwards#cb2ac766 to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleNoForwards#cb2ac766: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleNoForwards ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionSendMessage struct {
Message MessageClass
}
const ChannelAdminLogEventActionSendMessageTypeID = 0x278f2868
func (c ChannelAdminLogEventActionSendMessage ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionSendMessage {}
_ bin .Decoder = &ChannelAdminLogEventActionSendMessage {}
_ bin .BareEncoder = &ChannelAdminLogEventActionSendMessage {}
_ bin .BareDecoder = &ChannelAdminLogEventActionSendMessage {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionSendMessage {}
)
func (c *ChannelAdminLogEventActionSendMessage ) Zero () bool {
if c == nil {
return true
}
if !(c .Message == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionSendMessage ) String () string {
if c == nil {
return "ChannelAdminLogEventActionSendMessage(nil)"
}
type Alias ChannelAdminLogEventActionSendMessage
return fmt .Sprintf ("ChannelAdminLogEventActionSendMessage%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionSendMessage ) FillFrom (from interface {
GetMessage () (value MessageClass )
}) {
c .Message = from .GetMessage ()
}
func (*ChannelAdminLogEventActionSendMessage ) TypeID () uint32 {
return ChannelAdminLogEventActionSendMessageTypeID
}
func (*ChannelAdminLogEventActionSendMessage ) TypeName () string {
return "channelAdminLogEventActionSendMessage"
}
func (c *ChannelAdminLogEventActionSendMessage ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionSendMessage" ,
ID : ChannelAdminLogEventActionSendMessageTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Message" ,
SchemaName : "message" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionSendMessage ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionSendMessage#278f2868 as nil" )
}
b .PutID (ChannelAdminLogEventActionSendMessageTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionSendMessage ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionSendMessage#278f2868 as nil" )
}
if c .Message == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionSendMessage#278f2868: field message is nil" )
}
if err := c .Message .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionSendMessage#278f2868: field message: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionSendMessage ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionSendMessage#278f2868 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionSendMessageTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionSendMessage#278f2868: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionSendMessage ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionSendMessage#278f2868 to nil" )
}
{
value , err := DecodeMessage (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionSendMessage#278f2868: field message: %w" , err )
}
c .Message = value
}
return nil
}
func (c *ChannelAdminLogEventActionSendMessage ) GetMessage () (value MessageClass ) {
if c == nil {
return
}
return c .Message
}
type ChannelAdminLogEventActionChangeAvailableReactions struct {
PrevValue ChatReactionsClass
NewValue ChatReactionsClass
}
const ChannelAdminLogEventActionChangeAvailableReactionsTypeID = 0xbe4e0ef8
func (c ChannelAdminLogEventActionChangeAvailableReactions ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeAvailableReactions {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeAvailableReactions {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeAvailableReactions {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeAvailableReactions {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeAvailableReactions {}
)
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == nil ) {
return false
}
if !(c .NewValue == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeAvailableReactions(nil)"
}
type Alias ChannelAdminLogEventActionChangeAvailableReactions
return fmt .Sprintf ("ChannelAdminLogEventActionChangeAvailableReactions%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) FillFrom (from interface {
GetPrevValue () (value ChatReactionsClass )
GetNewValue () (value ChatReactionsClass )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeAvailableReactions ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeAvailableReactionsTypeID
}
func (*ChannelAdminLogEventActionChangeAvailableReactions ) TypeName () string {
return "channelAdminLogEventActionChangeAvailableReactions"
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeAvailableReactions" ,
ID : ChannelAdminLogEventActionChangeAvailableReactionsTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeAvailableReactionsTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 as nil" )
}
if c .PrevValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value is nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value: %w" , err )
}
if c .NewValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value is nil" )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeAvailableReactionsTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8 to nil" )
}
{
value , err := DecodeChatReactions (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := DecodeChatReactions (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeAvailableReactions#be4e0ef8: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) GetPrevValue () (value ChatReactionsClass ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeAvailableReactions ) GetNewValue () (value ChatReactionsClass ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeUsernames struct {
PrevValue []string
NewValue []string
}
const ChannelAdminLogEventActionChangeUsernamesTypeID = 0xf04fb3a9
func (c ChannelAdminLogEventActionChangeUsernames ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeUsernames {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeUsernames {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeUsernames {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeUsernames {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeUsernames {}
)
func (c *ChannelAdminLogEventActionChangeUsernames ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == nil ) {
return false
}
if !(c .NewValue == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeUsernames ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeUsernames(nil)"
}
type Alias ChannelAdminLogEventActionChangeUsernames
return fmt .Sprintf ("ChannelAdminLogEventActionChangeUsernames%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeUsernames ) FillFrom (from interface {
GetPrevValue () (value []string )
GetNewValue () (value []string )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeUsernames ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeUsernamesTypeID
}
func (*ChannelAdminLogEventActionChangeUsernames ) TypeName () string {
return "channelAdminLogEventActionChangeUsernames"
}
func (c *ChannelAdminLogEventActionChangeUsernames ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeUsernames" ,
ID : ChannelAdminLogEventActionChangeUsernamesTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeUsernames ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeUsernames#f04fb3a9 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeUsernamesTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeUsernames ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeUsernames#f04fb3a9 as nil" )
}
b .PutVectorHeader (len (c .PrevValue ))
for _ , v := range c .PrevValue {
b .PutString (v )
}
b .PutVectorHeader (len (c .NewValue ))
for _ , v := range c .NewValue {
b .PutString (v )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeUsernames ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeUsernames#f04fb3a9 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeUsernamesTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeUsernames ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeUsernames#f04fb3a9 to nil" )
}
{
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field prev_value: %w" , err )
}
if headerLen > 0 {
c .PrevValue = make ([]string , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field prev_value: %w" , err )
}
c .PrevValue = append (c .PrevValue , value )
}
}
{
headerLen , err := b .VectorHeader ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field new_value: %w" , err )
}
if headerLen > 0 {
c .NewValue = make ([]string , 0 , headerLen %bin .PreallocateLimit )
}
for idx := 0 ; idx < headerLen ; idx ++ {
value , err := b .String ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeUsernames#f04fb3a9: field new_value: %w" , err )
}
c .NewValue = append (c .NewValue , value )
}
}
return nil
}
func (c *ChannelAdminLogEventActionChangeUsernames ) GetPrevValue () (value []string ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeUsernames ) GetNewValue () (value []string ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionToggleForum struct {
NewValue bool
}
const ChannelAdminLogEventActionToggleForumTypeID = 0x2cc6383
func (c ChannelAdminLogEventActionToggleForum ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleForum {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleForum {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleForum {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleForum {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleForum {}
)
func (c *ChannelAdminLogEventActionToggleForum ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleForum ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleForum(nil)"
}
type Alias ChannelAdminLogEventActionToggleForum
return fmt .Sprintf ("ChannelAdminLogEventActionToggleForum%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleForum ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleForum ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleForumTypeID
}
func (*ChannelAdminLogEventActionToggleForum ) TypeName () string {
return "channelAdminLogEventActionToggleForum"
}
func (c *ChannelAdminLogEventActionToggleForum ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleForum" ,
ID : ChannelAdminLogEventActionToggleForumTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleForum ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleForum#2cc6383 as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleForumTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleForum ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleForum#2cc6383 as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleForum ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleForum#2cc6383 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleForumTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleForum#2cc6383: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleForum ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleForum#2cc6383 to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleForum#2cc6383: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleForum ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionCreateTopic struct {
Topic ForumTopicClass
}
const ChannelAdminLogEventActionCreateTopicTypeID = 0x58707d28
func (c ChannelAdminLogEventActionCreateTopic ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionCreateTopic {}
_ bin .Decoder = &ChannelAdminLogEventActionCreateTopic {}
_ bin .BareEncoder = &ChannelAdminLogEventActionCreateTopic {}
_ bin .BareDecoder = &ChannelAdminLogEventActionCreateTopic {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionCreateTopic {}
)
func (c *ChannelAdminLogEventActionCreateTopic ) Zero () bool {
if c == nil {
return true
}
if !(c .Topic == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionCreateTopic ) String () string {
if c == nil {
return "ChannelAdminLogEventActionCreateTopic(nil)"
}
type Alias ChannelAdminLogEventActionCreateTopic
return fmt .Sprintf ("ChannelAdminLogEventActionCreateTopic%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionCreateTopic ) FillFrom (from interface {
GetTopic () (value ForumTopicClass )
}) {
c .Topic = from .GetTopic ()
}
func (*ChannelAdminLogEventActionCreateTopic ) TypeID () uint32 {
return ChannelAdminLogEventActionCreateTopicTypeID
}
func (*ChannelAdminLogEventActionCreateTopic ) TypeName () string {
return "channelAdminLogEventActionCreateTopic"
}
func (c *ChannelAdminLogEventActionCreateTopic ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionCreateTopic" ,
ID : ChannelAdminLogEventActionCreateTopicTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Topic" ,
SchemaName : "topic" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionCreateTopic ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionCreateTopic#58707d28 as nil" )
}
b .PutID (ChannelAdminLogEventActionCreateTopicTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionCreateTopic ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionCreateTopic#58707d28 as nil" )
}
if c .Topic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionCreateTopic#58707d28: field topic is nil" )
}
if err := c .Topic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionCreateTopic#58707d28: field topic: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionCreateTopic ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionCreateTopic#58707d28 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionCreateTopicTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionCreateTopic#58707d28: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionCreateTopic ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionCreateTopic#58707d28 to nil" )
}
{
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionCreateTopic#58707d28: field topic: %w" , err )
}
c .Topic = value
}
return nil
}
func (c *ChannelAdminLogEventActionCreateTopic ) GetTopic () (value ForumTopicClass ) {
if c == nil {
return
}
return c .Topic
}
type ChannelAdminLogEventActionEditTopic struct {
PrevTopic ForumTopicClass
NewTopic ForumTopicClass
}
const ChannelAdminLogEventActionEditTopicTypeID = 0xf06fe208
func (c ChannelAdminLogEventActionEditTopic ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionEditTopic {}
_ bin .Decoder = &ChannelAdminLogEventActionEditTopic {}
_ bin .BareEncoder = &ChannelAdminLogEventActionEditTopic {}
_ bin .BareDecoder = &ChannelAdminLogEventActionEditTopic {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionEditTopic {}
)
func (c *ChannelAdminLogEventActionEditTopic ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevTopic == nil ) {
return false
}
if !(c .NewTopic == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionEditTopic ) String () string {
if c == nil {
return "ChannelAdminLogEventActionEditTopic(nil)"
}
type Alias ChannelAdminLogEventActionEditTopic
return fmt .Sprintf ("ChannelAdminLogEventActionEditTopic%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionEditTopic ) FillFrom (from interface {
GetPrevTopic () (value ForumTopicClass )
GetNewTopic () (value ForumTopicClass )
}) {
c .PrevTopic = from .GetPrevTopic ()
c .NewTopic = from .GetNewTopic ()
}
func (*ChannelAdminLogEventActionEditTopic ) TypeID () uint32 {
return ChannelAdminLogEventActionEditTopicTypeID
}
func (*ChannelAdminLogEventActionEditTopic ) TypeName () string {
return "channelAdminLogEventActionEditTopic"
}
func (c *ChannelAdminLogEventActionEditTopic ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionEditTopic" ,
ID : ChannelAdminLogEventActionEditTopicTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevTopic" ,
SchemaName : "prev_topic" ,
},
{
Name : "NewTopic" ,
SchemaName : "new_topic" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionEditTopic ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionEditTopic#f06fe208 as nil" )
}
b .PutID (ChannelAdminLogEventActionEditTopicTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionEditTopic ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionEditTopic#f06fe208 as nil" )
}
if c .PrevTopic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic is nil" )
}
if err := c .PrevTopic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic: %w" , err )
}
if c .NewTopic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field new_topic is nil" )
}
if err := c .NewTopic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionEditTopic#f06fe208: field new_topic: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionEditTopic ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionEditTopic#f06fe208 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionEditTopicTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditTopic#f06fe208: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionEditTopic ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionEditTopic#f06fe208 to nil" )
}
{
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditTopic#f06fe208: field prev_topic: %w" , err )
}
c .PrevTopic = value
}
{
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionEditTopic#f06fe208: field new_topic: %w" , err )
}
c .NewTopic = value
}
return nil
}
func (c *ChannelAdminLogEventActionEditTopic ) GetPrevTopic () (value ForumTopicClass ) {
if c == nil {
return
}
return c .PrevTopic
}
func (c *ChannelAdminLogEventActionEditTopic ) GetNewTopic () (value ForumTopicClass ) {
if c == nil {
return
}
return c .NewTopic
}
type ChannelAdminLogEventActionDeleteTopic struct {
Topic ForumTopicClass
}
const ChannelAdminLogEventActionDeleteTopicTypeID = 0xae168909
func (c ChannelAdminLogEventActionDeleteTopic ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionDeleteTopic {}
_ bin .Decoder = &ChannelAdminLogEventActionDeleteTopic {}
_ bin .BareEncoder = &ChannelAdminLogEventActionDeleteTopic {}
_ bin .BareDecoder = &ChannelAdminLogEventActionDeleteTopic {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionDeleteTopic {}
)
func (c *ChannelAdminLogEventActionDeleteTopic ) Zero () bool {
if c == nil {
return true
}
if !(c .Topic == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionDeleteTopic ) String () string {
if c == nil {
return "ChannelAdminLogEventActionDeleteTopic(nil)"
}
type Alias ChannelAdminLogEventActionDeleteTopic
return fmt .Sprintf ("ChannelAdminLogEventActionDeleteTopic%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionDeleteTopic ) FillFrom (from interface {
GetTopic () (value ForumTopicClass )
}) {
c .Topic = from .GetTopic ()
}
func (*ChannelAdminLogEventActionDeleteTopic ) TypeID () uint32 {
return ChannelAdminLogEventActionDeleteTopicTypeID
}
func (*ChannelAdminLogEventActionDeleteTopic ) TypeName () string {
return "channelAdminLogEventActionDeleteTopic"
}
func (c *ChannelAdminLogEventActionDeleteTopic ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionDeleteTopic" ,
ID : ChannelAdminLogEventActionDeleteTopicTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "Topic" ,
SchemaName : "topic" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionDeleteTopic ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDeleteTopic#ae168909 as nil" )
}
b .PutID (ChannelAdminLogEventActionDeleteTopicTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionDeleteTopic ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionDeleteTopic#ae168909 as nil" )
}
if c .Topic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDeleteTopic#ae168909: field topic is nil" )
}
if err := c .Topic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionDeleteTopic#ae168909: field topic: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionDeleteTopic ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDeleteTopic#ae168909 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionDeleteTopicTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDeleteTopic#ae168909: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionDeleteTopic ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionDeleteTopic#ae168909 to nil" )
}
{
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionDeleteTopic#ae168909: field topic: %w" , err )
}
c .Topic = value
}
return nil
}
func (c *ChannelAdminLogEventActionDeleteTopic ) GetTopic () (value ForumTopicClass ) {
if c == nil {
return
}
return c .Topic
}
type ChannelAdminLogEventActionPinTopic struct {
Flags bin .Fields
PrevTopic ForumTopicClass
NewTopic ForumTopicClass
}
const ChannelAdminLogEventActionPinTopicTypeID = 0x5d8d353b
func (c ChannelAdminLogEventActionPinTopic ) construct () ChannelAdminLogEventActionClass { return &c }
var (
_ bin .Encoder = &ChannelAdminLogEventActionPinTopic {}
_ bin .Decoder = &ChannelAdminLogEventActionPinTopic {}
_ bin .BareEncoder = &ChannelAdminLogEventActionPinTopic {}
_ bin .BareDecoder = &ChannelAdminLogEventActionPinTopic {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionPinTopic {}
)
func (c *ChannelAdminLogEventActionPinTopic ) Zero () bool {
if c == nil {
return true
}
if !(c .Flags .Zero ()) {
return false
}
if !(c .PrevTopic == nil ) {
return false
}
if !(c .NewTopic == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionPinTopic ) String () string {
if c == nil {
return "ChannelAdminLogEventActionPinTopic(nil)"
}
type Alias ChannelAdminLogEventActionPinTopic
return fmt .Sprintf ("ChannelAdminLogEventActionPinTopic%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionPinTopic ) FillFrom (from interface {
GetPrevTopic () (value ForumTopicClass , ok bool )
GetNewTopic () (value ForumTopicClass , ok bool )
}) {
if val , ok := from .GetPrevTopic (); ok {
c .PrevTopic = val
}
if val , ok := from .GetNewTopic (); ok {
c .NewTopic = val
}
}
func (*ChannelAdminLogEventActionPinTopic ) TypeID () uint32 {
return ChannelAdminLogEventActionPinTopicTypeID
}
func (*ChannelAdminLogEventActionPinTopic ) TypeName () string {
return "channelAdminLogEventActionPinTopic"
}
func (c *ChannelAdminLogEventActionPinTopic ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionPinTopic" ,
ID : ChannelAdminLogEventActionPinTopicTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevTopic" ,
SchemaName : "prev_topic" ,
Null : !c .Flags .Has (0 ),
},
{
Name : "NewTopic" ,
SchemaName : "new_topic" ,
Null : !c .Flags .Has (1 ),
},
}
return typ
}
func (c *ChannelAdminLogEventActionPinTopic ) SetFlags () {
if !(c .PrevTopic == nil ) {
c .Flags .Set (0 )
}
if !(c .NewTopic == nil ) {
c .Flags .Set (1 )
}
}
func (c *ChannelAdminLogEventActionPinTopic ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionPinTopic#5d8d353b as nil" )
}
b .PutID (ChannelAdminLogEventActionPinTopicTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionPinTopic ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionPinTopic#5d8d353b as nil" )
}
c .SetFlags ()
if err := c .Flags .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field flags: %w" , err )
}
if c .Flags .Has (0 ) {
if c .PrevTopic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic is nil" )
}
if err := c .PrevTopic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic: %w" , err )
}
}
if c .Flags .Has (1 ) {
if c .NewTopic == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic is nil" )
}
if err := c .NewTopic .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionPinTopic ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionPinTopic#5d8d353b to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionPinTopicTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionPinTopic ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionPinTopic#5d8d353b to nil" )
}
{
if err := c .Flags .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field flags: %w" , err )
}
}
if c .Flags .Has (0 ) {
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field prev_topic: %w" , err )
}
c .PrevTopic = value
}
if c .Flags .Has (1 ) {
value , err := DecodeForumTopic (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionPinTopic#5d8d353b: field new_topic: %w" , err )
}
c .NewTopic = value
}
return nil
}
func (c *ChannelAdminLogEventActionPinTopic ) SetPrevTopic (value ForumTopicClass ) {
c .Flags .Set (0 )
c .PrevTopic = value
}
func (c *ChannelAdminLogEventActionPinTopic ) GetPrevTopic () (value ForumTopicClass , ok bool ) {
if c == nil {
return
}
if !c .Flags .Has (0 ) {
return value , false
}
return c .PrevTopic , true
}
func (c *ChannelAdminLogEventActionPinTopic ) SetNewTopic (value ForumTopicClass ) {
c .Flags .Set (1 )
c .NewTopic = value
}
func (c *ChannelAdminLogEventActionPinTopic ) GetNewTopic () (value ForumTopicClass , ok bool ) {
if c == nil {
return
}
if !c .Flags .Has (1 ) {
return value , false
}
return c .NewTopic , true
}
type ChannelAdminLogEventActionToggleAntiSpam struct {
NewValue bool
}
const ChannelAdminLogEventActionToggleAntiSpamTypeID = 0x64f36dfc
func (c ChannelAdminLogEventActionToggleAntiSpam ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionToggleAntiSpam {}
_ bin .Decoder = &ChannelAdminLogEventActionToggleAntiSpam {}
_ bin .BareEncoder = &ChannelAdminLogEventActionToggleAntiSpam {}
_ bin .BareDecoder = &ChannelAdminLogEventActionToggleAntiSpam {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionToggleAntiSpam {}
)
func (c *ChannelAdminLogEventActionToggleAntiSpam ) Zero () bool {
if c == nil {
return true
}
if !(c .NewValue == false ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) String () string {
if c == nil {
return "ChannelAdminLogEventActionToggleAntiSpam(nil)"
}
type Alias ChannelAdminLogEventActionToggleAntiSpam
return fmt .Sprintf ("ChannelAdminLogEventActionToggleAntiSpam%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) FillFrom (from interface {
GetNewValue () (value bool )
}) {
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionToggleAntiSpam ) TypeID () uint32 {
return ChannelAdminLogEventActionToggleAntiSpamTypeID
}
func (*ChannelAdminLogEventActionToggleAntiSpam ) TypeName () string {
return "channelAdminLogEventActionToggleAntiSpam"
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionToggleAntiSpam" ,
ID : ChannelAdminLogEventActionToggleAntiSpamTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleAntiSpam#64f36dfc as nil" )
}
b .PutID (ChannelAdminLogEventActionToggleAntiSpamTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionToggleAntiSpam#64f36dfc as nil" )
}
b .PutBool (c .NewValue )
return nil
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleAntiSpam#64f36dfc to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionToggleAntiSpamTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleAntiSpam#64f36dfc: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionToggleAntiSpam#64f36dfc to nil" )
}
{
value , err := b .Bool ()
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionToggleAntiSpam#64f36dfc: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionToggleAntiSpam ) GetNewValue () (value bool ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangePeerColor struct {
PrevValue PeerColor
NewValue PeerColor
}
const ChannelAdminLogEventActionChangePeerColorTypeID = 0x5796e780
func (c ChannelAdminLogEventActionChangePeerColor ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangePeerColor {}
_ bin .Decoder = &ChannelAdminLogEventActionChangePeerColor {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangePeerColor {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangePeerColor {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangePeerColor {}
)
func (c *ChannelAdminLogEventActionChangePeerColor ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue .Zero ()) {
return false
}
if !(c .NewValue .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangePeerColor ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangePeerColor(nil)"
}
type Alias ChannelAdminLogEventActionChangePeerColor
return fmt .Sprintf ("ChannelAdminLogEventActionChangePeerColor%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangePeerColor ) FillFrom (from interface {
GetPrevValue () (value PeerColor )
GetNewValue () (value PeerColor )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangePeerColor ) TypeID () uint32 {
return ChannelAdminLogEventActionChangePeerColorTypeID
}
func (*ChannelAdminLogEventActionChangePeerColor ) TypeName () string {
return "channelAdminLogEventActionChangePeerColor"
}
func (c *ChannelAdminLogEventActionChangePeerColor ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangePeerColor" ,
ID : ChannelAdminLogEventActionChangePeerColorTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangePeerColor ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangePeerColor#5796e780 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangePeerColorTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangePeerColor ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangePeerColor#5796e780 as nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePeerColor#5796e780: field prev_value: %w" , err )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangePeerColor#5796e780: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangePeerColor ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangePeerColor#5796e780 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangePeerColorTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePeerColor#5796e780: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangePeerColor ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangePeerColor#5796e780 to nil" )
}
{
if err := c .PrevValue .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePeerColor#5796e780: field prev_value: %w" , err )
}
}
{
if err := c .NewValue .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangePeerColor#5796e780: field new_value: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionChangePeerColor ) GetPrevValue () (value PeerColor ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangePeerColor ) GetNewValue () (value PeerColor ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeProfilePeerColor struct {
PrevValue PeerColor
NewValue PeerColor
}
const ChannelAdminLogEventActionChangeProfilePeerColorTypeID = 0x5e477b25
func (c ChannelAdminLogEventActionChangeProfilePeerColor ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeProfilePeerColor {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeProfilePeerColor {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeProfilePeerColor {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeProfilePeerColor {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeProfilePeerColor {}
)
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue .Zero ()) {
return false
}
if !(c .NewValue .Zero ()) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeProfilePeerColor(nil)"
}
type Alias ChannelAdminLogEventActionChangeProfilePeerColor
return fmt .Sprintf ("ChannelAdminLogEventActionChangeProfilePeerColor%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) FillFrom (from interface {
GetPrevValue () (value PeerColor )
GetNewValue () (value PeerColor )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeProfilePeerColor ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeProfilePeerColorTypeID
}
func (*ChannelAdminLogEventActionChangeProfilePeerColor ) TypeName () string {
return "channelAdminLogEventActionChangeProfilePeerColor"
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeProfilePeerColor" ,
ID : ChannelAdminLogEventActionChangeProfilePeerColorTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeProfilePeerColorTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 as nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field prev_value: %w" , err )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeProfilePeerColorTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25 to nil" )
}
{
if err := c .PrevValue .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field prev_value: %w" , err )
}
}
{
if err := c .NewValue .Decode (b ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeProfilePeerColor#5e477b25: field new_value: %w" , err )
}
}
return nil
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) GetPrevValue () (value PeerColor ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeProfilePeerColor ) GetNewValue () (value PeerColor ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeWallpaper struct {
PrevValue WallPaperClass
NewValue WallPaperClass
}
const ChannelAdminLogEventActionChangeWallpaperTypeID = 0x31bb5d52
func (c ChannelAdminLogEventActionChangeWallpaper ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeWallpaper {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeWallpaper {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeWallpaper {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeWallpaper {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeWallpaper {}
)
func (c *ChannelAdminLogEventActionChangeWallpaper ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == nil ) {
return false
}
if !(c .NewValue == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeWallpaper(nil)"
}
type Alias ChannelAdminLogEventActionChangeWallpaper
return fmt .Sprintf ("ChannelAdminLogEventActionChangeWallpaper%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) FillFrom (from interface {
GetPrevValue () (value WallPaperClass )
GetNewValue () (value WallPaperClass )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeWallpaper ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeWallpaperTypeID
}
func (*ChannelAdminLogEventActionChangeWallpaper ) TypeName () string {
return "channelAdminLogEventActionChangeWallpaper"
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeWallpaper" ,
ID : ChannelAdminLogEventActionChangeWallpaperTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeWallpaper#31bb5d52 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeWallpaperTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeWallpaper#31bb5d52 as nil" )
}
if c .PrevValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value is nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value: %w" , err )
}
if c .NewValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value is nil" )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeWallpaper#31bb5d52 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeWallpaperTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeWallpaper#31bb5d52: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeWallpaper#31bb5d52 to nil" )
}
{
value , err := DecodeWallPaper (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeWallpaper#31bb5d52: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := DecodeWallPaper (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeWallpaper#31bb5d52: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) GetPrevValue () (value WallPaperClass ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeWallpaper ) GetNewValue () (value WallPaperClass ) {
if c == nil {
return
}
return c .NewValue
}
type ChannelAdminLogEventActionChangeEmojiStatus struct {
PrevValue EmojiStatusClass
NewValue EmojiStatusClass
}
const ChannelAdminLogEventActionChangeEmojiStatusTypeID = 0x3ea9feb1
func (c ChannelAdminLogEventActionChangeEmojiStatus ) construct () ChannelAdminLogEventActionClass {
return &c
}
var (
_ bin .Encoder = &ChannelAdminLogEventActionChangeEmojiStatus {}
_ bin .Decoder = &ChannelAdminLogEventActionChangeEmojiStatus {}
_ bin .BareEncoder = &ChannelAdminLogEventActionChangeEmojiStatus {}
_ bin .BareDecoder = &ChannelAdminLogEventActionChangeEmojiStatus {}
_ ChannelAdminLogEventActionClass = &ChannelAdminLogEventActionChangeEmojiStatus {}
)
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) Zero () bool {
if c == nil {
return true
}
if !(c .PrevValue == nil ) {
return false
}
if !(c .NewValue == nil ) {
return false
}
return true
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) String () string {
if c == nil {
return "ChannelAdminLogEventActionChangeEmojiStatus(nil)"
}
type Alias ChannelAdminLogEventActionChangeEmojiStatus
return fmt .Sprintf ("ChannelAdminLogEventActionChangeEmojiStatus%+v" , Alias (*c ))
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) FillFrom (from interface {
GetPrevValue () (value EmojiStatusClass )
GetNewValue () (value EmojiStatusClass )
}) {
c .PrevValue = from .GetPrevValue ()
c .NewValue = from .GetNewValue ()
}
func (*ChannelAdminLogEventActionChangeEmojiStatus ) TypeID () uint32 {
return ChannelAdminLogEventActionChangeEmojiStatusTypeID
}
func (*ChannelAdminLogEventActionChangeEmojiStatus ) TypeName () string {
return "channelAdminLogEventActionChangeEmojiStatus"
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) TypeInfo () tdp .Type {
typ := tdp .Type {
Name : "channelAdminLogEventActionChangeEmojiStatus" ,
ID : ChannelAdminLogEventActionChangeEmojiStatusTypeID ,
}
if c == nil {
typ .Null = true
return typ
}
typ .Fields = []tdp .Field {
{
Name : "PrevValue" ,
SchemaName : "prev_value" ,
},
{
Name : "NewValue" ,
SchemaName : "new_value" ,
},
}
return typ
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) Encode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 as nil" )
}
b .PutID (ChannelAdminLogEventActionChangeEmojiStatusTypeID )
return c .EncodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) EncodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 as nil" )
}
if c .PrevValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value is nil" )
}
if err := c .PrevValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value: %w" , err )
}
if c .NewValue == nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value is nil" )
}
if err := c .NewValue .Encode (b ); err != nil {
return fmt .Errorf ("unable to encode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value: %w" , err )
}
return nil
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) Decode (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 to nil" )
}
if err := b .ConsumeID (ChannelAdminLogEventActionChangeEmojiStatusTypeID ); err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: %w" , err )
}
return c .DecodeBare (b )
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) DecodeBare (b *bin .Buffer ) error {
if c == nil {
return fmt .Errorf ("can't decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 to nil" )
}
{
value , err := DecodeEmojiStatus (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field prev_value: %w" , err )
}
c .PrevValue = value
}
{
value , err := DecodeEmojiStatus (b )
if err != nil {
return fmt .Errorf ("unable to decode channelAdminLogEventActionChangeEmojiStatus#3ea9feb1: field new_value: %w" , err )
}
c .NewValue = value
}
return nil
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) GetPrevValue () (value EmojiStatusClass ) {
if c == nil {
return
}
return c .PrevValue
}
func (c *ChannelAdminLogEventActionChangeEmojiStatus ) GetNewValue () (value EmojiStatusClass ) {
if c == nil {
return
}
return c .NewValue
}
const ChannelAdminLogEventActionClassName = "ChannelAdminLogEventAction"
type ChannelAdminLogEventActionClass interface {
bin .Encoder
bin .Decoder
bin .BareEncoder
bin .BareDecoder
construct () ChannelAdminLogEventActionClass
TypeID () uint32
TypeName () string
String () string
Zero () bool
}
func DecodeChannelAdminLogEventAction (buf *bin .Buffer ) (ChannelAdminLogEventActionClass , error ) {
id , err := buf .PeekID ()
if err != nil {
return nil , err
}
switch id {
case ChannelAdminLogEventActionChangeTitleTypeID :
v := ChannelAdminLogEventActionChangeTitle {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeAboutTypeID :
v := ChannelAdminLogEventActionChangeAbout {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeUsernameTypeID :
v := ChannelAdminLogEventActionChangeUsername {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangePhotoTypeID :
v := ChannelAdminLogEventActionChangePhoto {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleInvitesTypeID :
v := ChannelAdminLogEventActionToggleInvites {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleSignaturesTypeID :
v := ChannelAdminLogEventActionToggleSignatures {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionUpdatePinnedTypeID :
v := ChannelAdminLogEventActionUpdatePinned {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionEditMessageTypeID :
v := ChannelAdminLogEventActionEditMessage {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionDeleteMessageTypeID :
v := ChannelAdminLogEventActionDeleteMessage {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantJoinTypeID :
v := ChannelAdminLogEventActionParticipantJoin {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantLeaveTypeID :
v := ChannelAdminLogEventActionParticipantLeave {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantInviteTypeID :
v := ChannelAdminLogEventActionParticipantInvite {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantToggleBanTypeID :
v := ChannelAdminLogEventActionParticipantToggleBan {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantToggleAdminTypeID :
v := ChannelAdminLogEventActionParticipantToggleAdmin {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeStickerSetTypeID :
v := ChannelAdminLogEventActionChangeStickerSet {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID :
v := ChannelAdminLogEventActionTogglePreHistoryHidden {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionDefaultBannedRightsTypeID :
v := ChannelAdminLogEventActionDefaultBannedRights {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionStopPollTypeID :
v := ChannelAdminLogEventActionStopPoll {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeLinkedChatTypeID :
v := ChannelAdminLogEventActionChangeLinkedChat {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeLocationTypeID :
v := ChannelAdminLogEventActionChangeLocation {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleSlowModeTypeID :
v := ChannelAdminLogEventActionToggleSlowMode {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionStartGroupCallTypeID :
v := ChannelAdminLogEventActionStartGroupCall {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionDiscardGroupCallTypeID :
v := ChannelAdminLogEventActionDiscardGroupCall {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantMuteTypeID :
v := ChannelAdminLogEventActionParticipantMute {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantUnmuteTypeID :
v := ChannelAdminLogEventActionParticipantUnmute {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleGroupCallSettingTypeID :
v := ChannelAdminLogEventActionToggleGroupCallSetting {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantJoinByInviteTypeID :
v := ChannelAdminLogEventActionParticipantJoinByInvite {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionExportedInviteDeleteTypeID :
v := ChannelAdminLogEventActionExportedInviteDelete {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionExportedInviteRevokeTypeID :
v := ChannelAdminLogEventActionExportedInviteRevoke {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionExportedInviteEditTypeID :
v := ChannelAdminLogEventActionExportedInviteEdit {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantVolumeTypeID :
v := ChannelAdminLogEventActionParticipantVolume {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeHistoryTTLTypeID :
v := ChannelAdminLogEventActionChangeHistoryTTL {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionParticipantJoinByRequestTypeID :
v := ChannelAdminLogEventActionParticipantJoinByRequest {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleNoForwardsTypeID :
v := ChannelAdminLogEventActionToggleNoForwards {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionSendMessageTypeID :
v := ChannelAdminLogEventActionSendMessage {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeAvailableReactionsTypeID :
v := ChannelAdminLogEventActionChangeAvailableReactions {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeUsernamesTypeID :
v := ChannelAdminLogEventActionChangeUsernames {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleForumTypeID :
v := ChannelAdminLogEventActionToggleForum {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionCreateTopicTypeID :
v := ChannelAdminLogEventActionCreateTopic {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionEditTopicTypeID :
v := ChannelAdminLogEventActionEditTopic {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionDeleteTopicTypeID :
v := ChannelAdminLogEventActionDeleteTopic {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionPinTopicTypeID :
v := ChannelAdminLogEventActionPinTopic {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionToggleAntiSpamTypeID :
v := ChannelAdminLogEventActionToggleAntiSpam {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangePeerColorTypeID :
v := ChannelAdminLogEventActionChangePeerColor {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeProfilePeerColorTypeID :
v := ChannelAdminLogEventActionChangeProfilePeerColor {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeWallpaperTypeID :
v := ChannelAdminLogEventActionChangeWallpaper {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
case ChannelAdminLogEventActionChangeEmojiStatusTypeID :
v := ChannelAdminLogEventActionChangeEmojiStatus {}
if err := v .Decode (buf ); err != nil {
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , err )
}
return &v , nil
default :
return nil , fmt .Errorf ("unable to decode ChannelAdminLogEventActionClass: %w" , bin .NewUnexpectedID (id ))
}
}
type ChannelAdminLogEventActionBox struct {
ChannelAdminLogEventAction ChannelAdminLogEventActionClass
}
func (b *ChannelAdminLogEventActionBox ) Decode (buf *bin .Buffer ) error {
if b == nil {
return fmt .Errorf ("unable to decode ChannelAdminLogEventActionBox to nil" )
}
v , err := DecodeChannelAdminLogEventAction (buf )
if err != nil {
return fmt .Errorf ("unable to decode boxed value: %w" , err )
}
b .ChannelAdminLogEventAction = v
return nil
}
func (b *ChannelAdminLogEventActionBox ) Encode (buf *bin .Buffer ) error {
if b == nil || b .ChannelAdminLogEventAction == nil {
return fmt .Errorf ("unable to encode ChannelAdminLogEventActionClass as nil" )
}
return b .ChannelAdminLogEventAction .Encode (buf )
}
The pages are generated with Golds v0.6.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .