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

// MessagesGetEmojiKeywordsRequest represents TL type `messages.getEmojiKeywords#35a0e062`.
// Get localized emoji keywords »¹.
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji#emoji-keywords
//
// See https://core.telegram.org/method/messages.getEmojiKeywords for reference.
type MessagesGetEmojiKeywordsRequest struct {
	// Language code
	LangCode string
}

// MessagesGetEmojiKeywordsRequestTypeID is TL type id of MessagesGetEmojiKeywordsRequest.
const MessagesGetEmojiKeywordsRequestTypeID = 0x35a0e062

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

func ( *MessagesGetEmojiKeywordsRequest) () bool {
	if  == nil {
		return true
	}
	if !(.LangCode == "") {
		return false
	}

	return true
}

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

// FillFrom fills MessagesGetEmojiKeywordsRequest from given interface.
func ( *MessagesGetEmojiKeywordsRequest) ( interface {
	() ( string)
}) {
	.LangCode = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *MessagesGetEmojiKeywordsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.getEmojiKeywords",
		ID:   MessagesGetEmojiKeywordsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "LangCode",
			SchemaName: "lang_code",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesGetEmojiKeywordsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getEmojiKeywords#35a0e062 as nil")
	}
	.PutID(MessagesGetEmojiKeywordsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesGetEmojiKeywordsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getEmojiKeywords#35a0e062 as nil")
	}
	.PutString(.LangCode)
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *MessagesGetEmojiKeywordsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getEmojiKeywords#35a0e062 to nil")
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode messages.getEmojiKeywords#35a0e062: field lang_code: %w", )
		}
		.LangCode = 
	}
	return nil
}

// GetLangCode returns value of LangCode field.
func ( *MessagesGetEmojiKeywordsRequest) () ( string) {
	if  == nil {
		return
	}
	return .LangCode
}

// MessagesGetEmojiKeywords invokes method messages.getEmojiKeywords#35a0e062 returning error if any.
// Get localized emoji keywords »¹.
//
// Links:
//  1. https://core.telegram.org/api/custom-emoji#emoji-keywords
//
// See https://core.telegram.org/method/messages.getEmojiKeywords for reference.
func ( *Client) ( context.Context,  string) (*EmojiKeywordsDifference, error) {
	var  EmojiKeywordsDifference

	 := &MessagesGetEmojiKeywordsRequest{
		LangCode: ,
	}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return &, nil
}