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

// HelpGetNearestDCRequest represents TL type `help.getNearestDc#1fb33026`.
// Returns info on data center nearest to the user.
//
// See https://core.telegram.org/method/help.getNearestDc for reference.
type HelpGetNearestDCRequest struct {
}

// HelpGetNearestDCRequestTypeID is TL type id of HelpGetNearestDCRequest.
const HelpGetNearestDCRequestTypeID = 0x1fb33026

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*HelpGetNearestDCRequest) () string {
	return "help.getNearestDc"
}

// TypeInfo returns info about TL type.
func ( *HelpGetNearestDCRequest) () tdp.Type {
	 := tdp.Type{
		Name: "help.getNearestDc",
		ID:   HelpGetNearestDCRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *HelpGetNearestDCRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode help.getNearestDc#1fb33026 as nil")
	}
	.PutID(HelpGetNearestDCRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *HelpGetNearestDCRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode help.getNearestDc#1fb33026 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *HelpGetNearestDCRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode help.getNearestDc#1fb33026 to nil")
	}
	if  := .ConsumeID(HelpGetNearestDCRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode help.getNearestDc#1fb33026: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *HelpGetNearestDCRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode help.getNearestDc#1fb33026 to nil")
	}
	return nil
}

// HelpGetNearestDC invokes method help.getNearestDc#1fb33026 returning error if any.
// Returns info on data center nearest to the user.
//
// See https://core.telegram.org/method/help.getNearestDc for reference.
func ( *Client) ( context.Context) (*NearestDC, error) {
	var  NearestDC

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