package proto

import (
	
)

// ResultTypeID is TL type id of Result.
const ResultTypeID = 0xf35c6d01

// Result is rpc_result#f35c6d01.
type Result struct {
	RequestMessageID int64
	Result           []byte
}

// Encode implements bin.Encoder.
func ( *Result) ( *bin.Buffer) error {
	.PutID(ResultTypeID)
	.PutLong(.RequestMessageID)
	.Put(.Result)
	return nil
}

// Decode implements bin.Decoder.
func ( *Result) ( *bin.Buffer) error {
	if  := .ConsumeID(ResultTypeID);  != nil {
		return 
	}
	{
		,  := .Long()
		if  != nil {
			return 
		}
		.RequestMessageID = 
	}

	.Result = append(.Result[:0], .Buf...)
	.Skip(len(.Buf))

	return nil
}