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

// StarGiftAuctionRoundClassArray is adapter for slice of StarGiftAuctionRoundClass.
type StarGiftAuctionRoundClassArray []StarGiftAuctionRoundClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsStarGiftAuctionRound returns copy with only StarGiftAuctionRound constructors.
func ( StarGiftAuctionRoundClassArray) () ( StarGiftAuctionRoundArray) {
	for ,  := range  {
		,  := .(*StarGiftAuctionRound)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsStarGiftAuctionRoundExtendable returns copy with only StarGiftAuctionRoundExtendable constructors.
func ( StarGiftAuctionRoundClassArray) () ( StarGiftAuctionRoundExtendableArray) {
	for ,  := range  {
		,  := .(*StarGiftAuctionRoundExtendable)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// StarGiftAuctionRoundArray is adapter for slice of StarGiftAuctionRound.
type StarGiftAuctionRoundArray []StarGiftAuctionRound

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// StarGiftAuctionRoundExtendableArray is adapter for slice of StarGiftAuctionRoundExtendable.
type StarGiftAuctionRoundExtendableArray []StarGiftAuctionRoundExtendable

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}