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

// AuthLoginTokenClassArray is adapter for slice of AuthLoginTokenClass.
type AuthLoginTokenClassArray []AuthLoginTokenClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsAuthLoginToken returns copy with only AuthLoginToken constructors.
func ( AuthLoginTokenClassArray) () ( AuthLoginTokenArray) {
	for ,  := range  {
		,  := .(*AuthLoginToken)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsAuthLoginTokenMigrateTo returns copy with only AuthLoginTokenMigrateTo constructors.
func ( AuthLoginTokenClassArray) () ( AuthLoginTokenMigrateToArray) {
	for ,  := range  {
		,  := .(*AuthLoginTokenMigrateTo)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsAuthLoginTokenSuccess returns copy with only AuthLoginTokenSuccess constructors.
func ( AuthLoginTokenClassArray) () ( AuthLoginTokenSuccessArray) {
	for ,  := range  {
		,  := .(*AuthLoginTokenSuccess)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AuthLoginTokenArray is adapter for slice of AuthLoginToken.
type AuthLoginTokenArray []AuthLoginToken

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AuthLoginTokenMigrateToArray is adapter for slice of AuthLoginTokenMigrateTo.
type AuthLoginTokenMigrateToArray []AuthLoginTokenMigrateTo

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AuthLoginTokenSuccessArray is adapter for slice of AuthLoginTokenSuccess.
type AuthLoginTokenSuccessArray []AuthLoginTokenSuccess

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}