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

// StickersDeleteStickerSetRequest represents TL type `stickers.deleteStickerSet#87704394`.
// Deletes a stickerset we created, bots only.
//
// See https://core.telegram.org/method/stickers.deleteStickerSet for reference.
type StickersDeleteStickerSetRequest struct {
	// Stickerset to delete
	Stickerset InputStickerSetClass
}

// StickersDeleteStickerSetRequestTypeID is TL type id of StickersDeleteStickerSetRequest.
const StickersDeleteStickerSetRequestTypeID = 0x87704394

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

func ( *StickersDeleteStickerSetRequest) () bool {
	if  == nil {
		return true
	}
	if !(.Stickerset == nil) {
		return false
	}

	return true
}

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

// FillFrom fills StickersDeleteStickerSetRequest from given interface.
func ( *StickersDeleteStickerSetRequest) ( interface {
	() ( InputStickerSetClass)
}) {
	.Stickerset = .()
}

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

// TypeName returns name of type in TL schema.
func (*StickersDeleteStickerSetRequest) () string {
	return "stickers.deleteStickerSet"
}

// TypeInfo returns info about TL type.
func ( *StickersDeleteStickerSetRequest) () tdp.Type {
	 := tdp.Type{
		Name: "stickers.deleteStickerSet",
		ID:   StickersDeleteStickerSetRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "Stickerset",
			SchemaName: "stickerset",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *StickersDeleteStickerSetRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode stickers.deleteStickerSet#87704394 as nil")
	}
	.PutID(StickersDeleteStickerSetRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *StickersDeleteStickerSetRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode stickers.deleteStickerSet#87704394 as nil")
	}
	if .Stickerset == nil {
		return fmt.Errorf("unable to encode stickers.deleteStickerSet#87704394: field stickerset is nil")
	}
	if  := .Stickerset.Encode();  != nil {
		return fmt.Errorf("unable to encode stickers.deleteStickerSet#87704394: field stickerset: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *StickersDeleteStickerSetRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode stickers.deleteStickerSet#87704394 to nil")
	}
	if  := .ConsumeID(StickersDeleteStickerSetRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode stickers.deleteStickerSet#87704394: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *StickersDeleteStickerSetRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode stickers.deleteStickerSet#87704394 to nil")
	}
	{
		,  := DecodeInputStickerSet()
		if  != nil {
			return fmt.Errorf("unable to decode stickers.deleteStickerSet#87704394: field stickerset: %w", )
		}
		.Stickerset = 
	}
	return nil
}

// GetStickerset returns value of Stickerset field.
func ( *StickersDeleteStickerSetRequest) () ( InputStickerSetClass) {
	if  == nil {
		return
	}
	return .Stickerset
}

// StickersDeleteStickerSet invokes method stickers.deleteStickerSet#87704394 returning error if any.
// Deletes a stickerset we created, bots only.
//
// Possible errors:
//
//	400 BOT_MISSING: Only bots can call this method, please use @stickers if you're a user.
//	400 STICKERSET_INVALID: The provided sticker set is invalid.
//
// See https://core.telegram.org/method/stickers.deleteStickerSet for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  InputStickerSetClass) (bool, error) {
	var  BoolBox

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