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

// InputStarGiftAuctionClassArray is adapter for slice of InputStarGiftAuctionClass.
type InputStarGiftAuctionClassArray []InputStarGiftAuctionClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsInputStarGiftAuction returns copy with only InputStarGiftAuction constructors.
func ( InputStarGiftAuctionClassArray) () ( InputStarGiftAuctionArray) {
	for ,  := range  {
		,  := .(*InputStarGiftAuction)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputStarGiftAuctionSlug returns copy with only InputStarGiftAuctionSlug constructors.
func ( InputStarGiftAuctionClassArray) () ( InputStarGiftAuctionSlugArray) {
	for ,  := range  {
		,  := .(*InputStarGiftAuctionSlug)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// InputStarGiftAuctionArray is adapter for slice of InputStarGiftAuction.
type InputStarGiftAuctionArray []InputStarGiftAuction

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputStarGiftAuctionSlugArray is adapter for slice of InputStarGiftAuctionSlug.
type InputStarGiftAuctionSlugArray []InputStarGiftAuctionSlug

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}