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

// UsersGetFullUserRequest represents TL type `users.getFullUser#b60f5918`.
// Returns extended user info by ID.
//
// See https://core.telegram.org/method/users.getFullUser for reference.
type UsersGetFullUserRequest struct {
	// User ID
	ID InputUserClass
}

// UsersGetFullUserRequestTypeID is TL type id of UsersGetFullUserRequest.
const UsersGetFullUserRequestTypeID = 0xb60f5918

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

func ( *UsersGetFullUserRequest) () bool {
	if  == nil {
		return true
	}
	if !(.ID == nil) {
		return false
	}

	return true
}

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

// FillFrom fills UsersGetFullUserRequest from given interface.
func ( *UsersGetFullUserRequest) ( interface {
	() ( InputUserClass)
}) {
	.ID = .()
}

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

// TypeName returns name of type in TL schema.
func (*UsersGetFullUserRequest) () string {
	return "users.getFullUser"
}

// TypeInfo returns info about TL type.
func ( *UsersGetFullUserRequest) () tdp.Type {
	 := tdp.Type{
		Name: "users.getFullUser",
		ID:   UsersGetFullUserRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ID",
			SchemaName: "id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *UsersGetFullUserRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode users.getFullUser#b60f5918 as nil")
	}
	.PutID(UsersGetFullUserRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *UsersGetFullUserRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode users.getFullUser#b60f5918 as nil")
	}
	if .ID == nil {
		return fmt.Errorf("unable to encode users.getFullUser#b60f5918: field id is nil")
	}
	if  := .ID.Encode();  != nil {
		return fmt.Errorf("unable to encode users.getFullUser#b60f5918: field id: %w", )
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *UsersGetFullUserRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode users.getFullUser#b60f5918 to nil")
	}
	if  := .ConsumeID(UsersGetFullUserRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode users.getFullUser#b60f5918: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *UsersGetFullUserRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode users.getFullUser#b60f5918 to nil")
	}
	{
		,  := DecodeInputUser()
		if  != nil {
			return fmt.Errorf("unable to decode users.getFullUser#b60f5918: field id: %w", )
		}
		.ID = 
	}
	return nil
}

// GetID returns value of ID field.
func ( *UsersGetFullUserRequest) () ( InputUserClass) {
	if  == nil {
		return
	}
	return .ID
}

// UsersGetFullUser invokes method users.getFullUser#b60f5918 returning error if any.
// Returns extended user info by ID.
//
// Possible errors:
//
//	400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup.
//	400 MSG_ID_INVALID: Invalid message ID provided.
//	400 USERNAME_OCCUPIED: The provided username is already occupied.
//	400 USER_ID_INVALID: The provided user ID is invalid.
//
// See https://core.telegram.org/method/users.getFullUser for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  InputUserClass) (*UsersUserFull, error) {
	var  UsersUserFull

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