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

// AuthLogOutRequest represents TL type `auth.logOut#3e72ba19`.
// Logs out the user.
//
// See https://core.telegram.org/method/auth.logOut for reference.
type AuthLogOutRequest struct {
}

// AuthLogOutRequestTypeID is TL type id of AuthLogOutRequest.
const AuthLogOutRequestTypeID = 0x3e72ba19

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*AuthLogOutRequest) () string {
	return "auth.logOut"
}

// TypeInfo returns info about TL type.
func ( *AuthLogOutRequest) () tdp.Type {
	 := tdp.Type{
		Name: "auth.logOut",
		ID:   AuthLogOutRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *AuthLogOutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode auth.logOut#3e72ba19 as nil")
	}
	.PutID(AuthLogOutRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AuthLogOutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode auth.logOut#3e72ba19 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *AuthLogOutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode auth.logOut#3e72ba19 to nil")
	}
	if  := .ConsumeID(AuthLogOutRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode auth.logOut#3e72ba19: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AuthLogOutRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode auth.logOut#3e72ba19 to nil")
	}
	return nil
}

// AuthLogOut invokes method auth.logOut#3e72ba19 returning error if any.
// Logs out the user.
//
// See https://core.telegram.org/method/auth.logOut for reference.
// Can be used by bots.
func ( *Client) ( context.Context) (*AuthLoggedOut, error) {
	var  AuthLoggedOut

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