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

// ContactsResetSavedRequest represents TL type `contacts.resetSaved#879537f1`.
// Delete saved contacts
//
// See https://core.telegram.org/method/contacts.resetSaved for reference.
type ContactsResetSavedRequest struct {
}

// ContactsResetSavedRequestTypeID is TL type id of ContactsResetSavedRequest.
const ContactsResetSavedRequestTypeID = 0x879537f1

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

func ( *ContactsResetSavedRequest) () bool {
	if  == nil {
		return true
	}

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*ContactsResetSavedRequest) () string {
	return "contacts.resetSaved"
}

// TypeInfo returns info about TL type.
func ( *ContactsResetSavedRequest) () tdp.Type {
	 := tdp.Type{
		Name: "contacts.resetSaved",
		ID:   ContactsResetSavedRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *ContactsResetSavedRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode contacts.resetSaved#879537f1 as nil")
	}
	.PutID(ContactsResetSavedRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *ContactsResetSavedRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode contacts.resetSaved#879537f1 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *ContactsResetSavedRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode contacts.resetSaved#879537f1 to nil")
	}
	if  := .ConsumeID(ContactsResetSavedRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode contacts.resetSaved#879537f1: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *ContactsResetSavedRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode contacts.resetSaved#879537f1 to nil")
	}
	return nil
}

// ContactsResetSaved invokes method contacts.resetSaved#879537f1 returning error if any.
// Delete saved contacts
//
// See https://core.telegram.org/method/contacts.resetSaved for reference.
func ( *Client) ( context.Context) (bool, error) {
	var  BoolBox

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