import { Response as ResponseInterface } from '../../api/response/response.interface';
import { BodyDecoder } from '../../api/converter';
import { ApiRequest } from '../request';
export declare class Response<DataType> implements ResponseInterface<DataType> {
    private decoder?;
    private data;
    private _body?;
    _request?: ApiRequest;
    static SUCCESS(data?: Uint8Array): Response<any>;
    static ERROR(errorCode?: number): Response<any>;
    static create(codeRet: number, data?: Uint8Array): Response<any>;
    constructor(data: Uint8Array);
    body<T = DataType>(decoder?: BodyDecoder<T>): T | undefined;
    rawBody(): Uint8Array;
    setBodyDecoder(decoder: BodyDecoder<DataType>): this;
    hasBody(): boolean;
    codeRet(): number;
    toString(): string;
    toBytes(): Uint8Array;
    setBody(body: DataType): void;
    isSuccess(): boolean;
    isSuccessful(): boolean;
    successful(): void;
    setRequest(request: ApiRequest): void;
}
