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

// MessagesGetEmojiStickersRequest represents TL type `messages.getEmojiStickers#fbfca18f`.
// Gets the list of currently installed custom emoji stickersets¹.
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji
//
// See https://core.telegram.org/method/messages.getEmojiStickers for reference.
type MessagesGetEmojiStickersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int64
}

// MessagesGetEmojiStickersRequestTypeID is TL type id of MessagesGetEmojiStickersRequest.
const MessagesGetEmojiStickersRequestTypeID = 0xfbfca18f

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

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

	return true
}

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

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

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

// TypeName returns name of type in TL schema.
func (*MessagesGetEmojiStickersRequest) () string {
	return "messages.getEmojiStickers"
}

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

// Encode implements bin.Encoder.
func ( *MessagesGetEmojiStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getEmojiStickers#fbfca18f as nil")
	}
	.PutID(MessagesGetEmojiStickersRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesGetEmojiStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getEmojiStickers#fbfca18f as nil")
	}
	.PutLong(.Hash)
	return nil
}

// Decode implements bin.Decoder.
func ( *MessagesGetEmojiStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getEmojiStickers#fbfca18f to nil")
	}
	if  := .ConsumeID(MessagesGetEmojiStickersRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode messages.getEmojiStickers#fbfca18f: %w", )
	}
	return .DecodeBare()
}

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

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

// MessagesGetEmojiStickers invokes method messages.getEmojiStickers#fbfca18f returning error if any.
// Gets the list of currently installed custom emoji stickersets¹.
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji
//
// See https://core.telegram.org/method/messages.getEmojiStickers for reference.
func ( *Client) ( context.Context,  int64) (MessagesAllStickersClass, error) {
	var  MessagesAllStickersBox

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