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 ChannelAdminLogEventActionClassArray []ChannelAdminLogEventActionClass
func (s ChannelAdminLogEventActionClassArray ) Sort (less func (a , b ChannelAdminLogEventActionClass ) bool ) ChannelAdminLogEventActionClassArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionClassArray ) SortStable (less func (a , b ChannelAdminLogEventActionClass ) bool ) ChannelAdminLogEventActionClassArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionClassArray ) Retain (keep func (x ChannelAdminLogEventActionClass ) bool ) ChannelAdminLogEventActionClassArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionClassArray ) First () (v ChannelAdminLogEventActionClass , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionClassArray ) Last () (v ChannelAdminLogEventActionClass , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionClassArray ) PopFirst () (v ChannelAdminLogEventActionClass , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionClass
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionClassArray ) Pop () (v ChannelAdminLogEventActionClass , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeTitle () (to ChannelAdminLogEventActionChangeTitleArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeTitle )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeAbout () (to ChannelAdminLogEventActionChangeAboutArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeAbout )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeUsername () (to ChannelAdminLogEventActionChangeUsernameArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeUsername )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangePhoto () (to ChannelAdminLogEventActionChangePhotoArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangePhoto )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleInvites () (to ChannelAdminLogEventActionToggleInvitesArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleInvites )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleSignatures () (to ChannelAdminLogEventActionToggleSignaturesArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleSignatures )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionUpdatePinned () (to ChannelAdminLogEventActionUpdatePinnedArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionUpdatePinned )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionEditMessage () (to ChannelAdminLogEventActionEditMessageArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionEditMessage )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionDeleteMessage () (to ChannelAdminLogEventActionDeleteMessageArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionDeleteMessage )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantInvite () (to ChannelAdminLogEventActionParticipantInviteArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantInvite )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantToggleBan () (to ChannelAdminLogEventActionParticipantToggleBanArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantToggleBan )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantToggleAdmin () (to ChannelAdminLogEventActionParticipantToggleAdminArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantToggleAdmin )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeStickerSet () (to ChannelAdminLogEventActionChangeStickerSetArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeStickerSet )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionTogglePreHistoryHidden () (to ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionTogglePreHistoryHidden )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionDefaultBannedRights () (to ChannelAdminLogEventActionDefaultBannedRightsArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionDefaultBannedRights )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionStopPoll () (to ChannelAdminLogEventActionStopPollArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionStopPoll )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeLinkedChat () (to ChannelAdminLogEventActionChangeLinkedChatArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeLinkedChat )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeLocation () (to ChannelAdminLogEventActionChangeLocationArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeLocation )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleSlowMode () (to ChannelAdminLogEventActionToggleSlowModeArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleSlowMode )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionStartGroupCall () (to ChannelAdminLogEventActionStartGroupCallArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionStartGroupCall )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionDiscardGroupCall () (to ChannelAdminLogEventActionDiscardGroupCallArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionDiscardGroupCall )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantMute () (to ChannelAdminLogEventActionParticipantMuteArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantMute )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantUnmute () (to ChannelAdminLogEventActionParticipantUnmuteArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantUnmute )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleGroupCallSetting () (to ChannelAdminLogEventActionToggleGroupCallSettingArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleGroupCallSetting )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantJoinByInvite () (to ChannelAdminLogEventActionParticipantJoinByInviteArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantJoinByInvite )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionExportedInviteDelete () (to ChannelAdminLogEventActionExportedInviteDeleteArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionExportedInviteDelete )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionExportedInviteRevoke () (to ChannelAdminLogEventActionExportedInviteRevokeArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionExportedInviteRevoke )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionExportedInviteEdit () (to ChannelAdminLogEventActionExportedInviteEditArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionExportedInviteEdit )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantVolume () (to ChannelAdminLogEventActionParticipantVolumeArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantVolume )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeHistoryTTL () (to ChannelAdminLogEventActionChangeHistoryTTLArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeHistoryTTL )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionParticipantJoinByRequest () (to ChannelAdminLogEventActionParticipantJoinByRequestArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionParticipantJoinByRequest )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleNoForwards () (to ChannelAdminLogEventActionToggleNoForwardsArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleNoForwards )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionSendMessage () (to ChannelAdminLogEventActionSendMessageArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionSendMessage )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeAvailableReactions () (to ChannelAdminLogEventActionChangeAvailableReactionsArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeAvailableReactions )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeUsernames () (to ChannelAdminLogEventActionChangeUsernamesArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeUsernames )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleForum () (to ChannelAdminLogEventActionToggleForumArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleForum )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionCreateTopic () (to ChannelAdminLogEventActionCreateTopicArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionCreateTopic )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionEditTopic () (to ChannelAdminLogEventActionEditTopicArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionEditTopic )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionDeleteTopic () (to ChannelAdminLogEventActionDeleteTopicArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionDeleteTopic )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionPinTopic () (to ChannelAdminLogEventActionPinTopicArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionPinTopic )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionToggleAntiSpam () (to ChannelAdminLogEventActionToggleAntiSpamArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionToggleAntiSpam )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangePeerColor () (to ChannelAdminLogEventActionChangePeerColorArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangePeerColor )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeProfilePeerColor () (to ChannelAdminLogEventActionChangeProfilePeerColorArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeProfilePeerColor )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeWallpaper () (to ChannelAdminLogEventActionChangeWallpaperArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeWallpaper )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s ChannelAdminLogEventActionClassArray ) AsChannelAdminLogEventActionChangeEmojiStatus () (to ChannelAdminLogEventActionChangeEmojiStatusArray ) {
for _ , elem := range s {
value , ok := elem .(*ChannelAdminLogEventActionChangeEmojiStatus )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
type ChannelAdminLogEventActionChangeTitleArray []ChannelAdminLogEventActionChangeTitle
func (s ChannelAdminLogEventActionChangeTitleArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeTitle ) bool ) ChannelAdminLogEventActionChangeTitleArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeTitleArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeTitle ) bool ) ChannelAdminLogEventActionChangeTitleArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeTitleArray ) Retain (keep func (x ChannelAdminLogEventActionChangeTitle ) bool ) ChannelAdminLogEventActionChangeTitleArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeTitleArray ) First () (v ChannelAdminLogEventActionChangeTitle , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeTitleArray ) Last () (v ChannelAdminLogEventActionChangeTitle , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeTitleArray ) PopFirst () (v ChannelAdminLogEventActionChangeTitle , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeTitle
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeTitleArray ) Pop () (v ChannelAdminLogEventActionChangeTitle , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeAboutArray []ChannelAdminLogEventActionChangeAbout
func (s ChannelAdminLogEventActionChangeAboutArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeAbout ) bool ) ChannelAdminLogEventActionChangeAboutArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeAboutArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeAbout ) bool ) ChannelAdminLogEventActionChangeAboutArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeAboutArray ) Retain (keep func (x ChannelAdminLogEventActionChangeAbout ) bool ) ChannelAdminLogEventActionChangeAboutArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeAboutArray ) First () (v ChannelAdminLogEventActionChangeAbout , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeAboutArray ) Last () (v ChannelAdminLogEventActionChangeAbout , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeAboutArray ) PopFirst () (v ChannelAdminLogEventActionChangeAbout , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeAbout
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeAboutArray ) Pop () (v ChannelAdminLogEventActionChangeAbout , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeUsernameArray []ChannelAdminLogEventActionChangeUsername
func (s ChannelAdminLogEventActionChangeUsernameArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeUsername ) bool ) ChannelAdminLogEventActionChangeUsernameArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeUsernameArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeUsername ) bool ) ChannelAdminLogEventActionChangeUsernameArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeUsernameArray ) Retain (keep func (x ChannelAdminLogEventActionChangeUsername ) bool ) ChannelAdminLogEventActionChangeUsernameArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeUsernameArray ) First () (v ChannelAdminLogEventActionChangeUsername , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeUsernameArray ) Last () (v ChannelAdminLogEventActionChangeUsername , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeUsernameArray ) PopFirst () (v ChannelAdminLogEventActionChangeUsername , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeUsername
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeUsernameArray ) Pop () (v ChannelAdminLogEventActionChangeUsername , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangePhotoArray []ChannelAdminLogEventActionChangePhoto
func (s ChannelAdminLogEventActionChangePhotoArray ) Sort (less func (a , b ChannelAdminLogEventActionChangePhoto ) bool ) ChannelAdminLogEventActionChangePhotoArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangePhotoArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangePhoto ) bool ) ChannelAdminLogEventActionChangePhotoArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangePhotoArray ) Retain (keep func (x ChannelAdminLogEventActionChangePhoto ) bool ) ChannelAdminLogEventActionChangePhotoArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangePhotoArray ) First () (v ChannelAdminLogEventActionChangePhoto , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangePhotoArray ) Last () (v ChannelAdminLogEventActionChangePhoto , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangePhotoArray ) PopFirst () (v ChannelAdminLogEventActionChangePhoto , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangePhoto
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangePhotoArray ) Pop () (v ChannelAdminLogEventActionChangePhoto , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleInvitesArray []ChannelAdminLogEventActionToggleInvites
func (s ChannelAdminLogEventActionToggleInvitesArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleInvites ) bool ) ChannelAdminLogEventActionToggleInvitesArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleInvitesArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleInvites ) bool ) ChannelAdminLogEventActionToggleInvitesArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleInvitesArray ) Retain (keep func (x ChannelAdminLogEventActionToggleInvites ) bool ) ChannelAdminLogEventActionToggleInvitesArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleInvitesArray ) First () (v ChannelAdminLogEventActionToggleInvites , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleInvitesArray ) Last () (v ChannelAdminLogEventActionToggleInvites , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleInvitesArray ) PopFirst () (v ChannelAdminLogEventActionToggleInvites , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleInvites
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleInvitesArray ) Pop () (v ChannelAdminLogEventActionToggleInvites , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleSignaturesArray []ChannelAdminLogEventActionToggleSignatures
func (s ChannelAdminLogEventActionToggleSignaturesArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleSignatures ) bool ) ChannelAdminLogEventActionToggleSignaturesArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleSignaturesArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleSignatures ) bool ) ChannelAdminLogEventActionToggleSignaturesArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleSignaturesArray ) Retain (keep func (x ChannelAdminLogEventActionToggleSignatures ) bool ) ChannelAdminLogEventActionToggleSignaturesArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleSignaturesArray ) First () (v ChannelAdminLogEventActionToggleSignatures , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleSignaturesArray ) Last () (v ChannelAdminLogEventActionToggleSignatures , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleSignaturesArray ) PopFirst () (v ChannelAdminLogEventActionToggleSignatures , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleSignatures
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleSignaturesArray ) Pop () (v ChannelAdminLogEventActionToggleSignatures , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionUpdatePinnedArray []ChannelAdminLogEventActionUpdatePinned
func (s ChannelAdminLogEventActionUpdatePinnedArray ) Sort (less func (a , b ChannelAdminLogEventActionUpdatePinned ) bool ) ChannelAdminLogEventActionUpdatePinnedArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionUpdatePinnedArray ) SortStable (less func (a , b ChannelAdminLogEventActionUpdatePinned ) bool ) ChannelAdminLogEventActionUpdatePinnedArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionUpdatePinnedArray ) Retain (keep func (x ChannelAdminLogEventActionUpdatePinned ) bool ) ChannelAdminLogEventActionUpdatePinnedArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionUpdatePinnedArray ) First () (v ChannelAdminLogEventActionUpdatePinned , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionUpdatePinnedArray ) Last () (v ChannelAdminLogEventActionUpdatePinned , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionUpdatePinnedArray ) PopFirst () (v ChannelAdminLogEventActionUpdatePinned , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionUpdatePinned
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionUpdatePinnedArray ) Pop () (v ChannelAdminLogEventActionUpdatePinned , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionEditMessageArray []ChannelAdminLogEventActionEditMessage
func (s ChannelAdminLogEventActionEditMessageArray ) Sort (less func (a , b ChannelAdminLogEventActionEditMessage ) bool ) ChannelAdminLogEventActionEditMessageArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionEditMessageArray ) SortStable (less func (a , b ChannelAdminLogEventActionEditMessage ) bool ) ChannelAdminLogEventActionEditMessageArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionEditMessageArray ) Retain (keep func (x ChannelAdminLogEventActionEditMessage ) bool ) ChannelAdminLogEventActionEditMessageArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionEditMessageArray ) First () (v ChannelAdminLogEventActionEditMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionEditMessageArray ) Last () (v ChannelAdminLogEventActionEditMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionEditMessageArray ) PopFirst () (v ChannelAdminLogEventActionEditMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionEditMessage
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionEditMessageArray ) Pop () (v ChannelAdminLogEventActionEditMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionDeleteMessageArray []ChannelAdminLogEventActionDeleteMessage
func (s ChannelAdminLogEventActionDeleteMessageArray ) Sort (less func (a , b ChannelAdminLogEventActionDeleteMessage ) bool ) ChannelAdminLogEventActionDeleteMessageArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDeleteMessageArray ) SortStable (less func (a , b ChannelAdminLogEventActionDeleteMessage ) bool ) ChannelAdminLogEventActionDeleteMessageArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDeleteMessageArray ) Retain (keep func (x ChannelAdminLogEventActionDeleteMessage ) bool ) ChannelAdminLogEventActionDeleteMessageArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionDeleteMessageArray ) First () (v ChannelAdminLogEventActionDeleteMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionDeleteMessageArray ) Last () (v ChannelAdminLogEventActionDeleteMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionDeleteMessageArray ) PopFirst () (v ChannelAdminLogEventActionDeleteMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionDeleteMessage
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionDeleteMessageArray ) Pop () (v ChannelAdminLogEventActionDeleteMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantInviteArray []ChannelAdminLogEventActionParticipantInvite
func (s ChannelAdminLogEventActionParticipantInviteArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantInvite ) bool ) ChannelAdminLogEventActionParticipantInviteArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantInviteArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantInvite ) bool ) ChannelAdminLogEventActionParticipantInviteArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantInviteArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantInvite ) bool ) ChannelAdminLogEventActionParticipantInviteArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantInviteArray ) First () (v ChannelAdminLogEventActionParticipantInvite , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantInviteArray ) Last () (v ChannelAdminLogEventActionParticipantInvite , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantInviteArray ) PopFirst () (v ChannelAdminLogEventActionParticipantInvite , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantInvite
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantInviteArray ) Pop () (v ChannelAdminLogEventActionParticipantInvite , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantToggleBanArray []ChannelAdminLogEventActionParticipantToggleBan
func (s ChannelAdminLogEventActionParticipantToggleBanArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantToggleBan ) bool ) ChannelAdminLogEventActionParticipantToggleBanArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantToggleBanArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantToggleBan ) bool ) ChannelAdminLogEventActionParticipantToggleBanArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantToggleBanArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantToggleBan ) bool ) ChannelAdminLogEventActionParticipantToggleBanArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantToggleBanArray ) First () (v ChannelAdminLogEventActionParticipantToggleBan , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantToggleBanArray ) Last () (v ChannelAdminLogEventActionParticipantToggleBan , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantToggleBanArray ) PopFirst () (v ChannelAdminLogEventActionParticipantToggleBan , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantToggleBan
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantToggleBanArray ) Pop () (v ChannelAdminLogEventActionParticipantToggleBan , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantToggleAdminArray []ChannelAdminLogEventActionParticipantToggleAdmin
func (s ChannelAdminLogEventActionParticipantToggleAdminArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantToggleAdmin ) bool ) ChannelAdminLogEventActionParticipantToggleAdminArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantToggleAdminArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantToggleAdmin ) bool ) ChannelAdminLogEventActionParticipantToggleAdminArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantToggleAdminArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantToggleAdmin ) bool ) ChannelAdminLogEventActionParticipantToggleAdminArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantToggleAdminArray ) First () (v ChannelAdminLogEventActionParticipantToggleAdmin , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantToggleAdminArray ) Last () (v ChannelAdminLogEventActionParticipantToggleAdmin , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantToggleAdminArray ) PopFirst () (v ChannelAdminLogEventActionParticipantToggleAdmin , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantToggleAdmin
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantToggleAdminArray ) Pop () (v ChannelAdminLogEventActionParticipantToggleAdmin , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeStickerSetArray []ChannelAdminLogEventActionChangeStickerSet
func (s ChannelAdminLogEventActionChangeStickerSetArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeStickerSet ) bool ) ChannelAdminLogEventActionChangeStickerSetArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeStickerSetArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeStickerSet ) bool ) ChannelAdminLogEventActionChangeStickerSetArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeStickerSetArray ) Retain (keep func (x ChannelAdminLogEventActionChangeStickerSet ) bool ) ChannelAdminLogEventActionChangeStickerSetArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeStickerSetArray ) First () (v ChannelAdminLogEventActionChangeStickerSet , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeStickerSetArray ) Last () (v ChannelAdminLogEventActionChangeStickerSet , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeStickerSetArray ) PopFirst () (v ChannelAdminLogEventActionChangeStickerSet , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeStickerSet
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeStickerSetArray ) Pop () (v ChannelAdminLogEventActionChangeStickerSet , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionTogglePreHistoryHiddenArray []ChannelAdminLogEventActionTogglePreHistoryHidden
func (s ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) Sort (less func (a , b ChannelAdminLogEventActionTogglePreHistoryHidden ) bool ) ChannelAdminLogEventActionTogglePreHistoryHiddenArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) SortStable (less func (a , b ChannelAdminLogEventActionTogglePreHistoryHidden ) bool ) ChannelAdminLogEventActionTogglePreHistoryHiddenArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) Retain (keep func (x ChannelAdminLogEventActionTogglePreHistoryHidden ) bool ) ChannelAdminLogEventActionTogglePreHistoryHiddenArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) First () (v ChannelAdminLogEventActionTogglePreHistoryHidden , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) Last () (v ChannelAdminLogEventActionTogglePreHistoryHidden , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) PopFirst () (v ChannelAdminLogEventActionTogglePreHistoryHidden , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionTogglePreHistoryHidden
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionTogglePreHistoryHiddenArray ) Pop () (v ChannelAdminLogEventActionTogglePreHistoryHidden , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionDefaultBannedRightsArray []ChannelAdminLogEventActionDefaultBannedRights
func (s ChannelAdminLogEventActionDefaultBannedRightsArray ) Sort (less func (a , b ChannelAdminLogEventActionDefaultBannedRights ) bool ) ChannelAdminLogEventActionDefaultBannedRightsArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDefaultBannedRightsArray ) SortStable (less func (a , b ChannelAdminLogEventActionDefaultBannedRights ) bool ) ChannelAdminLogEventActionDefaultBannedRightsArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDefaultBannedRightsArray ) Retain (keep func (x ChannelAdminLogEventActionDefaultBannedRights ) bool ) ChannelAdminLogEventActionDefaultBannedRightsArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionDefaultBannedRightsArray ) First () (v ChannelAdminLogEventActionDefaultBannedRights , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionDefaultBannedRightsArray ) Last () (v ChannelAdminLogEventActionDefaultBannedRights , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionDefaultBannedRightsArray ) PopFirst () (v ChannelAdminLogEventActionDefaultBannedRights , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionDefaultBannedRights
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionDefaultBannedRightsArray ) Pop () (v ChannelAdminLogEventActionDefaultBannedRights , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionStopPollArray []ChannelAdminLogEventActionStopPoll
func (s ChannelAdminLogEventActionStopPollArray ) Sort (less func (a , b ChannelAdminLogEventActionStopPoll ) bool ) ChannelAdminLogEventActionStopPollArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionStopPollArray ) SortStable (less func (a , b ChannelAdminLogEventActionStopPoll ) bool ) ChannelAdminLogEventActionStopPollArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionStopPollArray ) Retain (keep func (x ChannelAdminLogEventActionStopPoll ) bool ) ChannelAdminLogEventActionStopPollArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionStopPollArray ) First () (v ChannelAdminLogEventActionStopPoll , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionStopPollArray ) Last () (v ChannelAdminLogEventActionStopPoll , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionStopPollArray ) PopFirst () (v ChannelAdminLogEventActionStopPoll , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionStopPoll
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionStopPollArray ) Pop () (v ChannelAdminLogEventActionStopPoll , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeLinkedChatArray []ChannelAdminLogEventActionChangeLinkedChat
func (s ChannelAdminLogEventActionChangeLinkedChatArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeLinkedChat ) bool ) ChannelAdminLogEventActionChangeLinkedChatArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeLinkedChatArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeLinkedChat ) bool ) ChannelAdminLogEventActionChangeLinkedChatArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeLinkedChatArray ) Retain (keep func (x ChannelAdminLogEventActionChangeLinkedChat ) bool ) ChannelAdminLogEventActionChangeLinkedChatArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeLinkedChatArray ) First () (v ChannelAdminLogEventActionChangeLinkedChat , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeLinkedChatArray ) Last () (v ChannelAdminLogEventActionChangeLinkedChat , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeLinkedChatArray ) PopFirst () (v ChannelAdminLogEventActionChangeLinkedChat , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeLinkedChat
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeLinkedChatArray ) Pop () (v ChannelAdminLogEventActionChangeLinkedChat , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeLocationArray []ChannelAdminLogEventActionChangeLocation
func (s ChannelAdminLogEventActionChangeLocationArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeLocation ) bool ) ChannelAdminLogEventActionChangeLocationArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeLocationArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeLocation ) bool ) ChannelAdminLogEventActionChangeLocationArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeLocationArray ) Retain (keep func (x ChannelAdminLogEventActionChangeLocation ) bool ) ChannelAdminLogEventActionChangeLocationArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeLocationArray ) First () (v ChannelAdminLogEventActionChangeLocation , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeLocationArray ) Last () (v ChannelAdminLogEventActionChangeLocation , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeLocationArray ) PopFirst () (v ChannelAdminLogEventActionChangeLocation , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeLocation
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeLocationArray ) Pop () (v ChannelAdminLogEventActionChangeLocation , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleSlowModeArray []ChannelAdminLogEventActionToggleSlowMode
func (s ChannelAdminLogEventActionToggleSlowModeArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleSlowMode ) bool ) ChannelAdminLogEventActionToggleSlowModeArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleSlowModeArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleSlowMode ) bool ) ChannelAdminLogEventActionToggleSlowModeArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleSlowModeArray ) Retain (keep func (x ChannelAdminLogEventActionToggleSlowMode ) bool ) ChannelAdminLogEventActionToggleSlowModeArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleSlowModeArray ) First () (v ChannelAdminLogEventActionToggleSlowMode , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleSlowModeArray ) Last () (v ChannelAdminLogEventActionToggleSlowMode , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleSlowModeArray ) PopFirst () (v ChannelAdminLogEventActionToggleSlowMode , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleSlowMode
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleSlowModeArray ) Pop () (v ChannelAdminLogEventActionToggleSlowMode , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionStartGroupCallArray []ChannelAdminLogEventActionStartGroupCall
func (s ChannelAdminLogEventActionStartGroupCallArray ) Sort (less func (a , b ChannelAdminLogEventActionStartGroupCall ) bool ) ChannelAdminLogEventActionStartGroupCallArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionStartGroupCallArray ) SortStable (less func (a , b ChannelAdminLogEventActionStartGroupCall ) bool ) ChannelAdminLogEventActionStartGroupCallArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionStartGroupCallArray ) Retain (keep func (x ChannelAdminLogEventActionStartGroupCall ) bool ) ChannelAdminLogEventActionStartGroupCallArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionStartGroupCallArray ) First () (v ChannelAdminLogEventActionStartGroupCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionStartGroupCallArray ) Last () (v ChannelAdminLogEventActionStartGroupCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionStartGroupCallArray ) PopFirst () (v ChannelAdminLogEventActionStartGroupCall , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionStartGroupCall
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionStartGroupCallArray ) Pop () (v ChannelAdminLogEventActionStartGroupCall , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionDiscardGroupCallArray []ChannelAdminLogEventActionDiscardGroupCall
func (s ChannelAdminLogEventActionDiscardGroupCallArray ) Sort (less func (a , b ChannelAdminLogEventActionDiscardGroupCall ) bool ) ChannelAdminLogEventActionDiscardGroupCallArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDiscardGroupCallArray ) SortStable (less func (a , b ChannelAdminLogEventActionDiscardGroupCall ) bool ) ChannelAdminLogEventActionDiscardGroupCallArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDiscardGroupCallArray ) Retain (keep func (x ChannelAdminLogEventActionDiscardGroupCall ) bool ) ChannelAdminLogEventActionDiscardGroupCallArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionDiscardGroupCallArray ) First () (v ChannelAdminLogEventActionDiscardGroupCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionDiscardGroupCallArray ) Last () (v ChannelAdminLogEventActionDiscardGroupCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionDiscardGroupCallArray ) PopFirst () (v ChannelAdminLogEventActionDiscardGroupCall , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionDiscardGroupCall
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionDiscardGroupCallArray ) Pop () (v ChannelAdminLogEventActionDiscardGroupCall , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantMuteArray []ChannelAdminLogEventActionParticipantMute
func (s ChannelAdminLogEventActionParticipantMuteArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantMute ) bool ) ChannelAdminLogEventActionParticipantMuteArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantMuteArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantMute ) bool ) ChannelAdminLogEventActionParticipantMuteArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantMuteArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantMute ) bool ) ChannelAdminLogEventActionParticipantMuteArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantMuteArray ) First () (v ChannelAdminLogEventActionParticipantMute , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantMuteArray ) Last () (v ChannelAdminLogEventActionParticipantMute , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantMuteArray ) PopFirst () (v ChannelAdminLogEventActionParticipantMute , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantMute
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantMuteArray ) Pop () (v ChannelAdminLogEventActionParticipantMute , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantUnmuteArray []ChannelAdminLogEventActionParticipantUnmute
func (s ChannelAdminLogEventActionParticipantUnmuteArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantUnmute ) bool ) ChannelAdminLogEventActionParticipantUnmuteArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantUnmuteArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantUnmute ) bool ) ChannelAdminLogEventActionParticipantUnmuteArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantUnmuteArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantUnmute ) bool ) ChannelAdminLogEventActionParticipantUnmuteArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantUnmuteArray ) First () (v ChannelAdminLogEventActionParticipantUnmute , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantUnmuteArray ) Last () (v ChannelAdminLogEventActionParticipantUnmute , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantUnmuteArray ) PopFirst () (v ChannelAdminLogEventActionParticipantUnmute , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantUnmute
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantUnmuteArray ) Pop () (v ChannelAdminLogEventActionParticipantUnmute , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleGroupCallSettingArray []ChannelAdminLogEventActionToggleGroupCallSetting
func (s ChannelAdminLogEventActionToggleGroupCallSettingArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleGroupCallSetting ) bool ) ChannelAdminLogEventActionToggleGroupCallSettingArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleGroupCallSettingArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleGroupCallSetting ) bool ) ChannelAdminLogEventActionToggleGroupCallSettingArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleGroupCallSettingArray ) Retain (keep func (x ChannelAdminLogEventActionToggleGroupCallSetting ) bool ) ChannelAdminLogEventActionToggleGroupCallSettingArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleGroupCallSettingArray ) First () (v ChannelAdminLogEventActionToggleGroupCallSetting , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleGroupCallSettingArray ) Last () (v ChannelAdminLogEventActionToggleGroupCallSetting , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleGroupCallSettingArray ) PopFirst () (v ChannelAdminLogEventActionToggleGroupCallSetting , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleGroupCallSetting
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleGroupCallSettingArray ) Pop () (v ChannelAdminLogEventActionToggleGroupCallSetting , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantJoinByInviteArray []ChannelAdminLogEventActionParticipantJoinByInvite
func (s ChannelAdminLogEventActionParticipantJoinByInviteArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantJoinByInvite ) bool ) ChannelAdminLogEventActionParticipantJoinByInviteArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByInviteArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantJoinByInvite ) bool ) ChannelAdminLogEventActionParticipantJoinByInviteArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByInviteArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantJoinByInvite ) bool ) ChannelAdminLogEventActionParticipantJoinByInviteArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByInviteArray ) First () (v ChannelAdminLogEventActionParticipantJoinByInvite , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantJoinByInviteArray ) Last () (v ChannelAdminLogEventActionParticipantJoinByInvite , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantJoinByInviteArray ) PopFirst () (v ChannelAdminLogEventActionParticipantJoinByInvite , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantJoinByInvite
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantJoinByInviteArray ) Pop () (v ChannelAdminLogEventActionParticipantJoinByInvite , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionExportedInviteDeleteArray []ChannelAdminLogEventActionExportedInviteDelete
func (s ChannelAdminLogEventActionExportedInviteDeleteArray ) Sort (less func (a , b ChannelAdminLogEventActionExportedInviteDelete ) bool ) ChannelAdminLogEventActionExportedInviteDeleteArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteDeleteArray ) SortStable (less func (a , b ChannelAdminLogEventActionExportedInviteDelete ) bool ) ChannelAdminLogEventActionExportedInviteDeleteArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteDeleteArray ) Retain (keep func (x ChannelAdminLogEventActionExportedInviteDelete ) bool ) ChannelAdminLogEventActionExportedInviteDeleteArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionExportedInviteDeleteArray ) First () (v ChannelAdminLogEventActionExportedInviteDelete , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionExportedInviteDeleteArray ) Last () (v ChannelAdminLogEventActionExportedInviteDelete , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionExportedInviteDeleteArray ) PopFirst () (v ChannelAdminLogEventActionExportedInviteDelete , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionExportedInviteDelete
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionExportedInviteDeleteArray ) Pop () (v ChannelAdminLogEventActionExportedInviteDelete , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionExportedInviteRevokeArray []ChannelAdminLogEventActionExportedInviteRevoke
func (s ChannelAdminLogEventActionExportedInviteRevokeArray ) Sort (less func (a , b ChannelAdminLogEventActionExportedInviteRevoke ) bool ) ChannelAdminLogEventActionExportedInviteRevokeArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteRevokeArray ) SortStable (less func (a , b ChannelAdminLogEventActionExportedInviteRevoke ) bool ) ChannelAdminLogEventActionExportedInviteRevokeArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteRevokeArray ) Retain (keep func (x ChannelAdminLogEventActionExportedInviteRevoke ) bool ) ChannelAdminLogEventActionExportedInviteRevokeArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionExportedInviteRevokeArray ) First () (v ChannelAdminLogEventActionExportedInviteRevoke , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionExportedInviteRevokeArray ) Last () (v ChannelAdminLogEventActionExportedInviteRevoke , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionExportedInviteRevokeArray ) PopFirst () (v ChannelAdminLogEventActionExportedInviteRevoke , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionExportedInviteRevoke
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionExportedInviteRevokeArray ) Pop () (v ChannelAdminLogEventActionExportedInviteRevoke , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionExportedInviteEditArray []ChannelAdminLogEventActionExportedInviteEdit
func (s ChannelAdminLogEventActionExportedInviteEditArray ) Sort (less func (a , b ChannelAdminLogEventActionExportedInviteEdit ) bool ) ChannelAdminLogEventActionExportedInviteEditArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteEditArray ) SortStable (less func (a , b ChannelAdminLogEventActionExportedInviteEdit ) bool ) ChannelAdminLogEventActionExportedInviteEditArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionExportedInviteEditArray ) Retain (keep func (x ChannelAdminLogEventActionExportedInviteEdit ) bool ) ChannelAdminLogEventActionExportedInviteEditArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionExportedInviteEditArray ) First () (v ChannelAdminLogEventActionExportedInviteEdit , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionExportedInviteEditArray ) Last () (v ChannelAdminLogEventActionExportedInviteEdit , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionExportedInviteEditArray ) PopFirst () (v ChannelAdminLogEventActionExportedInviteEdit , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionExportedInviteEdit
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionExportedInviteEditArray ) Pop () (v ChannelAdminLogEventActionExportedInviteEdit , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantVolumeArray []ChannelAdminLogEventActionParticipantVolume
func (s ChannelAdminLogEventActionParticipantVolumeArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantVolume ) bool ) ChannelAdminLogEventActionParticipantVolumeArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantVolumeArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantVolume ) bool ) ChannelAdminLogEventActionParticipantVolumeArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantVolumeArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantVolume ) bool ) ChannelAdminLogEventActionParticipantVolumeArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantVolumeArray ) First () (v ChannelAdminLogEventActionParticipantVolume , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantVolumeArray ) Last () (v ChannelAdminLogEventActionParticipantVolume , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantVolumeArray ) PopFirst () (v ChannelAdminLogEventActionParticipantVolume , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantVolume
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantVolumeArray ) Pop () (v ChannelAdminLogEventActionParticipantVolume , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeHistoryTTLArray []ChannelAdminLogEventActionChangeHistoryTTL
func (s ChannelAdminLogEventActionChangeHistoryTTLArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeHistoryTTL ) bool ) ChannelAdminLogEventActionChangeHistoryTTLArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeHistoryTTLArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeHistoryTTL ) bool ) ChannelAdminLogEventActionChangeHistoryTTLArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeHistoryTTLArray ) Retain (keep func (x ChannelAdminLogEventActionChangeHistoryTTL ) bool ) ChannelAdminLogEventActionChangeHistoryTTLArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeHistoryTTLArray ) First () (v ChannelAdminLogEventActionChangeHistoryTTL , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeHistoryTTLArray ) Last () (v ChannelAdminLogEventActionChangeHistoryTTL , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeHistoryTTLArray ) PopFirst () (v ChannelAdminLogEventActionChangeHistoryTTL , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeHistoryTTL
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeHistoryTTLArray ) Pop () (v ChannelAdminLogEventActionChangeHistoryTTL , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionParticipantJoinByRequestArray []ChannelAdminLogEventActionParticipantJoinByRequest
func (s ChannelAdminLogEventActionParticipantJoinByRequestArray ) Sort (less func (a , b ChannelAdminLogEventActionParticipantJoinByRequest ) bool ) ChannelAdminLogEventActionParticipantJoinByRequestArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByRequestArray ) SortStable (less func (a , b ChannelAdminLogEventActionParticipantJoinByRequest ) bool ) ChannelAdminLogEventActionParticipantJoinByRequestArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByRequestArray ) Retain (keep func (x ChannelAdminLogEventActionParticipantJoinByRequest ) bool ) ChannelAdminLogEventActionParticipantJoinByRequestArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionParticipantJoinByRequestArray ) First () (v ChannelAdminLogEventActionParticipantJoinByRequest , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionParticipantJoinByRequestArray ) Last () (v ChannelAdminLogEventActionParticipantJoinByRequest , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionParticipantJoinByRequestArray ) PopFirst () (v ChannelAdminLogEventActionParticipantJoinByRequest , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionParticipantJoinByRequest
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionParticipantJoinByRequestArray ) Pop () (v ChannelAdminLogEventActionParticipantJoinByRequest , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleNoForwardsArray []ChannelAdminLogEventActionToggleNoForwards
func (s ChannelAdminLogEventActionToggleNoForwardsArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleNoForwards ) bool ) ChannelAdminLogEventActionToggleNoForwardsArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleNoForwardsArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleNoForwards ) bool ) ChannelAdminLogEventActionToggleNoForwardsArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleNoForwardsArray ) Retain (keep func (x ChannelAdminLogEventActionToggleNoForwards ) bool ) ChannelAdminLogEventActionToggleNoForwardsArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleNoForwardsArray ) First () (v ChannelAdminLogEventActionToggleNoForwards , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleNoForwardsArray ) Last () (v ChannelAdminLogEventActionToggleNoForwards , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleNoForwardsArray ) PopFirst () (v ChannelAdminLogEventActionToggleNoForwards , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleNoForwards
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleNoForwardsArray ) Pop () (v ChannelAdminLogEventActionToggleNoForwards , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionSendMessageArray []ChannelAdminLogEventActionSendMessage
func (s ChannelAdminLogEventActionSendMessageArray ) Sort (less func (a , b ChannelAdminLogEventActionSendMessage ) bool ) ChannelAdminLogEventActionSendMessageArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionSendMessageArray ) SortStable (less func (a , b ChannelAdminLogEventActionSendMessage ) bool ) ChannelAdminLogEventActionSendMessageArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionSendMessageArray ) Retain (keep func (x ChannelAdminLogEventActionSendMessage ) bool ) ChannelAdminLogEventActionSendMessageArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionSendMessageArray ) First () (v ChannelAdminLogEventActionSendMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionSendMessageArray ) Last () (v ChannelAdminLogEventActionSendMessage , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionSendMessageArray ) PopFirst () (v ChannelAdminLogEventActionSendMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionSendMessage
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionSendMessageArray ) Pop () (v ChannelAdminLogEventActionSendMessage , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeAvailableReactionsArray []ChannelAdminLogEventActionChangeAvailableReactions
func (s ChannelAdminLogEventActionChangeAvailableReactionsArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeAvailableReactions ) bool ) ChannelAdminLogEventActionChangeAvailableReactionsArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeAvailableReactionsArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeAvailableReactions ) bool ) ChannelAdminLogEventActionChangeAvailableReactionsArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeAvailableReactionsArray ) Retain (keep func (x ChannelAdminLogEventActionChangeAvailableReactions ) bool ) ChannelAdminLogEventActionChangeAvailableReactionsArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeAvailableReactionsArray ) First () (v ChannelAdminLogEventActionChangeAvailableReactions , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeAvailableReactionsArray ) Last () (v ChannelAdminLogEventActionChangeAvailableReactions , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeAvailableReactionsArray ) PopFirst () (v ChannelAdminLogEventActionChangeAvailableReactions , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeAvailableReactions
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeAvailableReactionsArray ) Pop () (v ChannelAdminLogEventActionChangeAvailableReactions , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeUsernamesArray []ChannelAdminLogEventActionChangeUsernames
func (s ChannelAdminLogEventActionChangeUsernamesArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeUsernames ) bool ) ChannelAdminLogEventActionChangeUsernamesArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeUsernamesArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeUsernames ) bool ) ChannelAdminLogEventActionChangeUsernamesArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeUsernamesArray ) Retain (keep func (x ChannelAdminLogEventActionChangeUsernames ) bool ) ChannelAdminLogEventActionChangeUsernamesArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeUsernamesArray ) First () (v ChannelAdminLogEventActionChangeUsernames , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeUsernamesArray ) Last () (v ChannelAdminLogEventActionChangeUsernames , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeUsernamesArray ) PopFirst () (v ChannelAdminLogEventActionChangeUsernames , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeUsernames
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeUsernamesArray ) Pop () (v ChannelAdminLogEventActionChangeUsernames , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleForumArray []ChannelAdminLogEventActionToggleForum
func (s ChannelAdminLogEventActionToggleForumArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleForum ) bool ) ChannelAdminLogEventActionToggleForumArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleForumArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleForum ) bool ) ChannelAdminLogEventActionToggleForumArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleForumArray ) Retain (keep func (x ChannelAdminLogEventActionToggleForum ) bool ) ChannelAdminLogEventActionToggleForumArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleForumArray ) First () (v ChannelAdminLogEventActionToggleForum , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleForumArray ) Last () (v ChannelAdminLogEventActionToggleForum , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleForumArray ) PopFirst () (v ChannelAdminLogEventActionToggleForum , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleForum
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleForumArray ) Pop () (v ChannelAdminLogEventActionToggleForum , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionCreateTopicArray []ChannelAdminLogEventActionCreateTopic
func (s ChannelAdminLogEventActionCreateTopicArray ) Sort (less func (a , b ChannelAdminLogEventActionCreateTopic ) bool ) ChannelAdminLogEventActionCreateTopicArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionCreateTopicArray ) SortStable (less func (a , b ChannelAdminLogEventActionCreateTopic ) bool ) ChannelAdminLogEventActionCreateTopicArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionCreateTopicArray ) Retain (keep func (x ChannelAdminLogEventActionCreateTopic ) bool ) ChannelAdminLogEventActionCreateTopicArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionCreateTopicArray ) First () (v ChannelAdminLogEventActionCreateTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionCreateTopicArray ) Last () (v ChannelAdminLogEventActionCreateTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionCreateTopicArray ) PopFirst () (v ChannelAdminLogEventActionCreateTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionCreateTopic
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionCreateTopicArray ) Pop () (v ChannelAdminLogEventActionCreateTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionEditTopicArray []ChannelAdminLogEventActionEditTopic
func (s ChannelAdminLogEventActionEditTopicArray ) Sort (less func (a , b ChannelAdminLogEventActionEditTopic ) bool ) ChannelAdminLogEventActionEditTopicArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionEditTopicArray ) SortStable (less func (a , b ChannelAdminLogEventActionEditTopic ) bool ) ChannelAdminLogEventActionEditTopicArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionEditTopicArray ) Retain (keep func (x ChannelAdminLogEventActionEditTopic ) bool ) ChannelAdminLogEventActionEditTopicArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionEditTopicArray ) First () (v ChannelAdminLogEventActionEditTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionEditTopicArray ) Last () (v ChannelAdminLogEventActionEditTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionEditTopicArray ) PopFirst () (v ChannelAdminLogEventActionEditTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionEditTopic
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionEditTopicArray ) Pop () (v ChannelAdminLogEventActionEditTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionDeleteTopicArray []ChannelAdminLogEventActionDeleteTopic
func (s ChannelAdminLogEventActionDeleteTopicArray ) Sort (less func (a , b ChannelAdminLogEventActionDeleteTopic ) bool ) ChannelAdminLogEventActionDeleteTopicArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDeleteTopicArray ) SortStable (less func (a , b ChannelAdminLogEventActionDeleteTopic ) bool ) ChannelAdminLogEventActionDeleteTopicArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionDeleteTopicArray ) Retain (keep func (x ChannelAdminLogEventActionDeleteTopic ) bool ) ChannelAdminLogEventActionDeleteTopicArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionDeleteTopicArray ) First () (v ChannelAdminLogEventActionDeleteTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionDeleteTopicArray ) Last () (v ChannelAdminLogEventActionDeleteTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionDeleteTopicArray ) PopFirst () (v ChannelAdminLogEventActionDeleteTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionDeleteTopic
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionDeleteTopicArray ) Pop () (v ChannelAdminLogEventActionDeleteTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionPinTopicArray []ChannelAdminLogEventActionPinTopic
func (s ChannelAdminLogEventActionPinTopicArray ) Sort (less func (a , b ChannelAdminLogEventActionPinTopic ) bool ) ChannelAdminLogEventActionPinTopicArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionPinTopicArray ) SortStable (less func (a , b ChannelAdminLogEventActionPinTopic ) bool ) ChannelAdminLogEventActionPinTopicArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionPinTopicArray ) Retain (keep func (x ChannelAdminLogEventActionPinTopic ) bool ) ChannelAdminLogEventActionPinTopicArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionPinTopicArray ) First () (v ChannelAdminLogEventActionPinTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionPinTopicArray ) Last () (v ChannelAdminLogEventActionPinTopic , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionPinTopicArray ) PopFirst () (v ChannelAdminLogEventActionPinTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionPinTopic
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionPinTopicArray ) Pop () (v ChannelAdminLogEventActionPinTopic , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionToggleAntiSpamArray []ChannelAdminLogEventActionToggleAntiSpam
func (s ChannelAdminLogEventActionToggleAntiSpamArray ) Sort (less func (a , b ChannelAdminLogEventActionToggleAntiSpam ) bool ) ChannelAdminLogEventActionToggleAntiSpamArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleAntiSpamArray ) SortStable (less func (a , b ChannelAdminLogEventActionToggleAntiSpam ) bool ) ChannelAdminLogEventActionToggleAntiSpamArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionToggleAntiSpamArray ) Retain (keep func (x ChannelAdminLogEventActionToggleAntiSpam ) bool ) ChannelAdminLogEventActionToggleAntiSpamArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionToggleAntiSpamArray ) First () (v ChannelAdminLogEventActionToggleAntiSpam , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionToggleAntiSpamArray ) Last () (v ChannelAdminLogEventActionToggleAntiSpam , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionToggleAntiSpamArray ) PopFirst () (v ChannelAdminLogEventActionToggleAntiSpam , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionToggleAntiSpam
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionToggleAntiSpamArray ) Pop () (v ChannelAdminLogEventActionToggleAntiSpam , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangePeerColorArray []ChannelAdminLogEventActionChangePeerColor
func (s ChannelAdminLogEventActionChangePeerColorArray ) Sort (less func (a , b ChannelAdminLogEventActionChangePeerColor ) bool ) ChannelAdminLogEventActionChangePeerColorArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangePeerColorArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangePeerColor ) bool ) ChannelAdminLogEventActionChangePeerColorArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangePeerColorArray ) Retain (keep func (x ChannelAdminLogEventActionChangePeerColor ) bool ) ChannelAdminLogEventActionChangePeerColorArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangePeerColorArray ) First () (v ChannelAdminLogEventActionChangePeerColor , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangePeerColorArray ) Last () (v ChannelAdminLogEventActionChangePeerColor , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangePeerColorArray ) PopFirst () (v ChannelAdminLogEventActionChangePeerColor , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangePeerColor
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangePeerColorArray ) Pop () (v ChannelAdminLogEventActionChangePeerColor , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeProfilePeerColorArray []ChannelAdminLogEventActionChangeProfilePeerColor
func (s ChannelAdminLogEventActionChangeProfilePeerColorArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeProfilePeerColor ) bool ) ChannelAdminLogEventActionChangeProfilePeerColorArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeProfilePeerColorArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeProfilePeerColor ) bool ) ChannelAdminLogEventActionChangeProfilePeerColorArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeProfilePeerColorArray ) Retain (keep func (x ChannelAdminLogEventActionChangeProfilePeerColor ) bool ) ChannelAdminLogEventActionChangeProfilePeerColorArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeProfilePeerColorArray ) First () (v ChannelAdminLogEventActionChangeProfilePeerColor , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeProfilePeerColorArray ) Last () (v ChannelAdminLogEventActionChangeProfilePeerColor , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeProfilePeerColorArray ) PopFirst () (v ChannelAdminLogEventActionChangeProfilePeerColor , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeProfilePeerColor
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeProfilePeerColorArray ) Pop () (v ChannelAdminLogEventActionChangeProfilePeerColor , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeWallpaperArray []ChannelAdminLogEventActionChangeWallpaper
func (s ChannelAdminLogEventActionChangeWallpaperArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeWallpaper ) bool ) ChannelAdminLogEventActionChangeWallpaperArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeWallpaperArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeWallpaper ) bool ) ChannelAdminLogEventActionChangeWallpaperArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeWallpaperArray ) Retain (keep func (x ChannelAdminLogEventActionChangeWallpaper ) bool ) ChannelAdminLogEventActionChangeWallpaperArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeWallpaperArray ) First () (v ChannelAdminLogEventActionChangeWallpaper , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeWallpaperArray ) Last () (v ChannelAdminLogEventActionChangeWallpaper , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeWallpaperArray ) PopFirst () (v ChannelAdminLogEventActionChangeWallpaper , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeWallpaper
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeWallpaperArray ) Pop () (v ChannelAdminLogEventActionChangeWallpaper , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
type ChannelAdminLogEventActionChangeEmojiStatusArray []ChannelAdminLogEventActionChangeEmojiStatus
func (s ChannelAdminLogEventActionChangeEmojiStatusArray ) Sort (less func (a , b ChannelAdminLogEventActionChangeEmojiStatus ) bool ) ChannelAdminLogEventActionChangeEmojiStatusArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeEmojiStatusArray ) SortStable (less func (a , b ChannelAdminLogEventActionChangeEmojiStatus ) bool ) ChannelAdminLogEventActionChangeEmojiStatusArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s ChannelAdminLogEventActionChangeEmojiStatusArray ) Retain (keep func (x ChannelAdminLogEventActionChangeEmojiStatus ) bool ) ChannelAdminLogEventActionChangeEmojiStatusArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s ChannelAdminLogEventActionChangeEmojiStatusArray ) First () (v ChannelAdminLogEventActionChangeEmojiStatus , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s ChannelAdminLogEventActionChangeEmojiStatusArray ) Last () (v ChannelAdminLogEventActionChangeEmojiStatus , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *ChannelAdminLogEventActionChangeEmojiStatusArray ) PopFirst () (v ChannelAdminLogEventActionChangeEmojiStatus , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero ChannelAdminLogEventActionChangeEmojiStatus
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *ChannelAdminLogEventActionChangeEmojiStatusArray ) Pop () (v ChannelAdminLogEventActionChangeEmojiStatus , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [len (a )-1 ]
a = a [:len (a )-1 ]
*s = a
return v , true
}
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 .