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

// AccountGetDefaultBackgroundEmojisRequest represents TL type `account.getDefaultBackgroundEmojis#a60ab9ce`.
// Get a set of suggested custom emoji stickers¹ that can be used in an accent color
// pattern².
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji
//  2. https://core.telegram.org/api/colors
//
// See https://core.telegram.org/method/account.getDefaultBackgroundEmojis for reference.
type AccountGetDefaultBackgroundEmojisRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int64
}

// AccountGetDefaultBackgroundEmojisRequestTypeID is TL type id of AccountGetDefaultBackgroundEmojisRequest.
const AccountGetDefaultBackgroundEmojisRequestTypeID = 0xa60ab9ce

// Ensuring interfaces in compile-time for AccountGetDefaultBackgroundEmojisRequest.
var (
	_ bin.Encoder     = &AccountGetDefaultBackgroundEmojisRequest{}
	_ bin.Decoder     = &AccountGetDefaultBackgroundEmojisRequest{}
	_ bin.BareEncoder = &AccountGetDefaultBackgroundEmojisRequest{}
	_ bin.BareDecoder = &AccountGetDefaultBackgroundEmojisRequest{}
)

func ( *AccountGetDefaultBackgroundEmojisRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Hash == 0) {
		return false
	}

	return true
}

// String implements fmt.Stringer.
func ( *AccountGetDefaultBackgroundEmojisRequest) () string {
	if  == nil {
		return "AccountGetDefaultBackgroundEmojisRequest(nil)"
	}
	type  AccountGetDefaultBackgroundEmojisRequest
	return fmt.Sprintf("AccountGetDefaultBackgroundEmojisRequest%+v", (*))
}

// FillFrom fills AccountGetDefaultBackgroundEmojisRequest from given interface.
func ( *AccountGetDefaultBackgroundEmojisRequest) ( interface {
	() ( int64)
}) {
	.Hash = .()
}

// TypeID returns type id in TL schema.
//
// See https://core.telegram.org/mtproto/TL-tl#remarks.
func (*AccountGetDefaultBackgroundEmojisRequest) () uint32 {
	return AccountGetDefaultBackgroundEmojisRequestTypeID
}

// TypeName returns name of type in TL schema.
func (*AccountGetDefaultBackgroundEmojisRequest) () string {
	return "account.getDefaultBackgroundEmojis"
}

// TypeInfo returns info about TL type.
func ( *AccountGetDefaultBackgroundEmojisRequest) () tdp.Type {
	 := tdp.Type{
		Name: "account.getDefaultBackgroundEmojis",
		ID:   AccountGetDefaultBackgroundEmojisRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Hash",
			SchemaName: "hash",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *AccountGetDefaultBackgroundEmojisRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getDefaultBackgroundEmojis#a60ab9ce as nil")
	}
	.PutID(AccountGetDefaultBackgroundEmojisRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountGetDefaultBackgroundEmojisRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getDefaultBackgroundEmojis#a60ab9ce as nil")
	}
	.PutLong(.Hash)
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountGetDefaultBackgroundEmojisRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getDefaultBackgroundEmojis#a60ab9ce to nil")
	}
	if  := .ConsumeID(AccountGetDefaultBackgroundEmojisRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.getDefaultBackgroundEmojis#a60ab9ce: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountGetDefaultBackgroundEmojisRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getDefaultBackgroundEmojis#a60ab9ce to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode account.getDefaultBackgroundEmojis#a60ab9ce: field hash: %w", )
		}
		.Hash = 
	}
	return nil
}

// GetHash returns value of Hash field.
func ( *AccountGetDefaultBackgroundEmojisRequest) () ( int64) {
	if  == nil {
		return
	}
	return .Hash
}

// AccountGetDefaultBackgroundEmojis invokes method account.getDefaultBackgroundEmojis#a60ab9ce returning error if any.
// Get a set of suggested custom emoji stickers¹ that can be used in an accent color
// pattern².
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji
//  2. https://core.telegram.org/api/colors
//
// See https://core.telegram.org/method/account.getDefaultBackgroundEmojis for reference.
func ( *Client) ( context.Context,  int64) (EmojiListClass, error) {
	var  EmojiListBox

	 := &AccountGetDefaultBackgroundEmojisRequest{
		Hash: ,
	}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return .EmojiList, nil
}