// Code generated by gotdgen, DO NOT EDIT.

package mt

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

// RPCDropAnswerRequest represents TL type `rpc_drop_answer#58e4a740`.
type RPCDropAnswerRequest struct {
	// ReqMsgID field of RPCDropAnswerRequest.
	ReqMsgID int64
}

// RPCDropAnswerRequestTypeID is TL type id of RPCDropAnswerRequest.
const RPCDropAnswerRequestTypeID = 0x58e4a740

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

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

	return true
}

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

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

// TypeName returns name of type in TL schema.
func (*RPCDropAnswerRequest) () string {
	return "rpc_drop_answer"
}

// TypeInfo returns info about TL type.
func ( *RPCDropAnswerRequest) () tdp.Type {
	 := tdp.Type{
		Name: "rpc_drop_answer",
		ID:   RPCDropAnswerRequestTypeID,
	}
	if  == nil {
		.Null = true
		return 
	}
	.Fields = []tdp.Field{
		{
			Name:       "ReqMsgID",
			SchemaName: "req_msg_id",
		},
	}
	return 
}

// Encode implements bin.Encoder.
func ( *RPCDropAnswerRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode rpc_drop_answer#58e4a740 as nil")
	}
	.PutID(RPCDropAnswerRequestTypeID)
	return .EncodeBare()
}

// EncodeBare implements bin.BareEncoder.
func ( *RPCDropAnswerRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't encode rpc_drop_answer#58e4a740 as nil")
	}
	.PutLong(.ReqMsgID)
	return nil
}

// Decode implements bin.Decoder.
func ( *RPCDropAnswerRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode rpc_drop_answer#58e4a740 to nil")
	}
	if  := .ConsumeID(RPCDropAnswerRequestTypeID);  != nil {
		return fmt.Errorf("unable to decode rpc_drop_answer#58e4a740: %w", )
	}
	return .DecodeBare()
}

// DecodeBare implements bin.BareDecoder.
func ( *RPCDropAnswerRequest) ( *bin.Buffer) error {
	if  == nil {
		return fmt.Errorf("can't decode rpc_drop_answer#58e4a740 to nil")
	}
	{
		,  := .Long()
		if  != nil {
			return fmt.Errorf("unable to decode rpc_drop_answer#58e4a740: field req_msg_id: %w", )
		}
		.ReqMsgID = 
	}
	return nil
}

// GetReqMsgID returns value of ReqMsgID field.
func ( *RPCDropAnswerRequest) () ( int64) {
	if  == nil {
		return
	}
	return .ReqMsgID
}