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

// KeyboardButtonClassArray is adapter for slice of KeyboardButtonClass.
type KeyboardButtonClassArray []KeyboardButtonClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsKeyboardButton returns copy with only KeyboardButton constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonArray) {
	for ,  := range  {
		,  := .(*KeyboardButton)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonURL returns copy with only KeyboardButtonURL constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonURLArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonURL)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonCallback returns copy with only KeyboardButtonCallback constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonCallbackArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonCallback)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonRequestPhone returns copy with only KeyboardButtonRequestPhone constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonRequestPhoneArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonRequestPhone)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonRequestGeoLocation returns copy with only KeyboardButtonRequestGeoLocation constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonRequestGeoLocationArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonRequestGeoLocation)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonSwitchInline returns copy with only KeyboardButtonSwitchInline constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonSwitchInlineArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonSwitchInline)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonGame returns copy with only KeyboardButtonGame constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonGameArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonGame)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonBuy returns copy with only KeyboardButtonBuy constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonBuyArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonBuy)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonURLAuth returns copy with only KeyboardButtonURLAuth constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonURLAuthArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonURLAuth)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputKeyboardButtonURLAuth returns copy with only InputKeyboardButtonURLAuth constructors.
func ( KeyboardButtonClassArray) () ( InputKeyboardButtonURLAuthArray) {
	for ,  := range  {
		,  := .(*InputKeyboardButtonURLAuth)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonRequestPoll returns copy with only KeyboardButtonRequestPoll constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonRequestPollArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonRequestPoll)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputKeyboardButtonUserProfile returns copy with only InputKeyboardButtonUserProfile constructors.
func ( KeyboardButtonClassArray) () ( InputKeyboardButtonUserProfileArray) {
	for ,  := range  {
		,  := .(*InputKeyboardButtonUserProfile)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonUserProfile returns copy with only KeyboardButtonUserProfile constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonUserProfileArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonUserProfile)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonWebView returns copy with only KeyboardButtonWebView constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonWebViewArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonWebView)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonSimpleWebView returns copy with only KeyboardButtonSimpleWebView constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonSimpleWebViewArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonSimpleWebView)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsKeyboardButtonRequestPeer returns copy with only KeyboardButtonRequestPeer constructors.
func ( KeyboardButtonClassArray) () ( KeyboardButtonRequestPeerArray) {
	for ,  := range  {
		,  := .(*KeyboardButtonRequestPeer)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// KeyboardButtonArray is adapter for slice of KeyboardButton.
type KeyboardButtonArray []KeyboardButton

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonURLArray is adapter for slice of KeyboardButtonURL.
type KeyboardButtonURLArray []KeyboardButtonURL

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonCallbackArray is adapter for slice of KeyboardButtonCallback.
type KeyboardButtonCallbackArray []KeyboardButtonCallback

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonRequestPhoneArray is adapter for slice of KeyboardButtonRequestPhone.
type KeyboardButtonRequestPhoneArray []KeyboardButtonRequestPhone

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonRequestGeoLocationArray is adapter for slice of KeyboardButtonRequestGeoLocation.
type KeyboardButtonRequestGeoLocationArray []KeyboardButtonRequestGeoLocation

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonSwitchInlineArray is adapter for slice of KeyboardButtonSwitchInline.
type KeyboardButtonSwitchInlineArray []KeyboardButtonSwitchInline

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonGameArray is adapter for slice of KeyboardButtonGame.
type KeyboardButtonGameArray []KeyboardButtonGame

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonBuyArray is adapter for slice of KeyboardButtonBuy.
type KeyboardButtonBuyArray []KeyboardButtonBuy

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonURLAuthArray is adapter for slice of KeyboardButtonURLAuth.
type KeyboardButtonURLAuthArray []KeyboardButtonURLAuth

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputKeyboardButtonURLAuthArray is adapter for slice of InputKeyboardButtonURLAuth.
type InputKeyboardButtonURLAuthArray []InputKeyboardButtonURLAuth

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonRequestPollArray is adapter for slice of KeyboardButtonRequestPoll.
type KeyboardButtonRequestPollArray []KeyboardButtonRequestPoll

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputKeyboardButtonUserProfileArray is adapter for slice of InputKeyboardButtonUserProfile.
type InputKeyboardButtonUserProfileArray []InputKeyboardButtonUserProfile

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonUserProfileArray is adapter for slice of KeyboardButtonUserProfile.
type KeyboardButtonUserProfileArray []KeyboardButtonUserProfile

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonWebViewArray is adapter for slice of KeyboardButtonWebView.
type KeyboardButtonWebViewArray []KeyboardButtonWebView

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonSimpleWebViewArray is adapter for slice of KeyboardButtonSimpleWebView.
type KeyboardButtonSimpleWebViewArray []KeyboardButtonSimpleWebView

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// KeyboardButtonRequestPeerArray is adapter for slice of KeyboardButtonRequestPeer.
type KeyboardButtonRequestPeerArray []KeyboardButtonRequestPeer

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}