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

// SecurePasswordKdfAlgoClassArray is adapter for slice of SecurePasswordKdfAlgoClass.
type SecurePasswordKdfAlgoClassArray []SecurePasswordKdfAlgoClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 returns copy with only SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 constructors.
func ( SecurePasswordKdfAlgoClassArray) () ( SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000Array) {
	for ,  := range  {
		,  := .(*SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsSecurePasswordKdfAlgoSHA512 returns copy with only SecurePasswordKdfAlgoSHA512 constructors.
func ( SecurePasswordKdfAlgoClassArray) () ( SecurePasswordKdfAlgoSHA512Array) {
	for ,  := range  {
		,  := .(*SecurePasswordKdfAlgoSHA512)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000Array is adapter for slice of SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.
type SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000Array []SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// SecurePasswordKdfAlgoSHA512Array is adapter for slice of SecurePasswordKdfAlgoSHA512.
type SecurePasswordKdfAlgoSHA512Array []SecurePasswordKdfAlgoSHA512

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}