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

// MessagesGetFeaturedEmojiStickersRequest represents TL type `messages.getFeaturedEmojiStickers#ecf6736`.
// Gets featured custom emoji stickersets.
//
// See https://core.telegram.org/method/messages.getFeaturedEmojiStickers for reference.
type MessagesGetFeaturedEmojiStickersRequest struct {
	// Hash for pagination, for more info click hereĀ¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int64
}

// MessagesGetFeaturedEmojiStickersRequestTypeID is TL type id of MessagesGetFeaturedEmojiStickersRequest.
const MessagesGetFeaturedEmojiStickersRequestTypeID = 0xecf6736

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

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

	return true
}

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

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

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

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

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

// Encode implements bin.Encoder.
func ( *MessagesGetFeaturedEmojiStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getFeaturedEmojiStickers#ecf6736 as nil")
	}
	.PutID(MessagesGetFeaturedEmojiStickersRequestTypeID)
	return .EncodeBare()
}

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

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

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

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

// MessagesGetFeaturedEmojiStickers invokes method messages.getFeaturedEmojiStickers#ecf6736 returning error if any.
// Gets featured custom emoji stickersets.
//
// See https://core.telegram.org/method/messages.getFeaturedEmojiStickers for reference.
func ( *Client) ( context.Context,  int64) (MessagesFeaturedStickersClass, error) {
	var  MessagesFeaturedStickersBox

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