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

// TestUseErrorRequest represents TL type `test.useError#ee75af01`.
//
// See https://core.telegram.org/method/test.useError for reference.
type TestUseErrorRequest struct {
}

// TestUseErrorRequestTypeID is TL type id of TestUseErrorRequest.
const TestUseErrorRequestTypeID = 0xee75af01

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*TestUseErrorRequest) () string {
	return "test.useError"
}

// TypeInfo returns info about TL type.
func ( *TestUseErrorRequest) () tdp.Type {
	 := tdp.Type{
		Name: "test.useError",
		ID:   TestUseErrorRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{}
	return 
}

// Encode implements bin.Encoder.
func ( *TestUseErrorRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode test.useError#ee75af01 as nil")
	}
	.PutID(TestUseErrorRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *TestUseErrorRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode test.useError#ee75af01 as nil")
	}
	return nil
}

// Decode implements bin.Decoder.
func ( *TestUseErrorRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode test.useError#ee75af01 to nil")
	}
	if  := .ConsumeID(TestUseErrorRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode test.useError#ee75af01: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *TestUseErrorRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode test.useError#ee75af01 to nil")
	}
	return nil
}

// TestUseError invokes method test.useError#ee75af01 returning error if any.
//
// See https://core.telegram.org/method/test.useError for reference.
func ( *Client) ( context.Context) (*Error, error) {
	var  Error

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