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 PhoneCallClassArray []PhoneCallClass
func (s PhoneCallClassArray ) Sort (less func (a , b PhoneCallClass ) bool ) PhoneCallClassArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallClassArray ) SortStable (less func (a , b PhoneCallClass ) bool ) PhoneCallClassArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallClassArray ) Retain (keep func (x PhoneCallClass ) bool ) PhoneCallClassArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallClassArray ) First () (v PhoneCallClass , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallClassArray ) Last () (v PhoneCallClass , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallClassArray ) PopFirst () (v PhoneCallClass , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallClass
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallClassArray ) Pop () (v PhoneCallClass , 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 PhoneCallClassArray ) SortByID () PhoneCallClassArray {
return s .Sort (func (a , b PhoneCallClass ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallClassArray ) SortStableByID () PhoneCallClassArray {
return s .SortStable (func (a , b PhoneCallClass ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallClassArray ) FillPhoneCallEmptyMap (to map [int64 ]*PhoneCallEmpty ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallEmpty )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallEmptyToMap () map [int64 ]*PhoneCallEmpty {
r := make (map [int64 ]*PhoneCallEmpty , len (s ))
s .FillPhoneCallEmptyMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCallEmpty () (to PhoneCallEmptyArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallEmpty )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillPhoneCallWaitingMap (to map [int64 ]*PhoneCallWaiting ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallWaiting )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallWaitingToMap () map [int64 ]*PhoneCallWaiting {
r := make (map [int64 ]*PhoneCallWaiting , len (s ))
s .FillPhoneCallWaitingMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCallWaiting () (to PhoneCallWaitingArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallWaiting )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillPhoneCallRequestedMap (to map [int64 ]*PhoneCallRequested ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallRequested )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallRequestedToMap () map [int64 ]*PhoneCallRequested {
r := make (map [int64 ]*PhoneCallRequested , len (s ))
s .FillPhoneCallRequestedMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCallRequested () (to PhoneCallRequestedArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallRequested )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillPhoneCallAcceptedMap (to map [int64 ]*PhoneCallAccepted ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallAccepted )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallAcceptedToMap () map [int64 ]*PhoneCallAccepted {
r := make (map [int64 ]*PhoneCallAccepted , len (s ))
s .FillPhoneCallAcceptedMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCallAccepted () (to PhoneCallAcceptedArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallAccepted )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillPhoneCallMap (to map [int64 ]*PhoneCall ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCall )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallToMap () map [int64 ]*PhoneCall {
r := make (map [int64 ]*PhoneCall , len (s ))
s .FillPhoneCallMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCall () (to PhoneCallArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCall )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillPhoneCallDiscardedMap (to map [int64 ]*PhoneCallDiscarded ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallDiscarded )
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) PhoneCallDiscardedToMap () map [int64 ]*PhoneCallDiscarded {
r := make (map [int64 ]*PhoneCallDiscarded , len (s ))
s .FillPhoneCallDiscardedMap (r )
return r
}
func (s PhoneCallClassArray ) AsPhoneCallDiscarded () (to PhoneCallDiscardedArray ) {
for _ , elem := range s {
value , ok := elem .(*PhoneCallDiscarded )
if !ok {
continue
}
to = append (to , *value )
}
return to
}
func (s PhoneCallClassArray ) FillNotEmptyMap (to map [int64 ]NotEmptyPhoneCall ) {
for _ , elem := range s {
value , ok := elem .AsNotEmpty ()
if !ok {
continue
}
to [value .GetID ()] = value
}
}
func (s PhoneCallClassArray ) NotEmptyToMap () map [int64 ]NotEmptyPhoneCall {
r := make (map [int64 ]NotEmptyPhoneCall , len (s ))
s .FillNotEmptyMap (r )
return r
}
func (s PhoneCallClassArray ) AppendOnlyNotEmpty (to []NotEmptyPhoneCall ) []NotEmptyPhoneCall {
for _ , elem := range s {
value , ok := elem .AsNotEmpty ()
if !ok {
continue
}
to = append (to , value )
}
return to
}
func (s PhoneCallClassArray ) AsNotEmpty () (to []NotEmptyPhoneCall ) {
return s .AppendOnlyNotEmpty (to )
}
func (s PhoneCallClassArray ) FirstAsNotEmpty () (v NotEmptyPhoneCall , ok bool ) {
value , ok := s .First ()
if !ok {
return
}
return value .AsNotEmpty ()
}
func (s PhoneCallClassArray ) LastAsNotEmpty () (v NotEmptyPhoneCall , ok bool ) {
value , ok := s .Last ()
if !ok {
return
}
return value .AsNotEmpty ()
}
func (s *PhoneCallClassArray ) PopFirstAsNotEmpty () (v NotEmptyPhoneCall , ok bool ) {
value , ok := s .PopFirst ()
if !ok {
return
}
return value .AsNotEmpty ()
}
func (s *PhoneCallClassArray ) PopAsNotEmpty () (v NotEmptyPhoneCall , ok bool ) {
value , ok := s .Pop ()
if !ok {
return
}
return value .AsNotEmpty ()
}
type PhoneCallEmptyArray []PhoneCallEmpty
func (s PhoneCallEmptyArray ) Sort (less func (a , b PhoneCallEmpty ) bool ) PhoneCallEmptyArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallEmptyArray ) SortStable (less func (a , b PhoneCallEmpty ) bool ) PhoneCallEmptyArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallEmptyArray ) Retain (keep func (x PhoneCallEmpty ) bool ) PhoneCallEmptyArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallEmptyArray ) First () (v PhoneCallEmpty , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallEmptyArray ) Last () (v PhoneCallEmpty , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallEmptyArray ) PopFirst () (v PhoneCallEmpty , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallEmpty
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallEmptyArray ) Pop () (v PhoneCallEmpty , 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 PhoneCallEmptyArray ) SortByID () PhoneCallEmptyArray {
return s .Sort (func (a , b PhoneCallEmpty ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallEmptyArray ) SortStableByID () PhoneCallEmptyArray {
return s .SortStable (func (a , b PhoneCallEmpty ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallEmptyArray ) FillMap (to map [int64 ]PhoneCallEmpty ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallEmptyArray ) ToMap () map [int64 ]PhoneCallEmpty {
r := make (map [int64 ]PhoneCallEmpty , len (s ))
s .FillMap (r )
return r
}
type PhoneCallWaitingArray []PhoneCallWaiting
func (s PhoneCallWaitingArray ) Sort (less func (a , b PhoneCallWaiting ) bool ) PhoneCallWaitingArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallWaitingArray ) SortStable (less func (a , b PhoneCallWaiting ) bool ) PhoneCallWaitingArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallWaitingArray ) Retain (keep func (x PhoneCallWaiting ) bool ) PhoneCallWaitingArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallWaitingArray ) First () (v PhoneCallWaiting , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallWaitingArray ) Last () (v PhoneCallWaiting , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallWaitingArray ) PopFirst () (v PhoneCallWaiting , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallWaiting
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallWaitingArray ) Pop () (v PhoneCallWaiting , 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 PhoneCallWaitingArray ) SortByID () PhoneCallWaitingArray {
return s .Sort (func (a , b PhoneCallWaiting ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallWaitingArray ) SortStableByID () PhoneCallWaitingArray {
return s .SortStable (func (a , b PhoneCallWaiting ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallWaitingArray ) SortByDate () PhoneCallWaitingArray {
return s .Sort (func (a , b PhoneCallWaiting ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallWaitingArray ) SortStableByDate () PhoneCallWaitingArray {
return s .SortStable (func (a , b PhoneCallWaiting ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallWaitingArray ) FillMap (to map [int64 ]PhoneCallWaiting ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallWaitingArray ) ToMap () map [int64 ]PhoneCallWaiting {
r := make (map [int64 ]PhoneCallWaiting , len (s ))
s .FillMap (r )
return r
}
type PhoneCallRequestedArray []PhoneCallRequested
func (s PhoneCallRequestedArray ) Sort (less func (a , b PhoneCallRequested ) bool ) PhoneCallRequestedArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallRequestedArray ) SortStable (less func (a , b PhoneCallRequested ) bool ) PhoneCallRequestedArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallRequestedArray ) Retain (keep func (x PhoneCallRequested ) bool ) PhoneCallRequestedArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallRequestedArray ) First () (v PhoneCallRequested , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallRequestedArray ) Last () (v PhoneCallRequested , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallRequestedArray ) PopFirst () (v PhoneCallRequested , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallRequested
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallRequestedArray ) Pop () (v PhoneCallRequested , 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 PhoneCallRequestedArray ) SortByID () PhoneCallRequestedArray {
return s .Sort (func (a , b PhoneCallRequested ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallRequestedArray ) SortStableByID () PhoneCallRequestedArray {
return s .SortStable (func (a , b PhoneCallRequested ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallRequestedArray ) SortByDate () PhoneCallRequestedArray {
return s .Sort (func (a , b PhoneCallRequested ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallRequestedArray ) SortStableByDate () PhoneCallRequestedArray {
return s .SortStable (func (a , b PhoneCallRequested ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallRequestedArray ) FillMap (to map [int64 ]PhoneCallRequested ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallRequestedArray ) ToMap () map [int64 ]PhoneCallRequested {
r := make (map [int64 ]PhoneCallRequested , len (s ))
s .FillMap (r )
return r
}
type PhoneCallAcceptedArray []PhoneCallAccepted
func (s PhoneCallAcceptedArray ) Sort (less func (a , b PhoneCallAccepted ) bool ) PhoneCallAcceptedArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallAcceptedArray ) SortStable (less func (a , b PhoneCallAccepted ) bool ) PhoneCallAcceptedArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallAcceptedArray ) Retain (keep func (x PhoneCallAccepted ) bool ) PhoneCallAcceptedArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallAcceptedArray ) First () (v PhoneCallAccepted , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallAcceptedArray ) Last () (v PhoneCallAccepted , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallAcceptedArray ) PopFirst () (v PhoneCallAccepted , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallAccepted
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallAcceptedArray ) Pop () (v PhoneCallAccepted , 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 PhoneCallAcceptedArray ) SortByID () PhoneCallAcceptedArray {
return s .Sort (func (a , b PhoneCallAccepted ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallAcceptedArray ) SortStableByID () PhoneCallAcceptedArray {
return s .SortStable (func (a , b PhoneCallAccepted ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallAcceptedArray ) SortByDate () PhoneCallAcceptedArray {
return s .Sort (func (a , b PhoneCallAccepted ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallAcceptedArray ) SortStableByDate () PhoneCallAcceptedArray {
return s .SortStable (func (a , b PhoneCallAccepted ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallAcceptedArray ) FillMap (to map [int64 ]PhoneCallAccepted ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallAcceptedArray ) ToMap () map [int64 ]PhoneCallAccepted {
r := make (map [int64 ]PhoneCallAccepted , len (s ))
s .FillMap (r )
return r
}
type PhoneCallArray []PhoneCall
func (s PhoneCallArray ) Sort (less func (a , b PhoneCall ) bool ) PhoneCallArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallArray ) SortStable (less func (a , b PhoneCall ) bool ) PhoneCallArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallArray ) Retain (keep func (x PhoneCall ) bool ) PhoneCallArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallArray ) First () (v PhoneCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallArray ) Last () (v PhoneCall , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallArray ) PopFirst () (v PhoneCall , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCall
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallArray ) Pop () (v PhoneCall , 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 PhoneCallArray ) SortByID () PhoneCallArray {
return s .Sort (func (a , b PhoneCall ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallArray ) SortStableByID () PhoneCallArray {
return s .SortStable (func (a , b PhoneCall ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallArray ) SortByDate () PhoneCallArray {
return s .Sort (func (a , b PhoneCall ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallArray ) SortStableByDate () PhoneCallArray {
return s .SortStable (func (a , b PhoneCall ) bool {
return a .GetDate () < b .GetDate ()
})
}
func (s PhoneCallArray ) FillMap (to map [int64 ]PhoneCall ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallArray ) ToMap () map [int64 ]PhoneCall {
r := make (map [int64 ]PhoneCall , len (s ))
s .FillMap (r )
return r
}
type PhoneCallDiscardedArray []PhoneCallDiscarded
func (s PhoneCallDiscardedArray ) Sort (less func (a , b PhoneCallDiscarded ) bool ) PhoneCallDiscardedArray {
sort .Slice (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallDiscardedArray ) SortStable (less func (a , b PhoneCallDiscarded ) bool ) PhoneCallDiscardedArray {
sort .SliceStable (s , func (i , j int ) bool {
return less (s [i ], s [j ])
})
return s
}
func (s PhoneCallDiscardedArray ) Retain (keep func (x PhoneCallDiscarded ) bool ) PhoneCallDiscardedArray {
n := 0
for _ , x := range s {
if keep (x ) {
s [n ] = x
n ++
}
}
s = s [:n ]
return s
}
func (s PhoneCallDiscardedArray ) First () (v PhoneCallDiscarded , ok bool ) {
if len (s ) < 1 {
return
}
return s [0 ], true
}
func (s PhoneCallDiscardedArray ) Last () (v PhoneCallDiscarded , ok bool ) {
if len (s ) < 1 {
return
}
return s [len (s )-1 ], true
}
func (s *PhoneCallDiscardedArray ) PopFirst () (v PhoneCallDiscarded , ok bool ) {
if s == nil || len (*s ) < 1 {
return
}
a := *s
v = a [0 ]
copy (a [0 :], a [1 :])
var zero PhoneCallDiscarded
a [len (a )-1 ] = zero
a = a [:len (a )-1 ]
*s = a
return v , true
}
func (s *PhoneCallDiscardedArray ) Pop () (v PhoneCallDiscarded , 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 PhoneCallDiscardedArray ) SortByID () PhoneCallDiscardedArray {
return s .Sort (func (a , b PhoneCallDiscarded ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallDiscardedArray ) SortStableByID () PhoneCallDiscardedArray {
return s .SortStable (func (a , b PhoneCallDiscarded ) bool {
return a .GetID () < b .GetID ()
})
}
func (s PhoneCallDiscardedArray ) FillMap (to map [int64 ]PhoneCallDiscarded ) {
for _ , value := range s {
to [value .GetID ()] = value
}
}
func (s PhoneCallDiscardedArray ) ToMap () map [int64 ]PhoneCallDiscarded {
r := make (map [int64 ]PhoneCallDiscarded , len (s ))
s .FillMap (r )
return r
}
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 .