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

// InputPaymentCredentialsClassArray is adapter for slice of InputPaymentCredentialsClass.
type InputPaymentCredentialsClassArray []InputPaymentCredentialsClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsInputPaymentCredentialsSaved returns copy with only InputPaymentCredentialsSaved constructors.
func ( InputPaymentCredentialsClassArray) () ( InputPaymentCredentialsSavedArray) {
	for ,  := range  {
		,  := .(*InputPaymentCredentialsSaved)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputPaymentCredentials returns copy with only InputPaymentCredentials constructors.
func ( InputPaymentCredentialsClassArray) () ( InputPaymentCredentialsArray) {
	for ,  := range  {
		,  := .(*InputPaymentCredentials)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputPaymentCredentialsApplePay returns copy with only InputPaymentCredentialsApplePay constructors.
func ( InputPaymentCredentialsClassArray) () ( InputPaymentCredentialsApplePayArray) {
	for ,  := range  {
		,  := .(*InputPaymentCredentialsApplePay)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsInputPaymentCredentialsGooglePay returns copy with only InputPaymentCredentialsGooglePay constructors.
func ( InputPaymentCredentialsClassArray) () ( InputPaymentCredentialsGooglePayArray) {
	for ,  := range  {
		,  := .(*InputPaymentCredentialsGooglePay)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// InputPaymentCredentialsSavedArray is adapter for slice of InputPaymentCredentialsSaved.
type InputPaymentCredentialsSavedArray []InputPaymentCredentialsSaved

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputPaymentCredentialsArray is adapter for slice of InputPaymentCredentials.
type InputPaymentCredentialsArray []InputPaymentCredentials

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputPaymentCredentialsApplePayArray is adapter for slice of InputPaymentCredentialsApplePay.
type InputPaymentCredentialsApplePayArray []InputPaymentCredentialsApplePay

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// InputPaymentCredentialsGooglePayArray is adapter for slice of InputPaymentCredentialsGooglePay.
type InputPaymentCredentialsGooglePayArray []InputPaymentCredentialsGooglePay

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}