import { Resource } from './resource' import { WebApiClient } from './web-api-client' /** * @export * @abstract * @class InstanceResource * @extends {Resource} */ export abstract class InstanceResource extends Resource { protected _id: any; /** * Creates an instance of InstanceResource. * @param {any} id * @param {string} basePath * @param {WebApiClient} client * * @memberOf InstanceResource */ constructor(id: any, basePath: string, client: WebApiClient) { super(basePath, client); this._id = id; } /** * Returns id of the WebApi entity this instance resource represents * @readonly * @type {any} * @memberOf InstanceResource */ get id(): any { return this._id; } /** * Returns utl path of this instance resource * @returns {string} * * @memberOf InstanceResource */ getPath(): string { return this._path + "/" + String(this.id) } }