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

// AccountGetWebAuthorizationsRequest represents TL type `account.getWebAuthorizations#182e6d6f`.
// Get web login widget¹ authorizations
//
// Links:
//  1. https://core.telegram.org/widgets/login
//
// See https://core.telegram.org/method/account.getWebAuthorizations for reference.
type AccountGetWebAuthorizationsRequest struct {
}

// AccountGetWebAuthorizationsRequestTypeID is TL type id of AccountGetWebAuthorizationsRequest.
const AccountGetWebAuthorizationsRequestTypeID = 0x182e6d6f

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

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getWebAuthorizations#182e6d6f as nil")
	}
	.PutID(AccountGetWebAuthorizationsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getWebAuthorizations#182e6d6f as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getWebAuthorizations#182e6d6f to nil")
	}
	if  := .ConsumeID(AccountGetWebAuthorizationsRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.getWebAuthorizations#182e6d6f: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountGetWebAuthorizationsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getWebAuthorizations#182e6d6f to nil")
	}
	return nil
}

// AccountGetWebAuthorizations invokes method account.getWebAuthorizations#182e6d6f returning error if any.
// Get web login widget¹ authorizations
//
// Links:
//  1. https://core.telegram.org/widgets/login
//
// See https://core.telegram.org/method/account.getWebAuthorizations for reference.
func ( *Client) ( context.Context) (*AccountWebAuthorizations, error) {
	var  AccountWebAuthorizations

	 := &AccountGetWebAuthorizationsRequest{}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return &, nil
}