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

// URLAuthResultClassArray is adapter for slice of URLAuthResultClass.
type URLAuthResultClassArray []URLAuthResultClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsURLAuthResultRequest returns copy with only URLAuthResultRequest constructors.
func ( URLAuthResultClassArray) () ( URLAuthResultRequestArray) {
	for ,  := range  {
		,  := .(*URLAuthResultRequest)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsURLAuthResultAccepted returns copy with only URLAuthResultAccepted constructors.
func ( URLAuthResultClassArray) () ( URLAuthResultAcceptedArray) {
	for ,  := range  {
		,  := .(*URLAuthResultAccepted)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// URLAuthResultRequestArray is adapter for slice of URLAuthResultRequest.
type URLAuthResultRequestArray []URLAuthResultRequest

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// URLAuthResultAcceptedArray is adapter for slice of URLAuthResultAccepted.
type URLAuthResultAcceptedArray []URLAuthResultAccepted

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}