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

// AccountGetAccountTTLRequest represents TL type `account.getAccountTTL#8fc711d`.
// Get days to live of account
//
// See https://core.telegram.org/method/account.getAccountTTL for reference.
type AccountGetAccountTTLRequest struct {
}

// AccountGetAccountTTLRequestTypeID is TL type id of AccountGetAccountTTLRequest.
const AccountGetAccountTTLRequestTypeID = 0x8fc711d

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

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *AccountGetAccountTTLRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getAccountTTL#8fc711d as nil")
	}
	.PutID(AccountGetAccountTTLRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountGetAccountTTLRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getAccountTTL#8fc711d as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountGetAccountTTLRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getAccountTTL#8fc711d to nil")
	}
	if  := .ConsumeID(AccountGetAccountTTLRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.getAccountTTL#8fc711d: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountGetAccountTTLRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getAccountTTL#8fc711d to nil")
	}
	return nil
}

// AccountGetAccountTTL invokes method account.getAccountTTL#8fc711d returning error if any.
// Get days to live of account
//
// See https://core.telegram.org/method/account.getAccountTTL for reference.
func ( *Client) ( context.Context) (*AccountDaysTTL, error) {
	var  AccountDaysTTL

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