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

// AccountGetConnectedBotsRequest represents TL type `account.getConnectedBots#4ea4c80f`.
// List all currently connected business bots »¹
//
// Links:
//  1. https://core.telegram.org/api/bots/connected-business-bots
//
// See https://core.telegram.org/method/account.getConnectedBots for reference.
type AccountGetConnectedBotsRequest struct {
}

// AccountGetConnectedBotsRequestTypeID is TL type id of AccountGetConnectedBotsRequest.
const AccountGetConnectedBotsRequestTypeID = 0x4ea4c80f

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

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

	return true
}

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

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

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

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

// Encode implements bin.Encoder.
func ( *AccountGetConnectedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getConnectedBots#4ea4c80f as nil")
	}
	.PutID(AccountGetConnectedBotsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *AccountGetConnectedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode account.getConnectedBots#4ea4c80f as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *AccountGetConnectedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getConnectedBots#4ea4c80f to nil")
	}
	if  := .ConsumeID(AccountGetConnectedBotsRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode account.getConnectedBots#4ea4c80f: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *AccountGetConnectedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode account.getConnectedBots#4ea4c80f to nil")
	}
	return nil
}

// AccountGetConnectedBots invokes method account.getConnectedBots#4ea4c80f returning error if any.
// List all currently connected business bots »¹
//
// Links:
//  1. https://core.telegram.org/api/bots/connected-business-bots
//
// See https://core.telegram.org/method/account.getConnectedBots for reference.
func ( *Client) ( context.Context) (*AccountConnectedBots, error) {
	var  AccountConnectedBots

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