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

// ChatlistsGetExportedInvitesRequest represents TL type `chatlists.getExportedInvites#ce03da83`.
// List all chat folder deep links »¹ associated to a folder
//
// Links:
//  1. https://core.telegram.org/api/links#chat-folder-links
//
// See https://core.telegram.org/method/chatlists.getExportedInvites for reference.
type ChatlistsGetExportedInvitesRequest struct {
	// The folder
	Chatlist InputChatlistDialogFilter
}

// ChatlistsGetExportedInvitesRequestTypeID is TL type id of ChatlistsGetExportedInvitesRequest.
const ChatlistsGetExportedInvitesRequestTypeID = 0xce03da83

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

func ( *ChatlistsGetExportedInvitesRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Chatlist.Zero()) {
		return false
	}

	return true
}

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

// FillFrom fills ChatlistsGetExportedInvitesRequest from given interface.
func ( *ChatlistsGetExportedInvitesRequest) ( interface {
	() ( InputChatlistDialogFilter)
}) {
	.Chatlist = .()
}

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

// TypeName returns name of type in TL schema.
func (*ChatlistsGetExportedInvitesRequest) () string {
	return "chatlists.getExportedInvites"
}

// TypeInfo returns info about TL type.
func ( *ChatlistsGetExportedInvitesRequest) () tdp.Type {
	 := tdp.Type{
		Name: "chatlists.getExportedInvites",
		ID:   ChatlistsGetExportedInvitesRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Chatlist",
			SchemaName: "chatlist",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *ChatlistsGetExportedInvitesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode chatlists.getExportedInvites#ce03da83 as nil")
	}
	.PutID(ChatlistsGetExportedInvitesRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ChatlistsGetExportedInvitesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode chatlists.getExportedInvites#ce03da83 as nil")
	}
	if  := .Chatlist.Encode();  != nil {
		return fmt.Errorf("unable to encode chatlists.getExportedInvites#ce03da83: field chatlist: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *ChatlistsGetExportedInvitesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode chatlists.getExportedInvites#ce03da83 to nil")
	}
	if  := .ConsumeID(ChatlistsGetExportedInvitesRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode chatlists.getExportedInvites#ce03da83: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *ChatlistsGetExportedInvitesRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode chatlists.getExportedInvites#ce03da83 to nil")
	}
	{
		if  := .Chatlist.Decode();  != nil {
			return fmt.Errorf("unable to decode chatlists.getExportedInvites#ce03da83: field chatlist: %w", )
		}
	}
	return nil
}

// GetChatlist returns value of Chatlist field.
func ( *ChatlistsGetExportedInvitesRequest) () ( InputChatlistDialogFilter) {
	if  == nil {
		return
	}
	return .Chatlist
}

// ChatlistsGetExportedInvites invokes method chatlists.getExportedInvites#ce03da83 returning error if any.
// List all chat folder deep links »¹ associated to a folder
//
// Links:
//  1. https://core.telegram.org/api/links#chat-folder-links
//
// See https://core.telegram.org/method/chatlists.getExportedInvites for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  InputChatlistDialogFilter) (*ChatlistsExportedInvites, error) {
	var  ChatlistsExportedInvites

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