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

// ChatlistsDeleteExportedInviteRequest represents TL type `chatlists.deleteExportedInvite#719c5c5e`.
// Delete a previously created chat folder deep link »¹.
//
// Links:
//  1. https://core.telegram.org/api/links#chat-folder-links
//
// See https://core.telegram.org/method/chatlists.deleteExportedInvite for reference.
type ChatlistsDeleteExportedInviteRequest struct {
	// The related folder
	Chatlist InputChatlistDialogFilter
	// slug obtained from the chat folder deep link »¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/links#chat-folder-links
	Slug string
}

// ChatlistsDeleteExportedInviteRequestTypeID is TL type id of ChatlistsDeleteExportedInviteRequest.
const ChatlistsDeleteExportedInviteRequestTypeID = 0x719c5c5e

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

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

	return true
}

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

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

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

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

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

// Encode implements bin.Encoder.
func ( *ChatlistsDeleteExportedInviteRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode chatlists.deleteExportedInvite#719c5c5e as nil")
	}
	.PutID(ChatlistsDeleteExportedInviteRequestTypeID)
	return .EncodeBare()
}

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

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

// DecodeBare implements bin.BareDecoder.
func ( *ChatlistsDeleteExportedInviteRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode chatlists.deleteExportedInvite#719c5c5e to nil")
	}
	{
		if  := .Chatlist.Decode();  != nil {
			return fmt.Errorf("unable to decode chatlists.deleteExportedInvite#719c5c5e: field chatlist: %w", )
		}
	}
	{
		,  := .String()
		if  != nil {
			return fmt.Errorf("unable to decode chatlists.deleteExportedInvite#719c5c5e: field slug: %w", )
		}
		.Slug = 
	}
	return nil
}

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

// GetSlug returns value of Slug field.
func ( *ChatlistsDeleteExportedInviteRequest) () ( string) {
	if  == nil {
		return
	}
	return .Slug
}

// ChatlistsDeleteExportedInvite invokes method chatlists.deleteExportedInvite#719c5c5e returning error if any.
// Delete a previously created chat folder deep link »¹.
//
// Links:
//  1. https://core.telegram.org/api/links#chat-folder-links
//
// Possible errors:
//
//	400 FILTER_ID_INVALID: The specified filter ID is invalid.
//
// See https://core.telegram.org/method/chatlists.deleteExportedInvite for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  *ChatlistsDeleteExportedInviteRequest) (bool, error) {
	var  BoolBox

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