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

// BotsGetAdminedBotsRequest represents TL type `bots.getAdminedBots#b0711d83`.
// Get a list of bots owned by the current user
//
// See https://core.telegram.org/method/bots.getAdminedBots for reference.
type BotsGetAdminedBotsRequest struct {
}

// BotsGetAdminedBotsRequestTypeID is TL type id of BotsGetAdminedBotsRequest.
const BotsGetAdminedBotsRequestTypeID = 0xb0711d83

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*BotsGetAdminedBotsRequest) () string {
	return "bots.getAdminedBots"
}

// TypeInfo returns info about TL type.
func ( *BotsGetAdminedBotsRequest) () tdp.Type {
	 := tdp.Type{
		Name: "bots.getAdminedBots",
		ID:   BotsGetAdminedBotsRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *BotsGetAdminedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode bots.getAdminedBots#b0711d83 as nil")
	}
	.PutID(BotsGetAdminedBotsRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *BotsGetAdminedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode bots.getAdminedBots#b0711d83 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *BotsGetAdminedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode bots.getAdminedBots#b0711d83 to nil")
	}
	if  := .ConsumeID(BotsGetAdminedBotsRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode bots.getAdminedBots#b0711d83: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *BotsGetAdminedBotsRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode bots.getAdminedBots#b0711d83 to nil")
	}
	return nil
}

// BotsGetAdminedBots invokes method bots.getAdminedBots#b0711d83 returning error if any.
// Get a list of bots owned by the current user
//
// See https://core.telegram.org/method/bots.getAdminedBots for reference.
func ( *Client) ( context.Context) ([]UserClass, error) {
	var  UserClassVector

	 := &BotsGetAdminedBotsRequest{}
	if  := .rpc.Invoke(, , &);  != nil {
		return nil, 
	}
	return []UserClass(.Elems), nil
}