//go:build !no_gotd_slices
// +build !no_gotd_slices

// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// StickerSetCoveredClassArray is adapter for slice of StickerSetCoveredClass.
type StickerSetCoveredClassArray []StickerSetCoveredClass

// Sort sorts slice of StickerSetCoveredClass.
func ( StickerSetCoveredClassArray) ( func(,  StickerSetCoveredClass) bool) StickerSetCoveredClassArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of StickerSetCoveredClass.
func ( StickerSetCoveredClassArray) ( func(,  StickerSetCoveredClass) bool) StickerSetCoveredClassArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of StickerSetCoveredClass.
func ( StickerSetCoveredClassArray) ( func( StickerSetCoveredClass) bool) StickerSetCoveredClassArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( StickerSetCoveredClassArray) () ( StickerSetCoveredClass,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( StickerSetCoveredClassArray) () ( StickerSetCoveredClass,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *StickerSetCoveredClassArray) () ( StickerSetCoveredClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  StickerSetCoveredClass
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *StickerSetCoveredClassArray) () ( StickerSetCoveredClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// AsStickerSetCovered returns copy with only StickerSetCovered constructors.
func ( StickerSetCoveredClassArray) () ( StickerSetCoveredArray) {
	for ,  := range  {
		,  := .(*StickerSetCovered)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsStickerSetMultiCovered returns copy with only StickerSetMultiCovered constructors.
func ( StickerSetCoveredClassArray) () ( StickerSetMultiCoveredArray) {
	for ,  := range  {
		,  := .(*StickerSetMultiCovered)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsStickerSetFullCovered returns copy with only StickerSetFullCovered constructors.
func ( StickerSetCoveredClassArray) () ( StickerSetFullCoveredArray) {
	for ,  := range  {
		,  := .(*StickerSetFullCovered)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsStickerSetNoCovered returns copy with only StickerSetNoCovered constructors.
func ( StickerSetCoveredClassArray) () ( StickerSetNoCoveredArray) {
	for ,  := range  {
		,  := .(*StickerSetNoCovered)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// StickerSetCoveredArray is adapter for slice of StickerSetCovered.
type StickerSetCoveredArray []StickerSetCovered

// Sort sorts slice of StickerSetCovered.
func ( StickerSetCoveredArray) ( func(,  StickerSetCovered) bool) StickerSetCoveredArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of StickerSetCovered.
func ( StickerSetCoveredArray) ( func(,  StickerSetCovered) bool) StickerSetCoveredArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of StickerSetCovered.
func ( StickerSetCoveredArray) ( func( StickerSetCovered) bool) StickerSetCoveredArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( StickerSetCoveredArray) () ( StickerSetCovered,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( StickerSetCoveredArray) () ( StickerSetCovered,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *StickerSetCoveredArray) () ( StickerSetCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  StickerSetCovered
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *StickerSetCoveredArray) () ( StickerSetCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// StickerSetMultiCoveredArray is adapter for slice of StickerSetMultiCovered.
type StickerSetMultiCoveredArray []StickerSetMultiCovered

// Sort sorts slice of StickerSetMultiCovered.
func ( StickerSetMultiCoveredArray) ( func(,  StickerSetMultiCovered) bool) StickerSetMultiCoveredArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of StickerSetMultiCovered.
func ( StickerSetMultiCoveredArray) ( func(,  StickerSetMultiCovered) bool) StickerSetMultiCoveredArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of StickerSetMultiCovered.
func ( StickerSetMultiCoveredArray) ( func( StickerSetMultiCovered) bool) StickerSetMultiCoveredArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( StickerSetMultiCoveredArray) () ( StickerSetMultiCovered,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( StickerSetMultiCoveredArray) () ( StickerSetMultiCovered,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *StickerSetMultiCoveredArray) () ( StickerSetMultiCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  StickerSetMultiCovered
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *StickerSetMultiCoveredArray) () ( StickerSetMultiCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// StickerSetFullCoveredArray is adapter for slice of StickerSetFullCovered.
type StickerSetFullCoveredArray []StickerSetFullCovered

// Sort sorts slice of StickerSetFullCovered.
func ( StickerSetFullCoveredArray) ( func(,  StickerSetFullCovered) bool) StickerSetFullCoveredArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of StickerSetFullCovered.
func ( StickerSetFullCoveredArray) ( func(,  StickerSetFullCovered) bool) StickerSetFullCoveredArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of StickerSetFullCovered.
func ( StickerSetFullCoveredArray) ( func( StickerSetFullCovered) bool) StickerSetFullCoveredArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( StickerSetFullCoveredArray) () ( StickerSetFullCovered,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( StickerSetFullCoveredArray) () ( StickerSetFullCovered,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *StickerSetFullCoveredArray) () ( StickerSetFullCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  StickerSetFullCovered
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *StickerSetFullCoveredArray) () ( StickerSetFullCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// StickerSetNoCoveredArray is adapter for slice of StickerSetNoCovered.
type StickerSetNoCoveredArray []StickerSetNoCovered

// Sort sorts slice of StickerSetNoCovered.
func ( StickerSetNoCoveredArray) ( func(,  StickerSetNoCovered) bool) StickerSetNoCoveredArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of StickerSetNoCovered.
func ( StickerSetNoCoveredArray) ( func(,  StickerSetNoCovered) bool) StickerSetNoCoveredArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of StickerSetNoCovered.
func ( StickerSetNoCoveredArray) ( func( StickerSetNoCovered) bool) StickerSetNoCoveredArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( StickerSetNoCoveredArray) () ( StickerSetNoCovered,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( StickerSetNoCoveredArray) () ( StickerSetNoCovered,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *StickerSetNoCoveredArray) () ( StickerSetNoCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  StickerSetNoCovered
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *StickerSetNoCoveredArray) () ( StickerSetNoCovered,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}