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

// MessagesReadFeaturedStickersRequest represents TL type `messages.readFeaturedStickers#5b118126`.
// Mark new featured stickers as read
//
// See https://core.telegram.org/method/messages.readFeaturedStickers for reference.
type MessagesReadFeaturedStickersRequest struct {
	// IDs of stickersets to mark as read
	ID []int64
}

// MessagesReadFeaturedStickersRequestTypeID is TL type id of MessagesReadFeaturedStickersRequest.
const MessagesReadFeaturedStickersRequestTypeID = 0x5b118126

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

func ( *MessagesReadFeaturedStickersRequest) () bool {
	if  == nil {
		return true
	}
	if !(.ID == nil) {
		return false
	}

	return true
}

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

// FillFrom fills MessagesReadFeaturedStickersRequest from given interface.
func ( *MessagesReadFeaturedStickersRequest) ( interface {
	() ( []int64)
}) {
	.ID = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *MessagesReadFeaturedStickersRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.readFeaturedStickers",
		ID:   MessagesReadFeaturedStickersRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ID",
			SchemaName: "id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesReadFeaturedStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.readFeaturedStickers#5b118126 as nil")
	}
	.PutID(MessagesReadFeaturedStickersRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesReadFeaturedStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.readFeaturedStickers#5b118126 as nil")
	}
	.PutVectorHeader(len(.ID))
	for ,  := range .ID {
		.PutLong()
	}
	return nil
}

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

// DecodeBare implements bin.BareDecoder.
func ( *MessagesReadFeaturedStickersRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.readFeaturedStickers#5b118126 to nil")
	}
	{
		,  := .VectorHeader()
		if  != nil {
			return fmt.Errorf("unable to decode messages.readFeaturedStickers#5b118126: field id: %w", )
		}

		if  > 0 {
			.ID = make([]int64, 0, %bin.PreallocateLimit)
		}
		for  := 0;  < ; ++ {
			,  := .Long()
			if  != nil {
				return fmt.Errorf("unable to decode messages.readFeaturedStickers#5b118126: field id: %w", )
			}
			.ID = append(.ID, )
		}
	}
	return nil
}

// GetID returns value of ID field.
func ( *MessagesReadFeaturedStickersRequest) () ( []int64) {
	if  == nil {
		return
	}
	return .ID
}

// MessagesReadFeaturedStickers invokes method messages.readFeaturedStickers#5b118126 returning error if any.
// Mark new featured stickers as read
//
// See https://core.telegram.org/method/messages.readFeaturedStickers for reference.
func ( *Client) ( context.Context,  []int64) (bool, error) {
	var  BoolBox

	 := &MessagesReadFeaturedStickersRequest{
		ID: ,
	}
	if  := .rpc.Invoke(, , &);  != nil {
		return false, 
	}
	,  := .Bool.(*BoolTrue)
	return , nil
}