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

// ContactsBlockedClassArray is adapter for slice of ContactsBlockedClass.
type ContactsBlockedClassArray []ContactsBlockedClass

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// AsContactsBlocked returns copy with only ContactsBlocked constructors.
func ( ContactsBlockedClassArray) () ( ContactsBlockedArray) {
	for ,  := range  {
		,  := .(*ContactsBlocked)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsContactsBlockedSlice returns copy with only ContactsBlockedSlice constructors.
func ( ContactsBlockedClassArray) () ( ContactsBlockedSliceArray) {
	for ,  := range  {
		,  := .(*ContactsBlockedSlice)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// ContactsBlockedArray is adapter for slice of ContactsBlocked.
type ContactsBlockedArray []ContactsBlocked

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}

// ContactsBlockedSliceArray is adapter for slice of ContactsBlockedSlice.
type ContactsBlockedSliceArray []ContactsBlockedSlice

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

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

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

	return 
}

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

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

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

	 := *
	 = [0]

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

	return , true
}

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

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

	return , true
}