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

// MessagesFeaturedStickersClassArray is adapter for slice of MessagesFeaturedStickersClass.
type MessagesFeaturedStickersClassArray []MessagesFeaturedStickersClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsMessagesFeaturedStickersNotModified returns copy with only MessagesFeaturedStickersNotModified constructors.
func ( MessagesFeaturedStickersClassArray) () ( MessagesFeaturedStickersNotModifiedArray) {
	for ,  := range  {
		,  := .(*MessagesFeaturedStickersNotModified)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsMessagesFeaturedStickers returns copy with only MessagesFeaturedStickers constructors.
func ( MessagesFeaturedStickersClassArray) () ( MessagesFeaturedStickersArray) {
	for ,  := range  {
		,  := .(*MessagesFeaturedStickers)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AppendOnlyModified appends only Modified constructors to
// given slice.
func ( MessagesFeaturedStickersClassArray) ( []*MessagesFeaturedStickers) []*MessagesFeaturedStickers {
	for ,  := range  {
		,  := .AsModified()
		if ! {
			continue
		}
		 = append(, )
	}

	return 
}

// AsModified returns copy with only Modified constructors.
func ( MessagesFeaturedStickersClassArray) () ( []*MessagesFeaturedStickers) {
	return .AppendOnlyModified()
}

// FirstAsModified returns first element of slice (if exists).
func ( MessagesFeaturedStickersClassArray) () ( *MessagesFeaturedStickers,  bool) {
	,  := .First()
	if ! {
		return
	}
	return .AsModified()
}

// LastAsModified returns last element of slice (if exists).
func ( MessagesFeaturedStickersClassArray) () ( *MessagesFeaturedStickers,  bool) {
	,  := .Last()
	if ! {
		return
	}
	return .AsModified()
}

// PopFirstAsModified returns element of slice (if exists).
func ( *MessagesFeaturedStickersClassArray) () ( *MessagesFeaturedStickers,  bool) {
	,  := .PopFirst()
	if ! {
		return
	}
	return .AsModified()
}

// PopAsModified returns element of slice (if exists).
func ( *MessagesFeaturedStickersClassArray) () ( *MessagesFeaturedStickers,  bool) {
	,  := .Pop()
	if ! {
		return
	}
	return .AsModified()
}

// MessagesFeaturedStickersNotModifiedArray is adapter for slice of MessagesFeaturedStickersNotModified.
type MessagesFeaturedStickersNotModifiedArray []MessagesFeaturedStickersNotModified

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// MessagesFeaturedStickersArray is adapter for slice of MessagesFeaturedStickers.
type MessagesFeaturedStickersArray []MessagesFeaturedStickers

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}