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

// AccountResetPasswordResultClassArray is adapter for slice of AccountResetPasswordResultClass.
type AccountResetPasswordResultClassArray []AccountResetPasswordResultClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsAccountResetPasswordFailedWait returns copy with only AccountResetPasswordFailedWait constructors.
func ( AccountResetPasswordResultClassArray) () ( AccountResetPasswordFailedWaitArray) {
	for ,  := range  {
		,  := .(*AccountResetPasswordFailedWait)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsAccountResetPasswordRequestedWait returns copy with only AccountResetPasswordRequestedWait constructors.
func ( AccountResetPasswordResultClassArray) () ( AccountResetPasswordRequestedWaitArray) {
	for ,  := range  {
		,  := .(*AccountResetPasswordRequestedWait)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AccountResetPasswordFailedWaitArray is adapter for slice of AccountResetPasswordFailedWait.
type AccountResetPasswordFailedWaitArray []AccountResetPasswordFailedWait

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AccountResetPasswordRequestedWaitArray is adapter for slice of AccountResetPasswordRequestedWait.
type AccountResetPasswordRequestedWaitArray []AccountResetPasswordRequestedWait

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}