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

// MessagesGetFullChatRequest represents TL type `messages.getFullChat#aeb00b34`.
// Get full info about a basic group¹.
//
// Links:
//  1. https://core.telegram.org/api/channel#basic-groups
//
// See https://core.telegram.org/method/messages.getFullChat for reference.
type MessagesGetFullChatRequest struct {
	// Basic group¹ ID.
	//
	// Links:
	//  1) https://core.telegram.org/api/channel#basic-groups
	ChatID int64
}

// MessagesGetFullChatRequestTypeID is TL type id of MessagesGetFullChatRequest.
const MessagesGetFullChatRequestTypeID = 0xaeb00b34

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

func ( *MessagesGetFullChatRequest) () bool {
	if  == nil {
		return true
	}
	if !(.ChatID == 0) {
		return false
	}

	return true
}

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

// FillFrom fills MessagesGetFullChatRequest from given interface.
func ( *MessagesGetFullChatRequest) ( interface {
	() ( int64)
}) {
	.ChatID = .()
}

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

// TypeName returns name of type in TL schema.
func (*MessagesGetFullChatRequest) () string {
	return "messages.getFullChat"
}

// TypeInfo returns info about TL type.
func ( *MessagesGetFullChatRequest) () tdp.Type {
	 := tdp.Type{
		Name: "messages.getFullChat",
		ID:   MessagesGetFullChatRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ChatID",
			SchemaName: "chat_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *MessagesGetFullChatRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getFullChat#aeb00b34 as nil")
	}
	.PutID(MessagesGetFullChatRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *MessagesGetFullChatRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode messages.getFullChat#aeb00b34 as nil")
	}
	.PutLong(.ChatID)
	return nil
}

// Decode implements bin.Decoder.
func ( *MessagesGetFullChatRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getFullChat#aeb00b34 to nil")
	}
	if  := .ConsumeID(MessagesGetFullChatRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode messages.getFullChat#aeb00b34: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *MessagesGetFullChatRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode messages.getFullChat#aeb00b34 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode messages.getFullChat#aeb00b34: field chat_id: %w", )
		}
		.ChatID = 
	}
	return nil
}

// GetChatID returns value of ChatID field.
func ( *MessagesGetFullChatRequest) () ( int64) {
	if  == nil {
		return
	}
	return .ChatID
}

// MessagesGetFullChat invokes method messages.getFullChat#aeb00b34 returning error if any.
// Get full info about a basic group¹.
//
// Links:
//  1. https://core.telegram.org/api/channel#basic-groups
//
// Possible errors:
//
//	400 CHAT_ID_INVALID: The provided chat id is invalid.
//	400 PEER_ID_INVALID: The provided peer id is invalid.
//
// See https://core.telegram.org/method/messages.getFullChat for reference.
// Can be used by bots.
func ( *Client) ( context.Context,  int64) (*MessagesChatFull, error) {
	var  MessagesChatFull

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