/// <reference types="node" />
/// <reference types="node" />
import { Marshal } from "./marshal";
import { Readable } from "stream";
import { Buffer } from "buffer";
import { MediaType } from "../core/media-type";
import { PrimitiveMultiValueMap } from "../utils/collections";
import { Unmarshal } from "./unmarshal";
export declare abstract class Entity<T> implements Marshal<T> {
    protected _mediaType: MediaType;
    constructor(_mediaType: MediaType);
    static json(obj?: any): Entity<string>;
    static form(obj: {
        [key: string]: string;
    } | PrimitiveMultiValueMap): Entity<string>;
    marshal(): Promise<Uint8Array | Readable>;
    get mediaType(): MediaType;
}
export declare class StringEntity extends Entity<string> implements Unmarshal<string> {
    private _data;
    constructor(_data?: string);
    marshal(): Promise<Uint8Array | Readable>;
    unmarshal(bytes: Buffer, mediaType?: MediaType): Promise<string>;
}
export declare class JsonEntity extends Entity<string> implements Unmarshal<any> {
    private _data;
    constructor(_data?: any);
    marshal(): Promise<Uint8Array | Readable>;
    unmarshal(bytes: Buffer, mediaType?: MediaType): Promise<any>;
}
export declare class BinaryEntity extends Entity<Uint8Array> implements Unmarshal<Uint8Array> {
    private _data;
    constructor(_data?: Uint8Array);
    marshal(): Promise<Uint8Array | Readable>;
    unmarshal(bytes: Buffer, mediaType?: MediaType): Promise<Uint8Array>;
}
export declare class FormUrlEncoded extends Entity<string> {
    private _entity;
    constructor(_entity: {
        [key: string]: string;
    } | PrimitiveMultiValueMap);
    marshal(): Promise<Uint8Array | Readable>;
}
