import { SdkClient } from "../common/sdk-client"; import { ModelManagementModels } from "./model-models"; /** * Service for configuring, reading and managing assets, asset ~ and aspect types. * * @export * @class AssetManagementClient * @extends {SdkClient} */ export declare class ModelManagementClient extends SdkClient { private _baseUrl; /** * * Models * * List all all models and algorithms available for the authenticated user. * * @param {{ * pageNumber?: number; * pageSize?: number; * filter?: string; * sort?: string; * }} [params] * @param [params.pageNumber] Specifies the requested page index * @param [params.pageSize] Specifies the number of elements in a page * @param [params.filter] Specifies the additional filtering criteria. * Complex filter that can filter by model name, type, description, author or fields set as optional parameters. All fields are optional. Filters can be set as plain string or as a regular expression. * The expected format follows: * @example {"name":"model\*","type":"type","description":"modelDescription","optionalParameters":{"entityId":"64","entityName": "*"}} * * @param [params.sort] Specifies the ordering of returned elements e.g. 'asc' or 'desc' * * @returns {Promise} * * @example await modelManagement.GetModels(); * @example await modelManagement.GetModels({sort: "asc"}); * * @memberOf ModelManagementClient */ GetModels(params?: { pageNumber?: number; pageSize?: number; filter?: string; sort?: "asc" | "desc"; }): Promise; /** * * Models * * Gets the model for the given model id. * * @param {string} id * @returns {Promise} * * @example await modelManagement.GetModel("mdsp.SimulationEngine") * @memberOf ModelManagementClient */ GetModel(id: string): Promise; /** * * Models * * Updates the model's metadata. * * @param {string} id ID of the model which is to be updated * @param {ModelManagementModels.ModelDefinition} model * @returns {Promise} * @throws {ModelManagementModels.RequiredError} * * @example await modelManagement.PatchModel("mdsp.SimulationEngine", myModelDefinition) * @memberOf ModelManagementClient */ PatchModel(id: string, model: ModelManagementModels.ModelDefinition): Promise; /** * * Models * * Deletes a model, all the versions and the corresponding metadata. * Also, use this endpoint if needed to delete a model that has a single version available. * * @param {string} id ID of the model which is to be updated * * @example await modelManagement.DeleteModel(id) * * @memberOf ModelManagementClient */ DeleteModel(id: string): Promise; /** * * Models * * Uploads a model payload and the corresponding metadata. * * @param {any} file The model/algorithm file * @param {ModelManagementModels.ModelDefinition} metadata The details regarding what the model represents, as name, author, type, description, in JSON format (see definitions/Model and definitions/VersionDefinition)<br /> <pre> { name: \"NN - Quasi Newton\", description: \"Newton using variable matrix methods\", type: \"Zeppelin notebook\", author: \"user@siemens.com\", version: { number: 3.1, expirationDate: \"2017-10-01T12:00:00.001Z\", author: \"user@siemens.com\", creationDate: \"2017-10-01T12:00:00.001Z\", dependencies: [ { name: \"sklearn-theano\", type: \"Python\", version: \"1.7, 5.2.6\" } ], io: { consumes: \"CSV/XML/Parquet\", input: [ { name: \"t1\", type: \"integer\", description: \"temperature sensor value\", value: 5 } ], output: [ { name: \"t1\", type: \"integer\", description: \"temperature sensor value\", value: 5 } ], optionalParameters: { freeFormParams: \"for the author to use\" } }, producedBy: [ {\"951b3240-7857-11e8-adc0-fa7ae01bbebc\"} ], kpi: [ { name: \"error rate\", value: 0.9 } ] } }</pre> * @returns {Promise} * * @memberOf ModelManagementClient */ PostModel(metadata: ModelManagementModels.ModelDefinition, payload: ModelManagementModels.ModelPayload): Promise; /** * * Versions * * Retrieves all the versions of a model or an algorithm based on the model identifier. * Whenever a new model file or a metadata JSON are uploaded as an update of an existing entry a new version of the entry is created. * * @param {{ * modelId?: string; * pageNumber?: number; * pageSize?: number; * }} [params] * @param [params.modelId] Model ID to get the information for it * @param [params.pageNumber] Specifies the requested page index * @param [params.pageSize] Specifies the number of elements in a page * * @returns {Promise} * * @memberOf ModelManagementClient */ GetModelVersions(params?: { modelId?: string; pageNumber?: number; pageSize?: number; }): Promise; /** * * Model Version * * Retrieves the metadata of the model with specified version. * * @param {string} modelId Model ID to get the information for it * @param {string} versionId Version ID to get the information for it * * @example await modelManagement.GetModelVersion("mdsp.SimulationEngine", "v0.0.1") * @memberOf ModelManagementClient */ GetModelVersion(modelId: string, versionId: string): Promise; /** * * Model Version * * Retrieves the payload of the model with specified version. * * @param {string} modelId Model ID to get the information for it * @param {string} versionId Version ID to get the information for it * * @memberOf ModelManagementClient */ DownloadModelVersion(modelId: string, versionId: string): Promise; /** * * Model Version * * Downloads the last version payload or description of a model. * * @param {string} modelId Id of the model * @returns {Promise} * * @example await modelManagement.GetModelLastVersion("mdsp.SimulationEngine") * @memberOf ModelManagementClient */ GetModelLastVersion(modelId: string): Promise; /** * * Model Version * * Retrieves the last version of model payload. * * @param {string} modelId Id of the model * @returns {Promise} * * @memberOf ModelManagementClient */ DownloadModelLastVersion(modelId: string): Promise; /** * * Model Version * * Deletes a version of a model and the corresponding metadata, * only if the version is not the single available version for the model. * * @summary Deletes the specified version of a model and the corresponding metadata * @param {string} modelId Id of the model * @param {string} versionId The version id * * @example await modelManagement.DeleteModelVersion(myModelId, myVersionId) * * @memberOf ModelManagementClient */ DeleteModelVersion(modelId: string, versionId: string): Promise; /** * * Model Version * * Deletes the last version of a model and its associated payload. * If the version is the only version of the model all the information regarding the model will be deleted. * * @param {string} modelId Id of the model * * @example await modelManagement.DeleteModelLastVersion(myModelId) * * @memberOf ModelManagementClient */ DeleteModelLastVersion(modelId: string): Promise; /** * * Model Version * * Updates the last version metadata information of a model, without allowing updates to the model payload itself * * @param {string} modelId The model id * @param {ModelManagementModels.VersionDefinition} version * @returns {Promise} * @throws {ModelManagementModels.RequiredError} * * @example await modelManagement.PatchLastModelVersion("mdsp.SimulationEngine", myModelVersionDefinition) * @memberOf ModelManagementClient */ PatchLastModelVersion(modelId: string, version: ModelManagementModels.VersionDefinition): Promise; /** * * Model Versions * * Create a new model version. * * @param {string} modelId Model ID to create a new verion for * @param {any} file The model/algorithm file * @param {ModelManagementModels.VersionDefinition} metadata Version data in JSON format (See definitions/VersionDefinition) <pre> { number: 3.1, expirationDate: \"2017-10-01T12:00:00.001Z\", author: \"user@siemens.com\", creationDate: \"2017-10-01T12:00:00.001Z\", dependencies: [ { name: \"sklearn-theano\", type: \"Python\", version: \"1.7, 5.2.6\" } ], io: { consumes: \"CSV/XML/Parquet\", input: [ { name: \"t1\", type: \"integer\", description: \"temperature sensor value\", value: 5 } ], output: [ { name: \"t1\", type: \"integer\", description: \"temperature sensor value\", value: 5 } ], optionalParameters: { freeFormParams: \"for the author to use\" } }, producedBy: [ {\"951b3240-7857-11e8-adc0-fa7ae01bbebc\"} ], kpi: [ { name: \"error rate\", value: 0.9 } ] } </pre> * @returns {Promise} * * @memberOf ModelManagementClient */ PostModelVersion(modelId: string, metadata: ModelManagementModels.VersionDefinition, payload: ModelManagementModels.ModelPayload): Promise; }