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

// AccountResetWebAuthorizationsRequest represents TL type `account.resetWebAuthorizations#682d2594`.
// Reset all active web telegram loginĀ¹ sessions
//
// Links:
//  1. https://core.telegram.org/widgets/login
//
// See https://core.telegram.org/method/account.resetWebAuthorizations for reference.
type AccountResetWebAuthorizationsRequest struct {
}

// AccountResetWebAuthorizationsRequestTypeID is TL type id of AccountResetWebAuthorizationsRequest.
const AccountResetWebAuthorizationsRequestTypeID = 0x682d2594

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*AccountResetWebAuthorizationsRequest) () string {
	return "account.resetWebAuthorizations"
}

// TypeInfo returns info about TL type.
func ( *AccountResetWebAuthorizationsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "account.resetWebAuthorizations",
		ID:   AccountResetWebAuthorizationsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *AccountResetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.resetWebAuthorizations#682d2594 as nil")
	}
	.PutID(AccountResetWebAuthorizationsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountResetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.resetWebAuthorizations#682d2594 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountResetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.resetWebAuthorizations#682d2594 to nil")
	}
	if  := .ConsumeID(AccountResetWebAuthorizationsRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.resetWebAuthorizations#682d2594: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountResetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.resetWebAuthorizations#682d2594 to nil")
	}
	return nil
}

// AccountResetWebAuthorizations invokes method account.resetWebAuthorizations#682d2594 returning error if any.
// Reset all active web telegram loginĀ¹ sessions
//
// Links:
//  1. https://core.telegram.org/widgets/login
//
// See https://core.telegram.org/method/account.resetWebAuthorizations for reference.
func ( *Client) ( context.Context) (bool, error) {
	var  BoolBox

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