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

// MessagesDeleteQuickReplyShortcutRequest represents TL type `messages.deleteQuickReplyShortcut#3cc04740`.
// Completely delete a quick reply shortcut¹.
// This will also emit an updateDeleteQuickReply² update to other logged-in sessions
// (and no updateDeleteQuickReplyMessages³ updates, even if all the messages in the
// shortcuts are also deleted by this method).
//
// Links:
//  1. https://core.telegram.org/api/business#quick-reply-shortcuts
//  2. https://core.telegram.org/constructor/updateDeleteQuickReply
//  3. https://core.telegram.org/constructor/updateDeleteQuickReplyMessages
//
// See https://core.telegram.org/method/messages.deleteQuickReplyShortcut for reference.
type MessagesDeleteQuickReplyShortcutRequest struct {
	// Shortcut ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/business#quick-reply-shortcuts
	ShortcutID int
}

// MessagesDeleteQuickReplyShortcutRequestTypeID is TL type id of MessagesDeleteQuickReplyShortcutRequest.
const MessagesDeleteQuickReplyShortcutRequestTypeID = 0x3cc04740

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

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

	return true
}

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

// FillFrom fills MessagesDeleteQuickReplyShortcutRequest from given interface.
func ( *MessagesDeleteQuickReplyShortcutRequest) ( interface {
	() ( int)
}) {
	.ShortcutID = .()
}

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

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

// TypeInfo returns info about TL type.
func ( *MessagesDeleteQuickReplyShortcutRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.deleteQuickReplyShortcut",
		ID:   MessagesDeleteQuickReplyShortcutRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ShortcutID",
			SchemaName: "shortcut_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesDeleteQuickReplyShortcutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.deleteQuickReplyShortcut#3cc04740 as nil")
	}
	.PutID(MessagesDeleteQuickReplyShortcutRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesDeleteQuickReplyShortcutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.deleteQuickReplyShortcut#3cc04740 as nil")
	}
	.PutInt(.ShortcutID)
	return nil
}

// Decode implements bin.Decoder.
func ( *MessagesDeleteQuickReplyShortcutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.deleteQuickReplyShortcut#3cc04740 to nil")
	}
	if  := .ConsumeID(MessagesDeleteQuickReplyShortcutRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode messages.deleteQuickReplyShortcut#3cc04740: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *MessagesDeleteQuickReplyShortcutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.deleteQuickReplyShortcut#3cc04740 to nil")
	}
	{
		,  := .Int()
		if  != nil {
			return fmt.Errorf("unable to decode messages.deleteQuickReplyShortcut#3cc04740: field shortcut_id: %w", )
		}
		.ShortcutID = 
	}
	return nil
}

// GetShortcutID returns value of ShortcutID field.
func ( *MessagesDeleteQuickReplyShortcutRequest) () ( int) {
	if  == nil {
		return
	}
	return .ShortcutID
}

// MessagesDeleteQuickReplyShortcut invokes method messages.deleteQuickReplyShortcut#3cc04740 returning error if any.
// Completely delete a quick reply shortcut¹.
// This will also emit an updateDeleteQuickReply² update to other logged-in sessions
// (and no updateDeleteQuickReplyMessages³ updates, even if all the messages in the
// shortcuts are also deleted by this method).
//
// Links:
//  1. https://core.telegram.org/api/business#quick-reply-shortcuts
//  2. https://core.telegram.org/constructor/updateDeleteQuickReply
//  3. https://core.telegram.org/constructor/updateDeleteQuickReplyMessages
//
// Possible errors:
//
//	400 SHORTCUT_INVALID: The specified shortcut is invalid.
//
// See https://core.telegram.org/method/messages.deleteQuickReplyShortcut for reference.
func ( *Client) ( context.Context,  int) (bool, error) {
	var  BoolBox

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