import * as $protobuf from "protobufjs";
import Long = require("long");
/** Properties of a Model. */
export interface IModel {

    /** Model meshes */
    meshes?: (IMesh[]|null);
}

/** Represents a Model. */
export class Model implements IModel {

    /**
     * Constructs a new Model.
     * @param [properties] Properties to set
     */
    constructor(properties?: IModel);

    /** Model meshes. */
    public meshes: IMesh[];

    /**
     * Decodes a Model message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Model
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Model;

    /**
     * Gets the default type url for Model
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Mesh. */
export interface IMesh {

    /** Mesh name */
    name: string;

    /** Mesh chunks */
    chunks?: (IChunk[]|null);

    /** Mesh matrix */
    matrix?: (IMatrix[]|null);
}

/** Represents a Mesh. */
export class Mesh implements IMesh {

    /**
     * Constructs a new Mesh.
     * @param [properties] Properties to set
     */
    constructor(properties?: IMesh);

    /** Mesh name. */
    public name: string;

    /** Mesh chunks. */
    public chunks: IChunk[];

    /** Mesh matrix. */
    public matrix: IMatrix[];

    /**
     * Decodes a Mesh message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Mesh
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Mesh;

    /**
     * Gets the default type url for Mesh
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Matrix. */
export interface IMatrix {

    /** Matrix elements */
    elements?: (number[]|null);
}

/** Represents a Matrix. */
export class Matrix implements IMatrix {

    /**
     * Constructs a new Matrix.
     * @param [properties] Properties to set
     */
    constructor(properties?: IMatrix);

    /** Matrix elements. */
    public elements: number[];

    /**
     * Decodes a Matrix message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Matrix
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Matrix;

    /**
     * Gets the default type url for Matrix
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Chunk. */
export interface IChunk {

    /** Chunk geometry */
    geometry: IGeometry;

    /** Chunk material */
    material?: (IMaterial[]|null);
}

/** Represents a Chunk. */
export class Chunk implements IChunk {

    /**
     * Constructs a new Chunk.
     * @param [properties] Properties to set
     */
    constructor(properties?: IChunk);

    /** Chunk geometry. */
    public geometry: IGeometry;

    /** Chunk material. */
    public material: IMaterial[];

    /**
     * Decodes a Chunk message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Chunk
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Chunk;

    /**
     * Gets the default type url for Chunk
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Geometry. */
export interface IGeometry {

    /** Geometry position */
    position: IPosition;

    /** Geometry uv */
    uv?: (IUV|null);

    /** Geometry uv2 */
    uv2?: (IUV|null);

    /** Geometry normal */
    normal: INormal;

    /** Geometry groups */
    groups?: (IGroup[]|null);
}

/** Represents a Geometry. */
export class Geometry implements IGeometry {

    /**
     * Constructs a new Geometry.
     * @param [properties] Properties to set
     */
    constructor(properties?: IGeometry);

    /** Geometry position. */
    public position: IPosition;

    /** Geometry uv. */
    public uv?: (IUV|null);

    /** Geometry uv2. */
    public uv2?: (IUV|null);

    /** Geometry normal. */
    public normal: INormal;

    /** Geometry groups. */
    public groups: IGroup[];

    /**
     * Decodes a Geometry message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Geometry
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Geometry;

    /**
     * Gets the default type url for Geometry
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Position. */
export interface IPosition {

    /** Position array */
    array?: (number[]|null);
}

/** Represents a Position. */
export class Position implements IPosition {

    /**
     * Constructs a new Position.
     * @param [properties] Properties to set
     */
    constructor(properties?: IPosition);

    /** Position array. */
    public array: number[];

    /**
     * Decodes a Position message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Position
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Position;

    /**
     * Gets the default type url for Position
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a UV. */
export interface IUV {

    /** UV array */
    array?: (number[]|null);
}

/** Represents a UV. */
export class UV implements IUV {

    /**
     * Constructs a new UV.
     * @param [properties] Properties to set
     */
    constructor(properties?: IUV);

    /** UV array. */
    public array: number[];

    /**
     * Decodes a UV message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns UV
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): UV;

    /**
     * Gets the default type url for UV
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Normal. */
export interface INormal {

    /** Normal array */
    array?: (number[]|null);
}

/** Represents a Normal. */
export class Normal implements INormal {

    /**
     * Constructs a new Normal.
     * @param [properties] Properties to set
     */
    constructor(properties?: INormal);

    /** Normal array. */
    public array: number[];

    /**
     * Decodes a Normal message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Normal
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Normal;

    /**
     * Gets the default type url for Normal
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Group. */
export interface IGroup {

    /** Group start */
    start: number;

    /** Group count */
    count: number;

    /** Group materialIndex */
    materialIndex: number;
}

/** Represents a Group. */
export class Group implements IGroup {

    /**
     * Constructs a new Group.
     * @param [properties] Properties to set
     */
    constructor(properties?: IGroup);

    /** Group start. */
    public start: number;

    /** Group count. */
    public count: number;

    /** Group materialIndex. */
    public materialIndex: number;

    /**
     * Decodes a Group message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Group
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Group;

    /**
     * Gets the default type url for Group
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Material. */
export interface IMaterial {

    /** Material kd */
    kd?: (IColor|null);

    /** Material ks */
    ks?: (IColor|null);

    /** Material ke */
    ke?: (IColor|null);

    /** Material mapkd */
    mapkd?: (string|null);

    /** Material mapks */
    mapks?: (string|null);

    /** Material mapke */
    mapke?: (string|null);

    /** Material norm */
    norm?: (string|null);

    /** Material mapbump */
    mapbump?: (string|null);

    /** Material bump */
    bump?: (string|null);

    /** Material mapd */
    mapd?: (string|null);

    /** Material ns */
    ns?: (number|null);

    /** Material d */
    d?: (number|null);

    /** Material tr */
    tr?: (number|null);

    /** Material mapkdrepeat */
    mapkdrepeat?: (string|null);
}

/** Represents a Material. */
export class Material implements IMaterial {

    /**
     * Constructs a new Material.
     * @param [properties] Properties to set
     */
    constructor(properties?: IMaterial);

    /** Material kd. */
    public kd?: (IColor|null);

    /** Material ks. */
    public ks?: (IColor|null);

    /** Material ke. */
    public ke?: (IColor|null);

    /** Material mapkd. */
    public mapkd: string;

    /** Material mapks. */
    public mapks: string;

    /** Material mapke. */
    public mapke: string;

    /** Material norm. */
    public norm: string;

    /** Material mapbump. */
    public mapbump: string;

    /** Material bump. */
    public bump: string;

    /** Material mapd. */
    public mapd: string;

    /** Material ns. */
    public ns: number;

    /** Material d. */
    public d: number;

    /** Material tr. */
    public tr: number;

    /** Material mapkdrepeat. */
    public mapkdrepeat: string;

    /**
     * Decodes a Material message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Material
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Material;

    /**
     * Gets the default type url for Material
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a Color. */
export interface IColor {

    /** Color rgb */
    rgb?: (number[]|null);
}

/** Represents a Color. */
export class Color implements IColor {

    /**
     * Constructs a new Color.
     * @param [properties] Properties to set
     */
    constructor(properties?: IColor);

    /** Color rgb. */
    public rgb: number[];

    /**
     * Decodes a Color message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns Color
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Color;

    /**
     * Gets the default type url for Color
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}
