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

// MessagesGetMaskStickersRequest represents TL type `messages.getMaskStickers#640f82b8`.
// Get installed mask stickers
//
// See https://core.telegram.org/method/messages.getMaskStickers for reference.
type MessagesGetMaskStickersRequest struct {
	// Hash for pagination, for more info click hereĀ¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int64
}

// MessagesGetMaskStickersRequestTypeID is TL type id of MessagesGetMaskStickersRequest.
const MessagesGetMaskStickersRequestTypeID = 0x640f82b8

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

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

	return true
}

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

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

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

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

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

// Encode implements bin.Encoder.
func ( *MessagesGetMaskStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getMaskStickers#640f82b8 as nil")
	}
	.PutID(MessagesGetMaskStickersRequestTypeID)
	return .EncodeBare()
}

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

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

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

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

// MessagesGetMaskStickers invokes method messages.getMaskStickers#640f82b8 returning error if any.
// Get installed mask stickers
//
// See https://core.telegram.org/method/messages.getMaskStickers for reference.
func ( *Client) ( context.Context,  int64) (MessagesAllStickersClass, error) {
	var  MessagesAllStickersBox

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