diff --git a/lib/services/customVision/training/README.md b/lib/services/customVision/training/README.md new file mode 100644 index 0000000000..17700bc3c6 --- /dev/null +++ b/lib/services/customVision/training/README.md @@ -0,0 +1,44 @@ +--- +uid: azure-cognitiveservices-customvision-training +summary: *content + +--- +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - TrainingAPIClient + +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +### Features + + +### How to Install + +```bash +npm install azure-cognitiveservices-customvision-training +``` + +### How to use + +#### Authentication, client creation, and getDomains as an example. + +```javascript +const msRest = require("ms-rest"); +const TrainingAPIClient = require("azure-cognitiveservices-customvision-training"); +const token = ""; +const creds = new msRest.TokenCredentials(token); +const subscriptionId = ""; +const client = new TrainingAPIClient(creds, subscriptionId); + +client.getDomains().then((result) => { + console.log("The result is:"); + console.log(result); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); +``` + +### Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/customVision/training/lib/models/boundingBox.js b/lib/services/customVision/training/lib/models/boundingBox.js index 294df1c1ed..1dd1a18c05 100644 --- a/lib/services/customVision/training/lib/models/boundingBox.js +++ b/lib/services/customVision/training/lib/models/boundingBox.js @@ -16,10 +16,10 @@ class BoundingBox { /** * Create a BoundingBox. - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -40,6 +40,7 @@ class BoundingBox { modelProperties: { left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -47,6 +48,7 @@ class BoundingBox { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -54,6 +56,7 @@ class BoundingBox { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -61,6 +64,7 @@ class BoundingBox { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/domain.js b/lib/services/customVision/training/lib/models/domain.js index 6cd251aef1..5627f7c5cd 100644 --- a/lib/services/customVision/training/lib/models/domain.js +++ b/lib/services/customVision/training/lib/models/domain.js @@ -16,12 +16,12 @@ class Domain { /** * Create a Domain. - * @member {uuid} [id] - * @member {string} [name] - * @member {string} [type] Possible values include: 'Classification', + * @property {uuid} [id] + * @property {string} [name] + * @property {string} [type] Possible values include: 'Classification', * 'ObjectDetection' - * @member {boolean} [exportable] - * @member {boolean} [enabled] + * @property {boolean} [exportable] + * @property {boolean} [enabled] */ constructor() { } @@ -42,6 +42,7 @@ class Domain { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -50,6 +51,7 @@ class Domain { }, name: { required: false, + nullable: true, readOnly: true, serializedName: 'name', type: { @@ -58,6 +60,7 @@ class Domain { }, type: { required: false, + nullable: false, readOnly: true, serializedName: 'type', type: { @@ -66,6 +69,7 @@ class Domain { }, exportable: { required: false, + nullable: false, readOnly: true, serializedName: 'exportable', type: { @@ -74,6 +78,7 @@ class Domain { }, enabled: { required: false, + nullable: false, readOnly: true, serializedName: 'enabled', type: { diff --git a/lib/services/customVision/training/lib/models/exportModel.js b/lib/services/customVision/training/lib/models/exportModel.js index 148f02bdad..f351ac0633 100644 --- a/lib/services/customVision/training/lib/models/exportModel.js +++ b/lib/services/customVision/training/lib/models/exportModel.js @@ -16,13 +16,16 @@ class ExportModel { /** * Create a ExportModel. - * @member {string} [platform] Possible values include: 'CoreML', - * 'TensorFlow', 'DockerFile', 'ONNX' - * @member {string} [status] Possible values include: 'Exporting', 'Failed', - * 'Done' - * @member {string} [downloadUri] - * @member {string} [flavor] Possible values include: 'Linux', 'Windows' - * @member {boolean} [newerVersionAvailable] + * @property {string} [platform] Platform of the export. Possible values + * include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @property {string} [status] Status of the export. Possible values include: + * 'Exporting', 'Failed', 'Done' + * @property {string} [downloadUri] URI used to download the model. + * @property {string} [flavor] Flavor of the export. Possible values include: + * 'Linux', 'Windows', 'ONNX10', 'ONNX12' + * @property {boolean} [newerVersionAvailable] Indicates an updated version + * of the export package is available and should be re-exported for the + * latest changes. */ constructor() { } @@ -43,6 +46,7 @@ class ExportModel { modelProperties: { platform: { required: false, + nullable: false, readOnly: true, serializedName: 'platform', type: { @@ -51,6 +55,7 @@ class ExportModel { }, status: { required: false, + nullable: false, readOnly: true, serializedName: 'status', type: { @@ -59,6 +64,7 @@ class ExportModel { }, downloadUri: { required: false, + nullable: true, readOnly: true, serializedName: 'downloadUri', type: { @@ -67,6 +73,7 @@ class ExportModel { }, flavor: { required: false, + nullable: true, readOnly: true, serializedName: 'flavor', type: { @@ -75,6 +82,7 @@ class ExportModel { }, newerVersionAvailable: { required: false, + nullable: false, readOnly: true, serializedName: 'newerVersionAvailable', type: { diff --git a/lib/services/customVision/training/lib/models/image.js b/lib/services/customVision/training/lib/models/image.js index 40eb631947..f554873d48 100644 --- a/lib/services/customVision/training/lib/models/image.js +++ b/lib/services/customVision/training/lib/models/image.js @@ -10,23 +10,25 @@ 'use strict'; -const models = require('./index'); - /** - * Image model to be sent as JSON + * Image model to be sent as JSON. * */ class Image { /** * Create a Image. - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] + * @property {uuid} [id] Id of the image. + * @property {date} [created] Date the image was created. + * @property {number} [width] Width of the image. + * @property {number} [height] Height of the image. + * @property {string} [resizedImageUri] The URI to the (resized) image used + * for training. + * @property {string} [thumbnailUri] The URI to the thumbnail of the original + * image. + * @property {string} [originalImageUri] The URI to the original uploaded + * image. + * @property {array} [tags] Tags associated with this image. + * @property {array} [regions] Regions associated with this image. */ constructor() { } @@ -47,6 +49,7 @@ class Image { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -55,6 +58,7 @@ class Image { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -63,6 +67,7 @@ class Image { }, width: { required: false, + nullable: false, readOnly: true, serializedName: 'width', type: { @@ -71,30 +76,43 @@ class Image { }, height: { required: false, + nullable: false, readOnly: true, serializedName: 'height', type: { name: 'Number' } }, - imageUri: { + resizedImageUri: { required: false, + nullable: true, readOnly: true, - serializedName: 'imageUri', + serializedName: 'resizedImageUri', type: { name: 'String' } }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { name: 'String' } }, + originalImageUri: { + required: false, + nullable: true, + readOnly: true, + serializedName: 'originalImageUri', + type: { + name: 'String' + } + }, tags: { required: false, + nullable: true, readOnly: true, serializedName: 'tags', type: { @@ -111,6 +129,7 @@ class Image { }, regions: { required: false, + nullable: true, readOnly: true, serializedName: 'regions', type: { diff --git a/lib/services/customVision/training/lib/models/imageCreateResult.js b/lib/services/customVision/training/lib/models/imageCreateResult.js index 7858a68d42..bc1f0559e4 100644 --- a/lib/services/customVision/training/lib/models/imageCreateResult.js +++ b/lib/services/customVision/training/lib/models/imageCreateResult.js @@ -10,28 +10,31 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageCreateResult. */ class ImageCreateResult { /** * Create a ImageCreateResult. - * @member {string} [sourceUrl] - * @member {string} [status] Possible values include: 'OK', 'OKDuplicate', - * 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', - * 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', - * 'ErrorUnknown' - * @member {object} [image] - * @member {uuid} [image.id] - * @member {date} [image.created] - * @member {number} [image.width] - * @member {number} [image.height] - * @member {string} [image.imageUri] - * @member {string} [image.thumbnailUri] - * @member {array} [image.tags] - * @member {array} [image.regions] + * @property {string} [sourceUrl] Source URL of the image. + * @property {string} [status] Status of the image creation. Possible values + * include: 'OK', 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', + * 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', + * 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown', + * 'ErrorNegativeAndRegularTagOnSameImage' + * @property {object} [image] The image. + * @property {uuid} [image.id] Id of the image. + * @property {date} [image.created] Date the image was created. + * @property {number} [image.width] Width of the image. + * @property {number} [image.height] Height of the image. + * @property {string} [image.resizedImageUri] The URI to the (resized) image + * used for training. + * @property {string} [image.thumbnailUri] The URI to the thumbnail of the + * original image. + * @property {string} [image.originalImageUri] The URI to the original + * uploaded image. + * @property {array} [image.tags] Tags associated with this image. + * @property {array} [image.regions] Regions associated with this image. */ constructor() { } @@ -52,6 +55,7 @@ class ImageCreateResult { modelProperties: { sourceUrl: { required: false, + nullable: true, readOnly: true, serializedName: 'sourceUrl', type: { @@ -60,6 +64,7 @@ class ImageCreateResult { }, status: { required: false, + nullable: false, readOnly: true, serializedName: 'status', type: { diff --git a/lib/services/customVision/training/lib/models/imageCreateSummary.js b/lib/services/customVision/training/lib/models/imageCreateSummary.js index f5ccc33ce2..c0ef1aedb8 100644 --- a/lib/services/customVision/training/lib/models/imageCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageCreateSummary.js @@ -10,16 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageCreateSummary. */ class ImageCreateSummary { /** * Create a ImageCreateSummary. - * @member {boolean} [isBatchSuccessful] - * @member {array} [images] + * @property {boolean} [isBatchSuccessful] True if all of the images in the + * batch were created successfully, otherwise false. + * @property {array} [images] List of the image creation results. */ constructor() { } @@ -40,6 +39,7 @@ class ImageCreateSummary { modelProperties: { isBatchSuccessful: { required: false, + nullable: false, readOnly: true, serializedName: 'isBatchSuccessful', type: { @@ -48,6 +48,7 @@ class ImageCreateSummary { }, images: { required: false, + nullable: true, readOnly: true, serializedName: 'images', type: { diff --git a/lib/services/customVision/training/lib/models/imageFileCreateBatch.js b/lib/services/customVision/training/lib/models/imageFileCreateBatch.js index 584ae1ae28..42b9c133fd 100644 --- a/lib/services/customVision/training/lib/models/imageFileCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageFileCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageFileCreateBatch. */ class ImageFileCreateBatch { /** * Create a ImageFileCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageFileCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageFileCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageFileCreateEntry.js b/lib/services/customVision/training/lib/models/imageFileCreateEntry.js index 6e0d705d5f..c43e4c4dd1 100644 --- a/lib/services/customVision/training/lib/models/imageFileCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageFileCreateEntry.js @@ -10,18 +10,16 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageFileCreateEntry. */ class ImageFileCreateEntry { /** * Create a ImageFileCreateEntry. - * @member {string} [name] - * @member {buffer} [contents] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {string} [name] + * @property {buffer} [contents] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -42,6 +40,7 @@ class ImageFileCreateEntry { modelProperties: { name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -49,6 +48,7 @@ class ImageFileCreateEntry { }, contents: { required: false, + nullable: true, serializedName: 'contents', type: { name: 'ByteArray' @@ -56,6 +56,7 @@ class ImageFileCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -70,6 +71,7 @@ class ImageFileCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageIdCreateBatch.js b/lib/services/customVision/training/lib/models/imageIdCreateBatch.js index 54f8031dbe..3d3be80439 100644 --- a/lib/services/customVision/training/lib/models/imageIdCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageIdCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageIdCreateBatch. */ class ImageIdCreateBatch { /** * Create a ImageIdCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageIdCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageIdCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageIdCreateEntry.js b/lib/services/customVision/training/lib/models/imageIdCreateEntry.js index 7062f097af..25731b8a68 100644 --- a/lib/services/customVision/training/lib/models/imageIdCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageIdCreateEntry.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageIdCreateEntry. */ class ImageIdCreateEntry { /** * Create a ImageIdCreateEntry. - * @member {uuid} [id] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {uuid} [id] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -41,6 +39,7 @@ class ImageIdCreateEntry { modelProperties: { id: { required: false, + nullable: false, serializedName: 'id', type: { name: 'String' @@ -48,6 +47,7 @@ class ImageIdCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -62,6 +62,7 @@ class ImageIdCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imagePerformance.js b/lib/services/customVision/training/lib/models/imagePerformance.js index 4f28ca6df2..8f1a6cb08a 100644 --- a/lib/services/customVision/training/lib/models/imagePerformance.js +++ b/lib/services/customVision/training/lib/models/imagePerformance.js @@ -10,24 +10,22 @@ 'use strict'; -const models = require('./index'); - /** - * Image performance model + * Image performance model. * */ class ImagePerformance { /** * Create a ImagePerformance. - * @member {array} [predictions] - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] + * @property {array} [predictions] + * @property {uuid} [id] + * @property {date} [created] + * @property {number} [width] + * @property {number} [height] + * @property {string} [imageUri] + * @property {string} [thumbnailUri] + * @property {array} [tags] + * @property {array} [regions] */ constructor() { } @@ -48,6 +46,7 @@ class ImagePerformance { modelProperties: { predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { @@ -64,6 +63,7 @@ class ImagePerformance { }, id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -72,6 +72,7 @@ class ImagePerformance { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -80,6 +81,7 @@ class ImagePerformance { }, width: { required: false, + nullable: false, readOnly: true, serializedName: 'width', type: { @@ -88,6 +90,7 @@ class ImagePerformance { }, height: { required: false, + nullable: false, readOnly: true, serializedName: 'height', type: { @@ -96,6 +99,7 @@ class ImagePerformance { }, imageUri: { required: false, + nullable: true, readOnly: true, serializedName: 'imageUri', type: { @@ -104,6 +108,7 @@ class ImagePerformance { }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { @@ -112,6 +117,7 @@ class ImagePerformance { }, tags: { required: false, + nullable: true, readOnly: true, serializedName: 'tags', type: { @@ -128,6 +134,7 @@ class ImagePerformance { }, regions: { required: false, + nullable: true, readOnly: true, serializedName: 'regions', type: { diff --git a/lib/services/customVision/training/lib/models/imagePrediction.js b/lib/services/customVision/training/lib/models/imagePrediction.js index 5a97c4f55e..682587f610 100644 --- a/lib/services/customVision/training/lib/models/imagePrediction.js +++ b/lib/services/customVision/training/lib/models/imagePrediction.js @@ -10,19 +10,17 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImagePrediction. */ class ImagePrediction { /** * Create a ImagePrediction. - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] + * @property {uuid} [id] + * @property {uuid} [project] + * @property {uuid} [iteration] + * @property {date} [created] + * @property {array} [predictions] */ constructor() { } @@ -43,6 +41,7 @@ class ImagePrediction { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -51,6 +50,7 @@ class ImagePrediction { }, project: { required: false, + nullable: false, readOnly: true, serializedName: 'project', type: { @@ -59,6 +59,7 @@ class ImagePrediction { }, iteration: { required: false, + nullable: false, readOnly: true, serializedName: 'iteration', type: { @@ -67,6 +68,7 @@ class ImagePrediction { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -75,6 +77,7 @@ class ImagePrediction { }, predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { diff --git a/lib/services/customVision/training/lib/models/imageRegion.js b/lib/services/customVision/training/lib/models/imageRegion.js index 1bedae48da..9f0e4a6188 100644 --- a/lib/services/customVision/training/lib/models/imageRegion.js +++ b/lib/services/customVision/training/lib/models/imageRegion.js @@ -16,14 +16,14 @@ class ImageRegion { /** * Create a ImageRegion. - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [regionId] + * @property {string} [tagName] + * @property {date} [created] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -44,6 +44,7 @@ class ImageRegion { modelProperties: { regionId: { required: false, + nullable: false, readOnly: true, serializedName: 'regionId', type: { @@ -52,6 +53,7 @@ class ImageRegion { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -60,6 +62,7 @@ class ImageRegion { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -68,6 +71,7 @@ class ImageRegion { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -75,6 +79,7 @@ class ImageRegion { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -82,6 +87,7 @@ class ImageRegion { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -89,6 +95,7 @@ class ImageRegion { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -96,6 +103,7 @@ class ImageRegion { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js b/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js index 64be7ef374..1c7f01e265 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateBatch.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Batch of image region information to create. * @@ -19,7 +17,7 @@ const models = require('./index'); class ImageRegionCreateBatch { /** * Create a ImageRegionCreateBatch. - * @member {array} [regions] + * @property {array} [regions] */ constructor() { } @@ -40,6 +38,7 @@ class ImageRegionCreateBatch { modelProperties: { regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js b/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js index b5420dd516..6083b3c910 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateEntry.js @@ -11,17 +11,18 @@ 'use strict'; /** - * Class representing a ImageRegionCreateEntry. + * Entry associating a region to an image. + * */ class ImageRegionCreateEntry { /** * Create a ImageRegionCreateEntry. - * @member {uuid} [imageId] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [imageId] Id of the image. + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -42,6 +43,7 @@ class ImageRegionCreateEntry { modelProperties: { imageId: { required: false, + nullable: false, serializedName: 'imageId', type: { name: 'String' @@ -49,6 +51,7 @@ class ImageRegionCreateEntry { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -56,6 +59,7 @@ class ImageRegionCreateEntry { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -63,6 +67,7 @@ class ImageRegionCreateEntry { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -70,6 +75,7 @@ class ImageRegionCreateEntry { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -77,6 +83,7 @@ class ImageRegionCreateEntry { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateResult.js b/lib/services/customVision/training/lib/models/imageRegionCreateResult.js index 5c2b6725df..81658389cb 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateResult.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateResult.js @@ -16,15 +16,15 @@ class ImageRegionCreateResult { /** * Create a ImageRegionCreateResult. - * @member {uuid} [imageId] - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [imageId] + * @property {uuid} [regionId] + * @property {string} [tagName] + * @property {date} [created] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -45,6 +45,7 @@ class ImageRegionCreateResult { modelProperties: { imageId: { required: false, + nullable: false, readOnly: true, serializedName: 'imageId', type: { @@ -53,6 +54,7 @@ class ImageRegionCreateResult { }, regionId: { required: false, + nullable: false, readOnly: true, serializedName: 'regionId', type: { @@ -61,6 +63,7 @@ class ImageRegionCreateResult { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -69,6 +72,7 @@ class ImageRegionCreateResult { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -77,6 +81,7 @@ class ImageRegionCreateResult { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -84,6 +89,7 @@ class ImageRegionCreateResult { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -91,6 +97,7 @@ class ImageRegionCreateResult { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -98,6 +105,7 @@ class ImageRegionCreateResult { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -105,6 +113,7 @@ class ImageRegionCreateResult { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js b/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js index 0f43580a71..531760476b 100644 --- a/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageRegionCreateSummary.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageRegionCreateSummary. */ class ImageRegionCreateSummary { /** * Create a ImageRegionCreateSummary. - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] + * @property {array} [created] + * @property {array} [duplicated] + * @property {array} [exceeded] */ constructor() { } @@ -41,6 +39,7 @@ class ImageRegionCreateSummary { modelProperties: { created: { required: false, + nullable: true, serializedName: 'created', type: { name: 'Sequence', @@ -56,6 +55,7 @@ class ImageRegionCreateSummary { }, duplicated: { required: false, + nullable: true, serializedName: 'duplicated', type: { name: 'Sequence', @@ -71,6 +71,7 @@ class ImageRegionCreateSummary { }, exceeded: { required: false, + nullable: true, serializedName: 'exceeded', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageRegionProposal.js b/lib/services/customVision/training/lib/models/imageRegionProposal.js index fd3c3e1f46..4fea5b5467 100644 --- a/lib/services/customVision/training/lib/models/imageRegionProposal.js +++ b/lib/services/customVision/training/lib/models/imageRegionProposal.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageRegionProposal. */ class ImageRegionProposal { /** * Create a ImageRegionProposal. - * @member {uuid} [projectId] - * @member {uuid} [imageId] - * @member {array} [proposals] + * @property {uuid} [projectId] + * @property {uuid} [imageId] + * @property {array} [proposals] */ constructor() { } @@ -41,6 +39,7 @@ class ImageRegionProposal { modelProperties: { projectId: { required: false, + nullable: false, readOnly: true, serializedName: 'projectId', type: { @@ -49,6 +48,7 @@ class ImageRegionProposal { }, imageId: { required: false, + nullable: false, readOnly: true, serializedName: 'imageId', type: { @@ -57,6 +57,7 @@ class ImageRegionProposal { }, proposals: { required: false, + nullable: true, readOnly: true, serializedName: 'proposals', type: { diff --git a/lib/services/customVision/training/lib/models/imageTag.js b/lib/services/customVision/training/lib/models/imageTag.js index fd12e20128..1017851b23 100644 --- a/lib/services/customVision/training/lib/models/imageTag.js +++ b/lib/services/customVision/training/lib/models/imageTag.js @@ -16,9 +16,9 @@ class ImageTag { /** * Create a ImageTag. - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {date} [created] + * @property {uuid} [tagId] + * @property {string} [tagName] + * @property {date} [created] */ constructor() { } @@ -39,6 +39,7 @@ class ImageTag { modelProperties: { tagId: { required: false, + nullable: false, readOnly: true, serializedName: 'tagId', type: { @@ -47,6 +48,7 @@ class ImageTag { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { @@ -55,6 +57,7 @@ class ImageTag { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { diff --git a/lib/services/customVision/training/lib/models/imageTagCreateBatch.js b/lib/services/customVision/training/lib/models/imageTagCreateBatch.js index f277960281..a2aa933237 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateBatch.js @@ -10,15 +10,14 @@ 'use strict'; -const models = require('./index'); - /** - * Class representing a ImageTagCreateBatch. + * Batch of image tags. + * */ class ImageTagCreateBatch { /** * Create a ImageTagCreateBatch. - * @member {array} [tags] + * @property {array} [tags] Image Tag entries to include in this batch. */ constructor() { } @@ -39,6 +38,7 @@ class ImageTagCreateBatch { modelProperties: { tags: { required: false, + nullable: true, serializedName: 'tags', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageTagCreateEntry.js b/lib/services/customVision/training/lib/models/imageTagCreateEntry.js index 7b9655341e..13f49fc14a 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateEntry.js @@ -11,13 +11,14 @@ 'use strict'; /** - * Class representing a ImageTagCreateEntry. + * Entry associating a tag to an image. + * */ class ImageTagCreateEntry { /** * Create a ImageTagCreateEntry. - * @member {uuid} [imageId] - * @member {uuid} [tagId] + * @property {uuid} [imageId] Id of the image. + * @property {uuid} [tagId] Id of the tag. */ constructor() { } @@ -38,6 +39,7 @@ class ImageTagCreateEntry { modelProperties: { imageId: { required: false, + nullable: false, serializedName: 'imageId', type: { name: 'String' @@ -45,6 +47,7 @@ class ImageTagCreateEntry { }, tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/imageTagCreateSummary.js b/lib/services/customVision/training/lib/models/imageTagCreateSummary.js index b3327418f2..b24a288413 100644 --- a/lib/services/customVision/training/lib/models/imageTagCreateSummary.js +++ b/lib/services/customVision/training/lib/models/imageTagCreateSummary.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageTagCreateSummary. */ class ImageTagCreateSummary { /** * Create a ImageTagCreateSummary. - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] + * @property {array} [created] + * @property {array} [duplicated] + * @property {array} [exceeded] */ constructor() { } @@ -41,6 +39,7 @@ class ImageTagCreateSummary { modelProperties: { created: { required: false, + nullable: true, serializedName: 'created', type: { name: 'Sequence', @@ -56,6 +55,7 @@ class ImageTagCreateSummary { }, duplicated: { required: false, + nullable: true, serializedName: 'duplicated', type: { name: 'Sequence', @@ -71,6 +71,7 @@ class ImageTagCreateSummary { }, exceeded: { required: false, + nullable: true, serializedName: 'exceeded', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageUrl.js b/lib/services/customVision/training/lib/models/imageUrl.js index 6f97292cdd..31cb128ce9 100644 --- a/lib/services/customVision/training/lib/models/imageUrl.js +++ b/lib/services/customVision/training/lib/models/imageUrl.js @@ -16,7 +16,7 @@ class ImageUrl { /** * Create a ImageUrl. - * @member {string} [url] + * @property {string} [url] */ constructor() { } @@ -37,6 +37,7 @@ class ImageUrl { modelProperties: { url: { required: false, + nullable: true, serializedName: 'url', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js b/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js index 27da5f0223..add1ab85f7 100644 --- a/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js +++ b/lib/services/customVision/training/lib/models/imageUrlCreateBatch.js @@ -10,16 +10,14 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageUrlCreateBatch. */ class ImageUrlCreateBatch { /** * Create a ImageUrlCreateBatch. - * @member {array} [images] - * @member {array} [tagIds] + * @property {array} [images] + * @property {array} [tagIds] */ constructor() { } @@ -40,6 +38,7 @@ class ImageUrlCreateBatch { modelProperties: { images: { required: false, + nullable: true, serializedName: 'images', type: { name: 'Sequence', @@ -55,6 +54,7 @@ class ImageUrlCreateBatch { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js b/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js index b5574abdc3..1b1feb004f 100644 --- a/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js +++ b/lib/services/customVision/training/lib/models/imageUrlCreateEntry.js @@ -10,17 +10,15 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a ImageUrlCreateEntry. */ class ImageUrlCreateEntry { /** * Create a ImageUrlCreateEntry. - * @member {string} [url] - * @member {array} [tagIds] - * @member {array} [regions] + * @property {string} [url] + * @property {array} [tagIds] + * @property {array} [regions] */ constructor() { } @@ -41,6 +39,7 @@ class ImageUrlCreateEntry { modelProperties: { url: { required: false, + nullable: true, serializedName: 'url', type: { name: 'String' @@ -48,6 +47,7 @@ class ImageUrlCreateEntry { }, tagIds: { required: false, + nullable: true, serializedName: 'tagIds', type: { name: 'Sequence', @@ -62,6 +62,7 @@ class ImageUrlCreateEntry { }, regions: { required: false, + nullable: true, serializedName: 'regions', type: { name: 'Sequence', diff --git a/lib/services/customVision/training/lib/models/index.d.ts b/lib/services/customVision/training/lib/models/index.d.ts index 979a7f3cbc..767b7d2bd1 100644 --- a/lib/services/customVision/training/lib/models/index.d.ts +++ b/lib/services/customVision/training/lib/models/index.d.ts @@ -1,66 +1,113 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - -/** - * @class - * Initializes a new instance of the Domain class. - * @constructor - * @member {uuid} [id] - * @member {string} [name] - * @member {string} [type] Possible values include: 'Classification', - * 'ObjectDetection' - * @member {boolean} [exportable] - * @member {boolean} [enabled] - */ export interface Domain { readonly id?: string; readonly name?: string; + /** + * Possible values include: 'Classification', 'ObjectDetection' + */ readonly type?: string; readonly exportable?: boolean; readonly enabled?: boolean; } /** - * @class - * Initializes a new instance of the ImageTag class. - * @constructor - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {date} [created] - */ + * Entry associating a tag to an image. +*/ +export interface ImageTagCreateEntry { + /** + * Id of the image. + */ + imageId?: string; + /** + * Id of the tag. + */ + tagId?: string; +} + +/** + * Batch of image tags. +*/ +export interface ImageTagCreateBatch { + /** + * Image Tag entries to include in this batch. + */ + tags?: ImageTagCreateEntry[]; +} + +export interface ImageTagCreateSummary { + created?: ImageTagCreateEntry[]; + duplicated?: ImageTagCreateEntry[]; + exceeded?: ImageTagCreateEntry[]; +} + +/** + * Entry associating a region to an image. +*/ +export interface ImageRegionCreateEntry { + /** + * Id of the image. + */ + imageId?: string; + /** + * Id of the tag associated with this region. + */ + tagId?: string; + left?: number; + top?: number; + width?: number; + height?: number; +} + +/** + * Batch of image region information to create. +*/ +export interface ImageRegionCreateBatch { + regions?: ImageRegionCreateEntry[]; +} + +export interface ImageRegionCreateResult { + readonly imageId?: string; + readonly regionId?: string; + readonly tagName?: string; + readonly created?: Date; + /** + * Id of the tag associated with this region. + */ + tagId?: string; + left?: number; + top?: number; + width?: number; + height?: number; +} + +export interface ImageRegionCreateSummary { + created?: ImageRegionCreateResult[]; + duplicated?: ImageRegionCreateEntry[]; + exceeded?: ImageRegionCreateEntry[]; +} + export interface ImageTag { readonly tagId?: string; readonly tagName?: string; readonly created?: Date; } -/** - * @class - * Initializes a new instance of the ImageRegion class. - * @constructor - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface ImageRegion { readonly regionId?: string; readonly tagName?: string; readonly created?: Date; + /** + * Id of the tag associated with this region. + */ tagId?: string; left?: number; top?: number; @@ -69,79 +116,80 @@ export interface ImageRegion { } /** - * @class - * Initializes a new instance of the Image class. - * @constructor - * Image model to be sent as JSON - * - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] - */ + * Image model to be sent as JSON. +*/ export interface Image { + /** + * Id of the image. + */ readonly id?: string; + /** + * Date the image was created. + */ readonly created?: Date; + /** + * Width of the image. + */ readonly width?: number; + /** + * Height of the image. + */ readonly height?: number; - readonly imageUri?: string; + /** + * The URI to the (resized) image used for training. + */ + readonly resizedImageUri?: string; + /** + * The URI to the thumbnail of the original image. + */ readonly thumbnailUri?: string; + /** + * The URI to the original uploaded image. + */ + readonly originalImageUri?: string; + /** + * Tags associated with this image. + */ readonly tags?: ImageTag[]; + /** + * Regions associated with this image. + */ readonly regions?: ImageRegion[]; } -/** - * @class - * Initializes a new instance of the ImageCreateResult class. - * @constructor - * @member {string} [sourceUrl] - * @member {string} [status] Possible values include: 'OK', 'OKDuplicate', - * 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', - * 'ErrorLimitExceed', 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', - * 'ErrorUnknown' - * @member {object} [image] - * @member {uuid} [image.id] - * @member {date} [image.created] - * @member {number} [image.width] - * @member {number} [image.height] - * @member {string} [image.imageUri] - * @member {string} [image.thumbnailUri] - * @member {array} [image.tags] - * @member {array} [image.regions] - */ export interface ImageCreateResult { + /** + * Source URL of the image. + */ readonly sourceUrl?: string; + /** + * Status of the image creation. Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', + * 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', + * 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown', + * 'ErrorNegativeAndRegularTagOnSameImage' + */ readonly status?: string; + /** + * The image. + */ readonly image?: Image; } -/** - * @class - * Initializes a new instance of the ImageCreateSummary class. - * @constructor - * @member {boolean} [isBatchSuccessful] - * @member {array} [images] - */ export interface ImageCreateSummary { + /** + * True if all of the images in the batch were created successfully, otherwise false. + */ readonly isBatchSuccessful?: boolean; + /** + * List of the image creation results. + */ readonly images?: ImageCreateResult[]; } -/** - * @class - * Initializes a new instance of the Region class. - * @constructor - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface Region { + /** + * Id of the tag associated with this region. + */ tagId?: string; left?: number; top?: number; @@ -149,15 +197,6 @@ export interface Region { height?: number; } -/** - * @class - * Initializes a new instance of the ImageFileCreateEntry class. - * @constructor - * @member {string} [name] - * @member {buffer} [contents] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageFileCreateEntry { name?: string; contents?: Buffer; @@ -165,187 +204,33 @@ export interface ImageFileCreateEntry { regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageFileCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageFileCreateBatch { images?: ImageFileCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageUrlCreateEntry class. - * @constructor - * @member {string} [url] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageUrlCreateEntry { url?: string; tagIds?: string[]; regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageUrlCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageUrlCreateBatch { images?: ImageUrlCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageIdCreateEntry class. - * @constructor - * @member {uuid} [id] - * @member {array} [tagIds] - * @member {array} [regions] - */ export interface ImageIdCreateEntry { id?: string; tagIds?: string[]; regions?: Region[]; } -/** - * @class - * Initializes a new instance of the ImageIdCreateBatch class. - * @constructor - * @member {array} [images] - * @member {array} [tagIds] - */ export interface ImageIdCreateBatch { images?: ImageIdCreateEntry[]; tagIds?: string[]; } -/** - * @class - * Initializes a new instance of the ImageTagCreateEntry class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [tagId] - */ -export interface ImageTagCreateEntry { - imageId?: string; - tagId?: string; -} - -/** - * @class - * Initializes a new instance of the ImageTagCreateBatch class. - * @constructor - * @member {array} [tags] - */ -export interface ImageTagCreateBatch { - tags?: ImageTagCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageTagCreateSummary class. - * @constructor - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] - */ -export interface ImageTagCreateSummary { - created?: ImageTagCreateEntry[]; - duplicated?: ImageTagCreateEntry[]; - exceeded?: ImageTagCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateEntry class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ -export interface ImageRegionCreateEntry { - imageId?: string; - tagId?: string; - left?: number; - top?: number; - width?: number; - height?: number; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateBatch class. - * @constructor - * Batch of image region information to create. - * - * @member {array} [regions] - */ -export interface ImageRegionCreateBatch { - regions?: ImageRegionCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateResult class. - * @constructor - * @member {uuid} [imageId] - * @member {uuid} [regionId] - * @member {string} [tagName] - * @member {date} [created] - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ -export interface ImageRegionCreateResult { - readonly imageId?: string; - readonly regionId?: string; - readonly tagName?: string; - readonly created?: Date; - tagId?: string; - left?: number; - top?: number; - width?: number; - height?: number; -} - -/** - * @class - * Initializes a new instance of the ImageRegionCreateSummary class. - * @constructor - * @member {array} [created] - * @member {array} [duplicated] - * @member {array} [exceeded] - */ -export interface ImageRegionCreateSummary { - created?: ImageRegionCreateResult[]; - duplicated?: ImageRegionCreateEntry[]; - exceeded?: ImageRegionCreateEntry[]; -} - -/** - * @class - * Initializes a new instance of the BoundingBox class. - * @constructor - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] - */ export interface BoundingBox { left?: number; top?: number; @@ -353,69 +238,49 @@ export interface BoundingBox { height?: number; } -/** - * @class - * Initializes a new instance of the RegionProposal class. - * @constructor - * @member {number} [confidence] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] - */ export interface RegionProposal { readonly confidence?: number; readonly boundingBox?: BoundingBox; } -/** - * @class - * Initializes a new instance of the ImageRegionProposal class. - * @constructor - * @member {uuid} [projectId] - * @member {uuid} [imageId] - * @member {array} [proposals] - */ export interface ImageRegionProposal { readonly projectId?: string; readonly imageId?: string; readonly proposals?: RegionProposal[]; } -/** - * @class - * Initializes a new instance of the PredictionQueryTag class. - * @constructor - * @member {uuid} [id] - * @member {number} [minThreshold] - * @member {number} [maxThreshold] - */ +export interface ImageUrl { + url?: string; +} + +export interface Prediction { + readonly probability?: number; + readonly tagId?: string; + readonly tagName?: string; + readonly boundingBox?: BoundingBox; +} + +export interface ImagePrediction { + readonly id?: string; + readonly project?: string; + readonly iteration?: string; + readonly created?: Date; + readonly predictions?: Prediction[]; +} + export interface PredictionQueryTag { readonly id?: string; readonly minThreshold?: number; readonly maxThreshold?: number; } -/** - * @class - * Initializes a new instance of the PredictionQueryToken class. - * @constructor - * @member {string} [session] - * @member {string} [continuation] - * @member {number} [maxCount] - * @member {string} [orderBy] Possible values include: 'Newest', 'Oldest', - * 'Suggested' - * @member {array} [tags] - * @member {uuid} [iterationId] - * @member {date} [startTime] - * @member {date} [endTime] - * @member {string} [application] - */ export interface PredictionQueryToken { session?: string; continuation?: string; maxCount?: number; + /** + * Possible values include: 'Newest', 'Oldest', 'Suggested' + */ orderBy?: string; tags?: PredictionQueryTag[]; iterationId?: string; @@ -425,43 +290,24 @@ export interface PredictionQueryToken { } /** - * @class - * Initializes a new instance of the Prediction class. - * @constructor - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] - */ -export interface Prediction { - readonly probability?: number; - readonly tagId?: string; - readonly tagName?: string; - readonly boundingBox?: BoundingBox; -} - -/** - * @class - * Initializes a new instance of the StoredImagePrediction class. - * @constructor - * result of an image classification request - * - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {uuid} [domain] - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] - */ + * result of an image classification request. +*/ export interface StoredImagePrediction { - readonly imageUri?: string; + /** + * The URI to the (resized) prediction image. + */ + readonly resizedImageUri?: string; + /** + * The URI to the thumbnail of the original prediction image. + */ readonly thumbnailUri?: string; + /** + * The URI to the original prediction image. + */ + readonly originalImageUri?: string; + /** + * Domain used for the prediction. + */ readonly domain?: string; readonly id?: string; readonly project?: string; @@ -470,207 +316,72 @@ export interface StoredImagePrediction { readonly predictions?: Prediction[]; } -/** - * @class - * Initializes a new instance of the PredictionQueryResult class. - * @constructor - * @member {object} [token] - * @member {string} [token.session] - * @member {string} [token.continuation] - * @member {number} [token.maxCount] - * @member {string} [token.orderBy] Possible values include: 'Newest', - * 'Oldest', 'Suggested' - * @member {array} [token.tags] - * @member {uuid} [token.iterationId] - * @member {date} [token.startTime] - * @member {date} [token.endTime] - * @member {string} [token.application] - * @member {array} [results] - */ export interface PredictionQueryResult { readonly token?: PredictionQueryToken; readonly results?: StoredImagePrediction[]; } /** - * @class - * Initializes a new instance of the ImageUrl class. - * @constructor - * @member {string} [url] - */ -export interface ImageUrl { - url?: string; -} - -/** - * @class - * Initializes a new instance of the ImagePrediction class. - * @constructor - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] - */ -export interface ImagePrediction { - readonly id?: string; - readonly project?: string; - readonly iteration?: string; - readonly created?: Date; - readonly predictions?: Prediction[]; -} - -/** - * @class - * Initializes a new instance of the Iteration class. - * @constructor - * Iteration model to be sent over JSON - * - * @member {uuid} [id] Gets the id of the iteration - * @member {string} [name] Gets or sets the name of the iteration - * @member {boolean} [isDefault] Gets or sets a value indicating whether the - * iteration is the default iteration for the project - * @member {string} [status] Gets the current iteration status - * @member {date} [created] Gets the time this iteration was completed - * @member {date} [lastModified] Gets the time this iteration was last modified - * @member {date} [trainedAt] Gets the time this iteration was last modified - * @member {uuid} [projectId] Gets the project id of the iteration - * @member {boolean} [exportable] Whether the iteration can be exported to - * another format for download - * @member {uuid} [domainId] Get or sets a guid of the domain the iteration has - * been trained on - * @member {string} [classificationType] Gets the classification type of the - * project. Possible values include: 'Multiclass', 'Multilabel' - */ -export interface Iteration { - readonly id?: string; - name?: string; - isDefault?: boolean; - readonly status?: string; - readonly created?: Date; - readonly lastModified?: Date; - readonly trainedAt?: Date; - readonly projectId?: string; - readonly exportable?: boolean; - readonly domainId?: string; - readonly classificationType?: string; -} - -/** - * @class - * Initializes a new instance of the ProjectSettings class. - * @constructor - * Represents settings associated with a project - * - * @member {uuid} [domainId] Gets or sets the id of the Domain to use with this - * project - * @member {string} [classificationType] Gets or sets the classification type - * of the project. Possible values include: 'Multiclass', 'Multilabel' - */ -export interface ProjectSettings { - domainId?: string; - classificationType?: string; -} - -/** - * @class - * Initializes a new instance of the Project class. - * @constructor - * Represents a project - * - * @member {uuid} [id] Gets the project id - * @member {string} [name] Gets or sets the name of the project - * @member {string} [description] Gets or sets the description of the project - * @member {object} [settings] Gets or sets the project settings - * @member {uuid} [settings.domainId] Gets or sets the id of the Domain to use - * with this project - * @member {string} [settings.classificationType] Gets or sets the - * classification type of the project. Possible values include: 'Multiclass', - * 'Multilabel' - * @member {date} [created] Gets the date this project was created - * @member {date} [lastModified] Gets the date this project was last modifed - * @member {string} [thumbnailUri] Gets the thumbnail url representing the - * project - */ -export interface Project { - readonly id?: string; - name?: string; - description?: string; - settings?: ProjectSettings; - readonly created?: Date; - readonly lastModified?: Date; - readonly thumbnailUri?: string; -} - -/** - * @class - * Initializes a new instance of the TagPerformance class. - * @constructor - * Represents performance data for a particular tag in a trained iteration - * - * @member {uuid} [id] - * @member {string} [name] - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for the - * precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable - */ + * Represents performance data for a particular tag in a trained iteration. +*/ export interface TagPerformance { readonly id?: string; readonly name?: string; + /** + * Gets the precision. + */ readonly precision?: number; + /** + * Gets the standard deviation for the precision. + */ readonly precisionStdDeviation?: number; + /** + * Gets the recall. + */ readonly recall?: number; + /** + * Gets the standard deviation for the recall. + */ readonly recallStdDeviation?: number; + /** + * Gets the average precision when applicable. + */ readonly averagePrecision?: number; } /** - * @class - * Initializes a new instance of the IterationPerformance class. - * @constructor - * Represents the detailed performance data for a trained iteration - * - * @member {array} [perTagPerformance] Gets the per-tag performance details for - * this iteration - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for the - * precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable - */ + * Represents the detailed performance data for a trained iteration. +*/ export interface IterationPerformance { + /** + * Gets the per-tag performance details for this iteration. + */ readonly perTagPerformance?: TagPerformance[]; + /** + * Gets the precision. + */ readonly precision?: number; + /** + * Gets the standard deviation for the precision. + */ readonly precisionStdDeviation?: number; + /** + * Gets the recall. + */ readonly recall?: number; + /** + * Gets the standard deviation for the recall. + */ readonly recallStdDeviation?: number; + /** + * Gets the average precision when applicable. + */ readonly averagePrecision?: number; } /** - * @class - * Initializes a new instance of the ImagePerformance class. - * @constructor - * Image performance model - * - * @member {array} [predictions] - * @member {uuid} [id] - * @member {date} [created] - * @member {number} [width] - * @member {number} [height] - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {array} [tags] - * @member {array} [regions] - */ + * Image performance model. +*/ export interface ImagePerformance { readonly predictions?: Prediction[]; readonly id?: string; @@ -684,39 +395,152 @@ export interface ImagePerformance { } /** - * @class - * Initializes a new instance of the ExportModel class. - * @constructor - * @member {string} [platform] Possible values include: 'CoreML', 'TensorFlow', - * 'DockerFile', 'ONNX' - * @member {string} [status] Possible values include: 'Exporting', 'Failed', - * 'Done' - * @member {string} [downloadUri] - * @member {string} [flavor] Possible values include: 'Linux', 'Windows' - * @member {boolean} [newerVersionAvailable] - */ + * Represents settings associated with a project. +*/ +export interface ProjectSettings { + /** + * Gets or sets the id of the Domain to use with this project. + */ + domainId?: string; + /** + * Gets or sets the classification type of the project. Possible values include: 'Multiclass', + * 'Multilabel' + */ + classificationType?: string; +} + +/** + * Represents a project. +*/ +export interface Project { + /** + * Gets The project id. + */ + readonly id?: string; + /** + * Gets or sets the name of the project. + */ + name?: string; + /** + * Gets or sets the description of the project. + */ + description?: string; + /** + * Gets or sets the project settings. + */ + settings?: ProjectSettings; + /** + * Gets the date this project was created. + */ + readonly created?: Date; + /** + * Gets the date this project was last modifed. + */ + readonly lastModified?: Date; + /** + * Gets the thumbnail url representing the project. + */ + readonly thumbnailUri?: string; +} + +/** + * Iteration model to be sent over JSON. +*/ +export interface Iteration { + /** + * Gets the id of the iteration. + */ + readonly id?: string; + /** + * Gets or sets the name of the iteration. + */ + name?: string; + /** + * Gets or sets a value indicating whether the iteration is the default iteration for the + * project. + */ + isDefault?: boolean; + /** + * Gets the current iteration status. + */ + readonly status?: string; + /** + * Gets the time this iteration was completed. + */ + readonly created?: Date; + /** + * Gets the time this iteration was last modified. + */ + readonly lastModified?: Date; + /** + * Gets the time this iteration was last modified. + */ + readonly trainedAt?: Date; + /** + * Gets The project id. of the iteration. + */ + readonly projectId?: string; + /** + * Whether the iteration can be exported to another format for download. + */ + readonly exportable?: boolean; + /** + * Get or sets a guid of the domain the iteration has been trained on. + */ + readonly domainId?: string; + /** + * Gets the classification type of the project. Possible values include: 'Multiclass', + * 'Multilabel' + */ + readonly classificationType?: string; +} + export interface ExportModel { + /** + * Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + */ readonly platform?: string; + /** + * Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' + */ readonly status?: string; + /** + * URI used to download the model. + */ readonly downloadUri?: string; + /** + * Flavor of the export. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' + */ readonly flavor?: string; + /** + * Indicates an updated version of the export package is available and should be re-exported for + * the latest changes. + */ readonly newerVersionAvailable?: boolean; } /** - * @class - * Initializes a new instance of the Tag class. - * @constructor - * Represents a Tag - * - * @member {uuid} [id] Gets the Tag ID - * @member {string} [name] Gets or sets the name of the tag - * @member {string} [description] Gets or sets the description of the tag - * @member {number} [imageCount] Gets the number of images with this tag - */ + * Represents a Tag. +*/ export interface Tag { + /** + * Gets the Tag ID. + */ readonly id?: string; + /** + * Gets or sets the name of the tag. + */ name?: string; + /** + * Gets or sets the description of the tag. + */ description?: string; + /** + * Gets or sets the type of the tag. Possible values include: 'Regular', 'Negative' + */ + type?: string; + /** + * Gets the number of images with this tag. + */ readonly imageCount?: number; } diff --git a/lib/services/customVision/training/lib/models/index.js b/lib/services/customVision/training/lib/models/index.js index f83c7ff149..73bd1ce372 100644 --- a/lib/services/customVision/training/lib/models/index.js +++ b/lib/services/customVision/training/lib/models/index.js @@ -15,6 +15,13 @@ 'use strict'; exports.Domain = require('./domain'); +exports.ImageTagCreateEntry = require('./imageTagCreateEntry'); +exports.ImageTagCreateBatch = require('./imageTagCreateBatch'); +exports.ImageTagCreateSummary = require('./imageTagCreateSummary'); +exports.ImageRegionCreateEntry = require('./imageRegionCreateEntry'); +exports.ImageRegionCreateBatch = require('./imageRegionCreateBatch'); +exports.ImageRegionCreateResult = require('./imageRegionCreateResult'); +exports.ImageRegionCreateSummary = require('./imageRegionCreateSummary'); exports.ImageTag = require('./imageTag'); exports.ImageRegion = require('./imageRegion'); exports.Image = require('./image'); @@ -27,28 +34,21 @@ exports.ImageUrlCreateEntry = require('./imageUrlCreateEntry'); exports.ImageUrlCreateBatch = require('./imageUrlCreateBatch'); exports.ImageIdCreateEntry = require('./imageIdCreateEntry'); exports.ImageIdCreateBatch = require('./imageIdCreateBatch'); -exports.ImageTagCreateEntry = require('./imageTagCreateEntry'); -exports.ImageTagCreateBatch = require('./imageTagCreateBatch'); -exports.ImageTagCreateSummary = require('./imageTagCreateSummary'); -exports.ImageRegionCreateEntry = require('./imageRegionCreateEntry'); -exports.ImageRegionCreateBatch = require('./imageRegionCreateBatch'); -exports.ImageRegionCreateResult = require('./imageRegionCreateResult'); -exports.ImageRegionCreateSummary = require('./imageRegionCreateSummary'); exports.BoundingBox = require('./boundingBox'); exports.RegionProposal = require('./regionProposal'); exports.ImageRegionProposal = require('./imageRegionProposal'); +exports.ImageUrl = require('./imageUrl'); +exports.Prediction = require('./prediction'); +exports.ImagePrediction = require('./imagePrediction'); exports.PredictionQueryTag = require('./predictionQueryTag'); exports.PredictionQueryToken = require('./predictionQueryToken'); -exports.Prediction = require('./prediction'); exports.StoredImagePrediction = require('./storedImagePrediction'); exports.PredictionQueryResult = require('./predictionQueryResult'); -exports.ImageUrl = require('./imageUrl'); -exports.ImagePrediction = require('./imagePrediction'); -exports.Iteration = require('./iteration'); -exports.ProjectSettings = require('./projectSettings'); -exports.Project = require('./project'); exports.TagPerformance = require('./tagPerformance'); exports.IterationPerformance = require('./iterationPerformance'); exports.ImagePerformance = require('./imagePerformance'); +exports.ProjectSettings = require('./projectSettings'); +exports.Project = require('./project'); +exports.Iteration = require('./iteration'); exports.ExportModel = require('./exportModel'); exports.Tag = require('./tag'); diff --git a/lib/services/customVision/training/lib/models/iteration.js b/lib/services/customVision/training/lib/models/iteration.js index 939593bbf1..5d6592bba0 100644 --- a/lib/services/customVision/training/lib/models/iteration.js +++ b/lib/services/customVision/training/lib/models/iteration.js @@ -11,28 +11,29 @@ 'use strict'; /** - * Iteration model to be sent over JSON + * Iteration model to be sent over JSON. * */ class Iteration { /** * Create a Iteration. - * @member {uuid} [id] Gets the id of the iteration - * @member {string} [name] Gets or sets the name of the iteration - * @member {boolean} [isDefault] Gets or sets a value indicating whether the - * iteration is the default iteration for the project - * @member {string} [status] Gets the current iteration status - * @member {date} [created] Gets the time this iteration was completed - * @member {date} [lastModified] Gets the time this iteration was last - * modified - * @member {date} [trainedAt] Gets the time this iteration was last modified - * @member {uuid} [projectId] Gets the project id of the iteration - * @member {boolean} [exportable] Whether the iteration can be exported to - * another format for download - * @member {uuid} [domainId] Get or sets a guid of the domain the iteration - * has been trained on - * @member {string} [classificationType] Gets the classification type of the - * project. Possible values include: 'Multiclass', 'Multilabel' + * @property {uuid} [id] Gets the id of the iteration. + * @property {string} [name] Gets or sets the name of the iteration. + * @property {boolean} [isDefault] Gets or sets a value indicating whether + * the iteration is the default iteration for the project. + * @property {string} [status] Gets the current iteration status. + * @property {date} [created] Gets the time this iteration was completed. + * @property {date} [lastModified] Gets the time this iteration was last + * modified. + * @property {date} [trainedAt] Gets the time this iteration was last + * modified. + * @property {uuid} [projectId] Gets The project id. of the iteration. + * @property {boolean} [exportable] Whether the iteration can be exported to + * another format for download. + * @property {uuid} [domainId] Get or sets a guid of the domain the iteration + * has been trained on. + * @property {string} [classificationType] Gets the classification type of + * the project. Possible values include: 'Multiclass', 'Multilabel' */ constructor() { } @@ -53,6 +54,7 @@ class Iteration { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -61,6 +63,7 @@ class Iteration { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -68,6 +71,7 @@ class Iteration { }, isDefault: { required: false, + nullable: false, serializedName: 'isDefault', type: { name: 'Boolean' @@ -75,6 +79,7 @@ class Iteration { }, status: { required: false, + nullable: true, readOnly: true, serializedName: 'status', type: { @@ -83,6 +88,7 @@ class Iteration { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -91,6 +97,7 @@ class Iteration { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'lastModified', type: { @@ -99,6 +106,7 @@ class Iteration { }, trainedAt: { required: false, + nullable: true, readOnly: true, serializedName: 'trainedAt', type: { @@ -107,6 +115,7 @@ class Iteration { }, projectId: { required: false, + nullable: false, readOnly: true, serializedName: 'projectId', type: { @@ -115,6 +124,7 @@ class Iteration { }, exportable: { required: false, + nullable: false, readOnly: true, serializedName: 'exportable', type: { @@ -123,6 +133,7 @@ class Iteration { }, domainId: { required: false, + nullable: true, readOnly: true, serializedName: 'domainId', type: { @@ -131,6 +142,7 @@ class Iteration { }, classificationType: { required: false, + nullable: true, readOnly: true, serializedName: 'classificationType', type: { diff --git a/lib/services/customVision/training/lib/models/iterationPerformance.js b/lib/services/customVision/training/lib/models/iterationPerformance.js index 54b1ee5d47..a0349f84b1 100644 --- a/lib/services/customVision/training/lib/models/iterationPerformance.js +++ b/lib/services/customVision/training/lib/models/iterationPerformance.js @@ -10,25 +10,23 @@ 'use strict'; -const models = require('./index'); - /** - * Represents the detailed performance data for a trained iteration + * Represents the detailed performance data for a trained iteration. * */ class IterationPerformance { /** * Create a IterationPerformance. - * @member {array} [perTagPerformance] Gets the per-tag performance details - * for this iteration - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for - * the precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable + * @property {array} [perTagPerformance] Gets the per-tag performance details + * for this iteration. + * @property {number} [precision] Gets the precision. + * @property {number} [precisionStdDeviation] Gets the standard deviation for + * the precision. + * @property {number} [recall] Gets the recall. + * @property {number} [recallStdDeviation] Gets the standard deviation for + * the recall. + * @property {number} [averagePrecision] Gets the average precision when + * applicable. */ constructor() { } @@ -49,6 +47,7 @@ class IterationPerformance { modelProperties: { perTagPerformance: { required: false, + nullable: true, readOnly: true, serializedName: 'perTagPerformance', type: { @@ -65,6 +64,7 @@ class IterationPerformance { }, precision: { required: false, + nullable: false, readOnly: true, serializedName: 'precision', type: { @@ -73,6 +73,7 @@ class IterationPerformance { }, precisionStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'precisionStdDeviation', type: { @@ -81,6 +82,7 @@ class IterationPerformance { }, recall: { required: false, + nullable: false, readOnly: true, serializedName: 'recall', type: { @@ -89,6 +91,7 @@ class IterationPerformance { }, recallStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'recallStdDeviation', type: { @@ -97,6 +100,7 @@ class IterationPerformance { }, averagePrecision: { required: false, + nullable: true, readOnly: true, serializedName: 'averagePrecision', type: { diff --git a/lib/services/customVision/training/lib/models/prediction.js b/lib/services/customVision/training/lib/models/prediction.js index fc8ea02918..b069516a77 100644 --- a/lib/services/customVision/training/lib/models/prediction.js +++ b/lib/services/customVision/training/lib/models/prediction.js @@ -10,22 +10,20 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a Prediction. */ class Prediction { /** * Create a Prediction. - * @member {number} [probability] - * @member {uuid} [tagId] - * @member {string} [tagName] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] + * @property {number} [probability] + * @property {uuid} [tagId] + * @property {string} [tagName] + * @property {object} [boundingBox] + * @property {number} [boundingBox.left] + * @property {number} [boundingBox.top] + * @property {number} [boundingBox.width] + * @property {number} [boundingBox.height] */ constructor() { } @@ -46,6 +44,7 @@ class Prediction { modelProperties: { probability: { required: false, + nullable: false, readOnly: true, serializedName: 'probability', type: { @@ -54,6 +53,7 @@ class Prediction { }, tagId: { required: false, + nullable: false, readOnly: true, serializedName: 'tagId', type: { @@ -62,6 +62,7 @@ class Prediction { }, tagName: { required: false, + nullable: true, readOnly: true, serializedName: 'tagName', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryResult.js b/lib/services/customVision/training/lib/models/predictionQueryResult.js index f4ac0f961f..2d16a6d156 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryResult.js +++ b/lib/services/customVision/training/lib/models/predictionQueryResult.js @@ -10,26 +10,24 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a PredictionQueryResult. */ class PredictionQueryResult { /** * Create a PredictionQueryResult. - * @member {object} [token] - * @member {string} [token.session] - * @member {string} [token.continuation] - * @member {number} [token.maxCount] - * @member {string} [token.orderBy] Possible values include: 'Newest', + * @property {object} [token] + * @property {string} [token.session] + * @property {string} [token.continuation] + * @property {number} [token.maxCount] + * @property {string} [token.orderBy] Possible values include: 'Newest', * 'Oldest', 'Suggested' - * @member {array} [token.tags] - * @member {uuid} [token.iterationId] - * @member {date} [token.startTime] - * @member {date} [token.endTime] - * @member {string} [token.application] - * @member {array} [results] + * @property {array} [token.tags] + * @property {uuid} [token.iterationId] + * @property {date} [token.startTime] + * @property {date} [token.endTime] + * @property {string} [token.application] + * @property {array} [results] */ constructor() { } @@ -59,6 +57,7 @@ class PredictionQueryResult { }, results: { required: false, + nullable: true, readOnly: true, serializedName: 'results', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryTag.js b/lib/services/customVision/training/lib/models/predictionQueryTag.js index 1e991136cb..7268f9ef81 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryTag.js +++ b/lib/services/customVision/training/lib/models/predictionQueryTag.js @@ -16,9 +16,9 @@ class PredictionQueryTag { /** * Create a PredictionQueryTag. - * @member {uuid} [id] - * @member {number} [minThreshold] - * @member {number} [maxThreshold] + * @property {uuid} [id] + * @property {number} [minThreshold] + * @property {number} [maxThreshold] */ constructor() { } @@ -39,6 +39,7 @@ class PredictionQueryTag { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -47,6 +48,7 @@ class PredictionQueryTag { }, minThreshold: { required: false, + nullable: false, readOnly: true, serializedName: 'minThreshold', type: { @@ -55,6 +57,7 @@ class PredictionQueryTag { }, maxThreshold: { required: false, + nullable: false, readOnly: true, serializedName: 'maxThreshold', type: { diff --git a/lib/services/customVision/training/lib/models/predictionQueryToken.js b/lib/services/customVision/training/lib/models/predictionQueryToken.js index e58cdfd992..b13a32336b 100644 --- a/lib/services/customVision/training/lib/models/predictionQueryToken.js +++ b/lib/services/customVision/training/lib/models/predictionQueryToken.js @@ -10,24 +10,22 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a PredictionQueryToken. */ class PredictionQueryToken { /** * Create a PredictionQueryToken. - * @member {string} [session] - * @member {string} [continuation] - * @member {number} [maxCount] - * @member {string} [orderBy] Possible values include: 'Newest', 'Oldest', + * @property {string} [session] + * @property {string} [continuation] + * @property {number} [maxCount] + * @property {string} [orderBy] Possible values include: 'Newest', 'Oldest', * 'Suggested' - * @member {array} [tags] - * @member {uuid} [iterationId] - * @member {date} [startTime] - * @member {date} [endTime] - * @member {string} [application] + * @property {array} [tags] + * @property {uuid} [iterationId] + * @property {date} [startTime] + * @property {date} [endTime] + * @property {string} [application] */ constructor() { } @@ -48,6 +46,7 @@ class PredictionQueryToken { modelProperties: { session: { required: false, + nullable: true, serializedName: 'session', type: { name: 'String' @@ -55,6 +54,7 @@ class PredictionQueryToken { }, continuation: { required: false, + nullable: true, serializedName: 'continuation', type: { name: 'String' @@ -62,6 +62,7 @@ class PredictionQueryToken { }, maxCount: { required: false, + nullable: false, serializedName: 'maxCount', type: { name: 'Number' @@ -69,6 +70,7 @@ class PredictionQueryToken { }, orderBy: { required: false, + nullable: false, serializedName: 'orderBy', type: { name: 'String' @@ -76,6 +78,7 @@ class PredictionQueryToken { }, tags: { required: false, + nullable: true, serializedName: 'tags', type: { name: 'Sequence', @@ -91,6 +94,7 @@ class PredictionQueryToken { }, iterationId: { required: false, + nullable: true, serializedName: 'iterationId', type: { name: 'String' @@ -98,6 +102,7 @@ class PredictionQueryToken { }, startTime: { required: false, + nullable: true, serializedName: 'startTime', type: { name: 'DateTime' @@ -105,6 +110,7 @@ class PredictionQueryToken { }, endTime: { required: false, + nullable: true, serializedName: 'endTime', type: { name: 'DateTime' @@ -112,6 +118,7 @@ class PredictionQueryToken { }, application: { required: false, + nullable: true, serializedName: 'application', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/project.js b/lib/services/customVision/training/lib/models/project.js index f5bb16a44f..ae364fb038 100644 --- a/lib/services/customVision/training/lib/models/project.js +++ b/lib/services/customVision/training/lib/models/project.js @@ -10,28 +10,28 @@ 'use strict'; -const models = require('./index'); - /** - * Represents a project + * Represents a project. * */ class Project { /** * Create a Project. - * @member {uuid} [id] Gets the project id - * @member {string} [name] Gets or sets the name of the project - * @member {string} [description] Gets or sets the description of the project - * @member {object} [settings] Gets or sets the project settings - * @member {uuid} [settings.domainId] Gets or sets the id of the Domain to - * use with this project - * @member {string} [settings.classificationType] Gets or sets the + * @property {uuid} [id] Gets The project id. + * @property {string} [name] Gets or sets the name of the project. + * @property {string} [description] Gets or sets the description of the + * project. + * @property {object} [settings] Gets or sets the project settings. + * @property {uuid} [settings.domainId] Gets or sets the id of the Domain to + * use with this project. + * @property {string} [settings.classificationType] Gets or sets the * classification type of the project. Possible values include: 'Multiclass', * 'Multilabel' - * @member {date} [created] Gets the date this project was created - * @member {date} [lastModified] Gets the date this project was last modifed - * @member {string} [thumbnailUri] Gets the thumbnail url representing the - * project + * @property {date} [created] Gets the date this project was created. + * @property {date} [lastModified] Gets the date this project was last + * modifed. + * @property {string} [thumbnailUri] Gets the thumbnail url representing the + * project. */ constructor() { } @@ -52,6 +52,7 @@ class Project { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -60,6 +61,7 @@ class Project { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -67,6 +69,7 @@ class Project { }, description: { required: false, + nullable: true, serializedName: 'description', type: { name: 'String' @@ -82,6 +85,7 @@ class Project { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -90,6 +94,7 @@ class Project { }, lastModified: { required: false, + nullable: false, readOnly: true, serializedName: 'lastModified', type: { @@ -98,6 +103,7 @@ class Project { }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { diff --git a/lib/services/customVision/training/lib/models/projectSettings.js b/lib/services/customVision/training/lib/models/projectSettings.js index 1fcde5df96..bb5f9c78cb 100644 --- a/lib/services/customVision/training/lib/models/projectSettings.js +++ b/lib/services/customVision/training/lib/models/projectSettings.js @@ -11,16 +11,16 @@ 'use strict'; /** - * Represents settings associated with a project + * Represents settings associated with a project. * */ class ProjectSettings { /** * Create a ProjectSettings. - * @member {uuid} [domainId] Gets or sets the id of the Domain to use with - * this project - * @member {string} [classificationType] Gets or sets the classification type - * of the project. Possible values include: 'Multiclass', 'Multilabel' + * @property {uuid} [domainId] Gets or sets the id of the Domain to use with + * this project. + * @property {string} [classificationType] Gets or sets the classification + * type of the project. Possible values include: 'Multiclass', 'Multilabel' */ constructor() { } @@ -41,6 +41,7 @@ class ProjectSettings { modelProperties: { domainId: { required: false, + nullable: false, serializedName: 'domainId', type: { name: 'String' @@ -48,6 +49,7 @@ class ProjectSettings { }, classificationType: { required: false, + nullable: true, serializedName: 'classificationType', type: { name: 'String' diff --git a/lib/services/customVision/training/lib/models/region.js b/lib/services/customVision/training/lib/models/region.js index 9ee7894ddc..4dfbc6a615 100644 --- a/lib/services/customVision/training/lib/models/region.js +++ b/lib/services/customVision/training/lib/models/region.js @@ -16,11 +16,11 @@ class Region { /** * Create a Region. - * @member {uuid} [tagId] - * @member {number} [left] - * @member {number} [top] - * @member {number} [width] - * @member {number} [height] + * @property {uuid} [tagId] Id of the tag associated with this region. + * @property {number} [left] + * @property {number} [top] + * @property {number} [width] + * @property {number} [height] */ constructor() { } @@ -41,6 +41,7 @@ class Region { modelProperties: { tagId: { required: false, + nullable: false, serializedName: 'tagId', type: { name: 'String' @@ -48,6 +49,7 @@ class Region { }, left: { required: false, + nullable: false, serializedName: 'left', type: { name: 'Number' @@ -55,6 +57,7 @@ class Region { }, top: { required: false, + nullable: false, serializedName: 'top', type: { name: 'Number' @@ -62,6 +65,7 @@ class Region { }, width: { required: false, + nullable: false, serializedName: 'width', type: { name: 'Number' @@ -69,6 +73,7 @@ class Region { }, height: { required: false, + nullable: false, serializedName: 'height', type: { name: 'Number' diff --git a/lib/services/customVision/training/lib/models/regionProposal.js b/lib/services/customVision/training/lib/models/regionProposal.js index cf2fe1cbd3..f4026b8ea0 100644 --- a/lib/services/customVision/training/lib/models/regionProposal.js +++ b/lib/services/customVision/training/lib/models/regionProposal.js @@ -10,20 +10,18 @@ 'use strict'; -const models = require('./index'); - /** * Class representing a RegionProposal. */ class RegionProposal { /** * Create a RegionProposal. - * @member {number} [confidence] - * @member {object} [boundingBox] - * @member {number} [boundingBox.left] - * @member {number} [boundingBox.top] - * @member {number} [boundingBox.width] - * @member {number} [boundingBox.height] + * @property {number} [confidence] + * @property {object} [boundingBox] + * @property {number} [boundingBox.left] + * @property {number} [boundingBox.top] + * @property {number} [boundingBox.width] + * @property {number} [boundingBox.height] */ constructor() { } @@ -44,6 +42,7 @@ class RegionProposal { modelProperties: { confidence: { required: false, + nullable: false, readOnly: true, serializedName: 'confidence', type: { diff --git a/lib/services/customVision/training/lib/models/storedImagePrediction.js b/lib/services/customVision/training/lib/models/storedImagePrediction.js index 7fc87dd11a..b5d10902f3 100644 --- a/lib/services/customVision/training/lib/models/storedImagePrediction.js +++ b/lib/services/customVision/training/lib/models/storedImagePrediction.js @@ -10,23 +10,25 @@ 'use strict'; -const models = require('./index'); - /** - * result of an image classification request + * result of an image classification request. * */ class StoredImagePrediction { /** * Create a StoredImagePrediction. - * @member {string} [imageUri] - * @member {string} [thumbnailUri] - * @member {uuid} [domain] - * @member {uuid} [id] - * @member {uuid} [project] - * @member {uuid} [iteration] - * @member {date} [created] - * @member {array} [predictions] + * @property {string} [resizedImageUri] The URI to the (resized) prediction + * image. + * @property {string} [thumbnailUri] The URI to the thumbnail of the original + * prediction image. + * @property {string} [originalImageUri] The URI to the original prediction + * image. + * @property {uuid} [domain] Domain used for the prediction. + * @property {uuid} [id] + * @property {uuid} [project] + * @property {uuid} [iteration] + * @property {date} [created] + * @property {array} [predictions] */ constructor() { } @@ -45,24 +47,36 @@ class StoredImagePrediction { name: 'Composite', className: 'StoredImagePrediction', modelProperties: { - imageUri: { + resizedImageUri: { required: false, + nullable: true, readOnly: true, - serializedName: 'imageUri', + serializedName: 'resizedImageUri', type: { name: 'String' } }, thumbnailUri: { required: false, + nullable: true, readOnly: true, serializedName: 'thumbnailUri', type: { name: 'String' } }, + originalImageUri: { + required: false, + nullable: true, + readOnly: true, + serializedName: 'originalImageUri', + type: { + name: 'String' + } + }, domain: { required: false, + nullable: false, readOnly: true, serializedName: 'domain', type: { @@ -71,6 +85,7 @@ class StoredImagePrediction { }, id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -79,6 +94,7 @@ class StoredImagePrediction { }, project: { required: false, + nullable: false, readOnly: true, serializedName: 'project', type: { @@ -87,6 +103,7 @@ class StoredImagePrediction { }, iteration: { required: false, + nullable: false, readOnly: true, serializedName: 'iteration', type: { @@ -95,6 +112,7 @@ class StoredImagePrediction { }, created: { required: false, + nullable: false, readOnly: true, serializedName: 'created', type: { @@ -103,6 +121,7 @@ class StoredImagePrediction { }, predictions: { required: false, + nullable: true, readOnly: true, serializedName: 'predictions', type: { diff --git a/lib/services/customVision/training/lib/models/tag.js b/lib/services/customVision/training/lib/models/tag.js index 539910a9e2..c75fd69d31 100644 --- a/lib/services/customVision/training/lib/models/tag.js +++ b/lib/services/customVision/training/lib/models/tag.js @@ -11,16 +11,18 @@ 'use strict'; /** - * Represents a Tag + * Represents a Tag. * */ class Tag { /** * Create a Tag. - * @member {uuid} [id] Gets the Tag ID - * @member {string} [name] Gets or sets the name of the tag - * @member {string} [description] Gets or sets the description of the tag - * @member {number} [imageCount] Gets the number of images with this tag + * @property {uuid} [id] Gets the Tag ID. + * @property {string} [name] Gets or sets the name of the tag. + * @property {string} [description] Gets or sets the description of the tag. + * @property {string} [type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' + * @property {number} [imageCount] Gets the number of images with this tag. */ constructor() { } @@ -41,6 +43,7 @@ class Tag { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -49,6 +52,7 @@ class Tag { }, name: { required: false, + nullable: true, serializedName: 'name', type: { name: 'String' @@ -56,13 +60,23 @@ class Tag { }, description: { required: false, + nullable: true, serializedName: 'description', type: { name: 'String' } }, + type: { + required: false, + nullable: false, + serializedName: 'type', + type: { + name: 'String' + } + }, imageCount: { required: false, + nullable: false, readOnly: true, serializedName: 'imageCount', type: { diff --git a/lib/services/customVision/training/lib/models/tagPerformance.js b/lib/services/customVision/training/lib/models/tagPerformance.js index a839799129..5cca7a274f 100644 --- a/lib/services/customVision/training/lib/models/tagPerformance.js +++ b/lib/services/customVision/training/lib/models/tagPerformance.js @@ -11,22 +11,22 @@ 'use strict'; /** - * Represents performance data for a particular tag in a trained iteration + * Represents performance data for a particular tag in a trained iteration. * */ class TagPerformance { /** * Create a TagPerformance. - * @member {uuid} [id] - * @member {string} [name] - * @member {number} [precision] Gets the precision - * @member {number} [precisionStdDeviation] Gets the standard deviation for - * the precision - * @member {number} [recall] Gets the recall - * @member {number} [recallStdDeviation] Gets the standard deviation for the - * recall - * @member {number} [averagePrecision] Gets the average precision when - * applicable + * @property {uuid} [id] + * @property {string} [name] + * @property {number} [precision] Gets the precision. + * @property {number} [precisionStdDeviation] Gets the standard deviation for + * the precision. + * @property {number} [recall] Gets the recall. + * @property {number} [recallStdDeviation] Gets the standard deviation for + * the recall. + * @property {number} [averagePrecision] Gets the average precision when + * applicable. */ constructor() { } @@ -47,6 +47,7 @@ class TagPerformance { modelProperties: { id: { required: false, + nullable: false, readOnly: true, serializedName: 'id', type: { @@ -55,6 +56,7 @@ class TagPerformance { }, name: { required: false, + nullable: true, readOnly: true, serializedName: 'name', type: { @@ -63,6 +65,7 @@ class TagPerformance { }, precision: { required: false, + nullable: false, readOnly: true, serializedName: 'precision', type: { @@ -71,6 +74,7 @@ class TagPerformance { }, precisionStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'precisionStdDeviation', type: { @@ -79,6 +83,7 @@ class TagPerformance { }, recall: { required: false, + nullable: false, readOnly: true, serializedName: 'recall', type: { @@ -87,6 +92,7 @@ class TagPerformance { }, recallStdDeviation: { required: false, + nullable: false, readOnly: true, serializedName: 'recallStdDeviation', type: { @@ -95,6 +101,7 @@ class TagPerformance { }, averagePrecision: { required: false, + nullable: true, readOnly: true, serializedName: 'averagePrecision', type: { diff --git a/lib/services/customVision/training/lib/trainingAPIClient.d.ts b/lib/services/customVision/training/lib/trainingAPIClient.d.ts index 58bd7b0778..4e0159ccae 100644 --- a/lib/services/customVision/training/lib/trainingAPIClient.d.ts +++ b/lib/services/customVision/training/lib/trainingAPIClient.d.ts @@ -19,7 +19,7 @@ export default class TrainingAPIClient extends ServiceClient { * * @param {string} apiKey - * - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * * @param {object} [options] - The parameter options * @@ -31,13 +31,15 @@ export default class TrainingAPIClient extends ServiceClient { * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * */ - constructor(apiKey: string, baseUri?: string, options?: ServiceClientOptions); + constructor(apiKey: string, endpoint: string, options?: ServiceClientOptions); apiKey: string; + endpoint: string; + /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -53,7 +55,7 @@ export default class TrainingAPIClient extends ServiceClient { getDomainsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -87,9 +89,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -105,9 +107,9 @@ export default class TrainingAPIClient extends ServiceClient { getDomainWithHttpOperationResponse(domainId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -142,73 +144,113 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getTaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + getTaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {Number} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {Number} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getTaggedImageCount(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + getTaggedImageCount(projectId: string, callback: ServiceCallback): void; + getTaggedImageCount(projectId: string, options: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getUntaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -220,7 +262,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -228,73 +270,114 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {Number} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImages(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getTaggedImages(projectId: string, callback: ServiceCallback): void; - getTaggedImages(projectId: string, options: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getUntaggedImageCount(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getUntaggedImageCount(projectId: string, callback: ServiceCallback): void; + getUntaggedImageCount(projectId: string, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get untagged images for a given project iteration + * @summary Associate a set of images with a set of tags. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. * - * @param {uuid} projectId The project id + * @param {array} [batch.tags] Image Tag entries to include in this batch. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error|ServiceError} - The error object. + */ + createImageTagsWithHttpOperationResponse(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Associate a set of images with a set of tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {Promise} A promise is returned. + * + * @resolve {ImageTagCreateSummary} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ImageTagCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, callback: ServiceCallback): void; + createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** - * @summary Get untagged images for a given project iteration + * @summary Remove a set of tags from a set of images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error|ServiceError} - The error object. + */ + deleteImageTagsWithHttpOperationResponse(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Remove a set of tags from a set of images. + * + * @param {uuid} projectId The project id. + * + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -306,7 +389,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Array} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -314,59 +397,59 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImages(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getUntaggedImages(projectId: string, callback: ServiceCallback): void; - getUntaggedImages(projectId: string, options: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Create a set of image regions. * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.regions] * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getTaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + createImageRegionsWithHttpOperationResponse(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Create a set of image regions. * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.regions] * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -378,7 +461,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {ImageRegionCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -386,54 +469,48 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {ImageRegionCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImageCount(projectId: string, options?: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - getTaggedImageCount(projectId: string, callback: ServiceCallback): void; - getTaggedImageCount(projectId: string, options: { iterationId? : string, tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, callback: ServiceCallback): void; + createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Gets the number of untagged images + * @summary Delete a set of image regions. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getUntaggedImageCountWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteImageRegionsWithHttpOperationResponse(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of untagged images + * @summary Delete a set of image regions. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -444,7 +521,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -452,32 +529,45 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImageCount(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getUntaggedImageCount(projectId: string, callback: ServiceCallback): void; - getUntaggedImageCount(projectId: string, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImageRegions(projectId: string, regionIds: string[], callback: ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get images by id for a given project iteration + * @summary Get tagged images for a given project iteration. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -488,23 +578,36 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - getImagesByIdsWithHttpOperationResponse(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getTaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get images by id for a given project iteration + * @summary Get tagged images for a given project iteration. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -530,53 +633,67 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImagesByIds(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getImagesByIds(projectId: string, callback: ServiceCallback): void; - getImagesByIds(projectId: string, options: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getTaggedImages(projectId: string, options?: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getTaggedImages(projectId: string, callback: ServiceCallback): void; + getTaggedImages(projectId: string, options: { iterationId? : string, tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Get untagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {object} imageData + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImagesFromDataWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + getUntaggedImagesWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Get untagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {object} imageData + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -588,7 +705,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageCreateSummary} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -596,49 +713,60 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromData(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromData(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; - createImagesFromData(projectId: string, imageData: stream.Readable, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getUntaggedImages(projectId: string, options?: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getUntaggedImages(projectId: string, callback: ServiceCallback): void; + getUntaggedImages(projectId: string, options: { iterationId? : string, orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete images from the set of training images + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteImagesWithHttpOperationResponse(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagesByIdsWithHttpOperationResponse(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete images from the set of training images + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -649,7 +777,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -657,34 +785,33 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImages(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImages(projectId: string, imageIds: string[], callback: ServiceCallback): void; - deleteImages(projectId: string, imageIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagesByIds(projectId: string, options?: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getImagesByIds(projectId: string, callback: ServiceCallback): void; + getImagesByIds(projectId: string, options: { imageIds? : string[], iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided images to the set of training images. * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -694,25 +821,24 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createImagesFromFilesWithHttpOperationResponse(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromDataWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the provided batch of images to the set of training images - * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * @summary Add the provided images to the set of training images. * - * @param {uuid} projectId The project id - * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -738,25 +864,18 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, callback: ServiceCallback): void; - createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromData(projectId: string, imageData: stream.Readable, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromData(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; + createImagesFromData(projectId: string, imageData: stream.Readable, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the provided images urls to the set of training images + * @summary Delete images from the set of training images. * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch - * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -765,26 +884,19 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImagesFromUrlsWithHttpOperationResponse(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteImagesWithHttpOperationResponse(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - /** - * @summary Add the provided images urls to the set of training images - * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + /** + * @summary Delete images from the set of training images. * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -798,7 +910,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageCreateSummary} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -806,28 +918,27 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, callback: ServiceCallback): void; - createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteImages(projectId: string, imageIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteImages(projectId: string, imageIds: string[], callback: ServiceCallback): void; + deleteImages(projectId: string, imageIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Add the specified predicted images to the set of training images + * @summary Add the provided batch of images to the set of training images. * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -844,18 +955,18 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createImagesFromPredictionsWithHttpOperationResponse(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromFilesWithHttpOperationResponse(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Add the specified predicted images to the set of training images + * @summary Add the provided batch of images to the set of training images. * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -888,19 +999,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, callback: ServiceCallback): void; - createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, callback: ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: models.ImageFileCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Associate a set of images with a set of tags + * @summary Add the provided images urls to the set of training images. + * + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. + * + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {array} [batch.images] * - * @param {array} [batch.tags] + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -909,20 +1026,26 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImageTagsWithHttpOperationResponse(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromUrlsWithHttpOperationResponse(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Associate a set of images with a set of tags + * @summary Add the provided images urls to the set of training images. + * + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {array} [batch.images] * - * @param {array} [batch.tags] + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -936,7 +1059,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageTagCreateSummary} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -944,27 +1067,32 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageTagCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. + * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, callback: ServiceCallback): void; - createImageTags(projectId: string, batch: models.ImageTagCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, callback: ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: models.ImageUrlCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -973,21 +1101,26 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteImageTagsWithHttpOperationResponse(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createImagesFromPredictionsWithHttpOperationResponse(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -1001,7 +1134,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1009,30 +1142,28 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImageCreateSummary} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: ServiceCallback): void; - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, callback: ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: models.ImageIdCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -1041,25 +1172,22 @@ export default class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createImageRegionsWithHttpOperationResponse(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImageRegionProposalsWithHttpOperationResponse(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -1073,7 +1201,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageRegionCreateSummary} - The deserialized result object. + * @resolve {ImageRegionProposal} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1081,25 +1209,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageRegionCreateSummary} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * {ImageRegionProposal} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionProposal} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, callback: ServiceCallback): void; - createImageRegions(projectId: string, batch: models.ImageRegionCreateBatch, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getImageRegionProposals(projectId: string, imageId: string, callback: ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -1112,14 +1240,15 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - deleteImageRegionsWithHttpOperationResponse(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deletePredictionWithHttpOperationResponse(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -1147,48 +1276,54 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageRegions(projectId: string, regionIds: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteImageRegions(projectId: string, regionIds: string[], callback: ServiceCallback): void; - deleteImageRegions(projectId: string, regionIds: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deletePrediction(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deletePrediction(projectId: string, ids: string[], callback: ServiceCallback): void; + deletePrediction(projectId: string, ids: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getImageRegionProposalsWithHttpOperationResponse(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + quickTestImageUrlWithHttpOperationResponse(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1199,7 +1334,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImageRegionProposal} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1207,49 +1342,55 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImageRegionProposal} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionProposal} for more information. + * {ImagePrediction} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImageRegionProposals(projectId: string, imageId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getImageRegionProposals(projectId: string, imageId: string, callback: ServiceCallback): void; - getImageRegionProposals(projectId: string, imageId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, callback: ServiceCallback): void; + quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deletePredictionWithHttpOperationResponse(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + quickTestImageWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1260,7 +1401,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1268,24 +1409,25 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ImagePrediction} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deletePrediction(projectId: string, ids: string[], options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deletePrediction(projectId: string, ids: string[], callback: ServiceCallback): void; - deletePrediction(projectId: string, ids: string[], options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + quickTestImage(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + quickTestImage(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; + quickTestImage(projectId: string, imageData: stream.Readable, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -1320,12 +1462,12 @@ export default class TrainingAPIClient extends ServiceClient { queryPredictionsWithHttpOperationResponse(projectId: string, query: models.PredictionQueryToken, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -1379,47 +1521,45 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Quick test an image url + * @summary Get detailed performance information about an iteration. * - * @param {uuid} projectId The project to evaluate against + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated - * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - quickTestImageUrlWithHttpOperationResponse(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getIterationPerformanceWithHttpOperationResponse(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Get detailed performance information about an iteration. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1431,7 +1571,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {IterationPerformance} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1439,54 +1579,86 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImagePrediction} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {IterationPerformance} [result] - The deserialized result object if an error did not occur. + * See {@link IterationPerformance} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, callback: ServiceCallback): void; - quickTestImageUrl(projectId: string, imageUrl: models.ImageUrl, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getIterationPerformance(projectId: string, iterationId: string, callback: ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, options: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - quickTestImageWithHttpOperationResponse(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagePerformancesWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1498,7 +1670,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1506,43 +1678,64 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ImagePrediction} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {Array} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImage(projectId: string, imageData: stream.Readable, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - quickTestImage(projectId: string, imageData: stream.Readable, callback: ServiceCallback): void; - quickTestImage(projectId: string, imageData: stream.Readable, options: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagePerformances(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + getImagePerformances(projectId: string, iterationId: string, callback: ServiceCallback): void; + getImagePerformances(projectId: string, iterationId: string, options: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - trainProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getImagePerformanceCountWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1553,7 +1746,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Iteration} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1561,20 +1754,19 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Iteration} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * {Number} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - trainProject(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - trainProject(projectId: string, callback: ServiceCallback): void; - trainProject(projectId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getImagePerformanceCount(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; + getImagePerformanceCount(projectId: string, iterationId: string, callback: ServiceCallback): void; + getImagePerformanceCount(projectId: string, iterationId: string, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -1590,7 +1782,7 @@ export default class TrainingAPIClient extends ServiceClient { getProjectsWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -1624,16 +1816,16 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -1650,16 +1842,16 @@ export default class TrainingAPIClient extends ServiceClient { createProjectWithHttpOperationResponse(name: string, options?: { description? : string, domainId? : string, classificationType? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -1695,9 +1887,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -1713,9 +1905,9 @@ export default class TrainingAPIClient extends ServiceClient { getProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -1750,9 +1942,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1768,9 +1960,9 @@ export default class TrainingAPIClient extends ServiceClient { deleteProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1804,21 +1996,21 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -1838,21 +2030,21 @@ export default class TrainingAPIClient extends ServiceClient { updateProjectWithHttpOperationResponse(projectId: string, updatedProject: models.Project, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -1891,9 +2083,9 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1909,9 +2101,9 @@ export default class TrainingAPIClient extends ServiceClient { getIterationsWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -1945,11 +2137,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -1965,11 +2157,11 @@ export default class TrainingAPIClient extends ServiceClient { getIterationWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -2004,11 +2196,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2024,11 +2216,11 @@ export default class TrainingAPIClient extends ServiceClient { deleteIterationWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2062,19 +2254,19 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -2090,19 +2282,19 @@ export default class TrainingAPIClient extends ServiceClient { updateIterationWithHttpOperationResponse(projectId: string, iterationId: string, updatedIteration: models.Iteration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -2137,221 +2329,30 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getIterationPerformanceWithHttpOperationResponse(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get - * - * @param {object} [options] Optional Parameters. - * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {IterationPerformance} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {IterationPerformance} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getIterationPerformance(projectId: string, iterationId: string, options?: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getIterationPerformance(projectId: string, iterationId: string, callback: ServiceCallback): void; - getIterationPerformance(projectId: string, iterationId: string, options: { threshold? : number, overlapThreshold? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getImagePerformancesWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {Array} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - getImagePerformances(projectId: string, iterationId: string, options?: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - getImagePerformances(projectId: string, iterationId: string, callback: ServiceCallback): void; - getImagePerformances(projectId: string, iterationId: string, options: { tagIds? : string[], orderBy? : string, take? : number, skip? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getImagePerformanceCountWithHttpOperationResponse(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise>; + trainProjectWithHttpOperationResponse(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2362,7 +2363,7 @@ export default class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned. * - * @resolve {Number} - The deserialized result object. + * @resolve {Iteration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2370,23 +2371,24 @@ export default class TrainingAPIClient extends ServiceClient { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Number} [result] - The deserialized result object if an error did not occur. + * {Iteration} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getImagePerformanceCount(projectId: string, iterationId: string, options?: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }): Promise; - getImagePerformanceCount(projectId: string, iterationId: string, callback: ServiceCallback): void; - getImagePerformanceCount(projectId: string, iterationId: string, options: { tagIds? : string[], customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + trainProject(projectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + trainProject(projectId: string, callback: ServiceCallback): void; + trainProject(projectId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2402,11 +2404,11 @@ export default class TrainingAPIClient extends ServiceClient { getExportsWithHttpOperationResponse(projectId: string, iterationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -2440,19 +2442,19 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2466,19 +2468,19 @@ export default class TrainingAPIClient extends ServiceClient { exportIterationWithHttpOperationResponse(projectId: string, iterationId: string, platform: string, options?: { flavor? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2511,16 +2513,16 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2534,16 +2536,16 @@ export default class TrainingAPIClient extends ServiceClient { getTagWithHttpOperationResponse(projectId: string, tagId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2576,11 +2578,11 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -2596,11 +2598,11 @@ export default class TrainingAPIClient extends ServiceClient { deleteTagWithHttpOperationResponse(projectId: string, tagId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -2634,18 +2636,21 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -2661,18 +2666,21 @@ export default class TrainingAPIClient extends ServiceClient { updateTagWithHttpOperationResponse(projectId: string, tagId: string, updatedTag: models.Tag, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -2707,13 +2715,13 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2727,13 +2735,13 @@ export default class TrainingAPIClient extends ServiceClient { getTagsWithHttpOperationResponse(projectId: string, options?: { iterationId? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2765,15 +2773,18 @@ export default class TrainingAPIClient extends ServiceClient { /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2784,18 +2795,21 @@ export default class TrainingAPIClient extends ServiceClient { * * @reject {Error|ServiceError} - The error object. */ - createTagWithHttpOperationResponse(projectId: string, name: string, options?: { description? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createTagWithHttpOperationResponse(projectId: string, name: string, options?: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2822,9 +2836,9 @@ export default class TrainingAPIClient extends ServiceClient { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createTag(projectId: string, name: string, options?: { description? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + createTag(projectId: string, name: string, options?: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }): Promise; createTag(projectId: string, name: string, callback: ServiceCallback): void; - createTag(projectId: string, name: string, options: { description? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createTag(projectId: string, name: string, options: { description? : string, type? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { TrainingAPIClient, models as TrainingAPIModels }; diff --git a/lib/services/customVision/training/lib/trainingAPIClient.js b/lib/services/customVision/training/lib/trainingAPIClient.js index 4b89372da2..16d486b971 100644 --- a/lib/services/customVision/training/lib/trainingAPIClient.js +++ b/lib/services/customVision/training/lib/trainingAPIClient.js @@ -22,7 +22,7 @@ const models = require('./models'); /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -53,6 +53,9 @@ function _getDomains(options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -63,6 +66,7 @@ function _getDomains(options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'domains'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -150,9 +154,9 @@ function _getDomains(options, callback) { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -184,6 +188,9 @@ function _getDomain(domainId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (domainId === null || domainId === undefined || typeof domainId.valueOf() !== 'string' || !msRest.isValidUuid(domainId)) { throw new Error('domainId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -197,6 +204,7 @@ function _getDomain(domainId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'domains/{domainId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{domainId}', encodeURIComponent(domainId.toString())); // Create HTTP transport objects @@ -271,33 +279,20 @@ function _getDomain(domainId, options, callback) { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -308,13 +303,13 @@ function _getDomain(domainId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getTaggedImages(projectId, options, callback) { +function _getTaggedImageCount(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -326,11 +321,11 @@ function _getTaggedImages(projectId, options, callback) { } let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -344,15 +339,6 @@ function _getTaggedImages(projectId, options, callback) { } } } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -362,7 +348,8 @@ function _getTaggedImages(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -371,15 +358,6 @@ function _getTaggedImages(projectId, options, callback) { if (tagIds !== null && tagIds !== undefined) { queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -444,15 +422,7 @@ function _getTaggedImages(projectId, options, callback) { required: false, serializedName: 'parsedResponse', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } + name: 'Number' } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -470,27 +440,17 @@ function _getTaggedImages(projectId, options, callback) { } /** - * @summary Get untagged images for a given project iteration + * @summary Gets the number of untagged images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -501,13 +461,13 @@ function _getTaggedImages(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getUntaggedImages(projectId, options, callback) { +function _getUntaggedImageCount(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -518,26 +478,17 @@ function _getUntaggedImages(projectId, options, callback) { throw new Error('callback cannot be null.'); } let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { throw new Error('iterationId must be of type string and must be a valid uuid.'); } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -547,21 +498,13 @@ function _getUntaggedImages(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -626,15 +569,7 @@ function _getUntaggedImages(projectId, options, callback) { required: false, serializedName: 'parsedResponse', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } + name: 'Number' } }; result = client.deserialize(resultMapper, parsedResponse, 'result'); @@ -652,20 +587,15 @@ function _getUntaggedImages(projectId, options, callback) { } /** - * @summary Gets the number of images tagged with the provided {tagIds} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * @summary Associate a set of images with a set of tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {array} [batch.tags] Image Tag entries to include in this batch. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -676,13 +606,14 @@ function _getUntaggedImages(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getTaggedImageCount(projectId, options, callback) { +function _createImageTags(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -692,22 +623,16 @@ function _getTaggedImageCount(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); - } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -718,22 +643,13 @@ function _getTaggedImageCount(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -748,7 +664,21 @@ function _getTaggedImageCount(projectId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageTagCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -787,13 +717,7 @@ function _getTaggedImageCount(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; + let resultMapper = new client.models['ImageTagCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -809,17 +733,16 @@ function _getTaggedImageCount(projectId, options, callback) { } /** - * @summary Gets the number of untagged images + * @summary Remove a set of tags from a set of images. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. * - * @param {object} [options] Optional Parameters. + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -830,13 +753,13 @@ function _getTaggedImageCount(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getUntaggedImageCount(projectId, options, callback) { +function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -846,14 +769,29 @@ function _getUntaggedImageCount(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); + if (!Array.isArray(imageIds)) { + throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + } + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } + } + if (!Array.isArray(tagIds)) { + throw new Error('tagIds cannot be null or undefined and it must be of type array.'); + } + for (let i1 = 0; i1 < tagIds.length; i1++) { + if (tagIds[i1] !== null && tagIds[i1] !== undefined && typeof tagIds[i1].valueOf() !== 'string') { + throw new Error('tagIds[i1] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -864,19 +802,19 @@ function _getUntaggedImageCount(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -898,7 +836,7 @@ function _getUntaggedImageCount(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -923,49 +861,26 @@ function _getUntaggedImageCount(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get images by id for a given project iteration + * @summary Create a set of image regions. * - * This API will return a set of Images for the specified tags and optionally - * iteration. If no iteration is specified the - * current workspace is used. + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} [options] Optional Parameters. + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. * - * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * @param {array} [batch.regions] * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -976,13 +891,15 @@ function _getUntaggedImageCount(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagesByIds(projectId, options, callback) { +function _createImageRegions(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -992,22 +909,16 @@ function _getImagesByIds(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let imageIds = (options && options.imageIds !== undefined) ? options.imageIds : undefined; - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(imageIds)) { - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); - } - } - } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1018,22 +929,13 @@ function _getImagesByIds(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/id'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (imageIds !== null && imageIds !== undefined) { - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); - } - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1048,7 +950,21 @@ function _getImagesByIds(projectId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageRegionCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1087,21 +1003,7 @@ function _getImagesByIds(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImageElementType', - type: { - name: 'Composite', - className: 'Image' - } - } - } - }; + let resultMapper = new client.models['ImageRegionCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1117,21 +1019,14 @@ function _getImagesByIds(projectId, options, callback) { } /** - * @summary Add the provided images to the set of training images - * - * This API accepts body content as multipart/form-data and - * application/octet-stream. When using multipart - * multiple image files can be sent at once, with a maximum of 64 files + * @summary Delete a set of image regions. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {array} regionIds Regions to delete. Limited to 64. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1141,14 +1036,13 @@ function _getImagesByIds(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromData(projectId, imageData, options, callback) { +function _deleteImageRegions(projectId, regionIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1158,21 +1052,21 @@ function _createImagesFromData(projectId, imageData, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } + if (!Array.isArray(regionIds)) { + throw new Error('regionIds cannot be null or undefined and it must be of type array.'); } - if (imageData === null || imageData === undefined) { - throw new Error('imageData cannot be null or undefined and it must be of type object.'); + for (let i = 0; i < regionIds.length; i++) { + if (regionIds[i] !== null && regionIds[i] !== undefined && typeof regionIds[i].valueOf() !== 'string') { + throw new Error('regionIds[i] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1183,23 +1077,22 @@ function _createImagesFromData(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } + queryParameters.push('regionIds=' + encodeURIComponent(regionIds.join(','))); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'multipart/form-data'; + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -1210,19 +1103,14 @@ function _createImagesFromData(projectId, imageData, options, callback) { } } } - // Serialize Request - let formData = {}; - if (imageData !== undefined && imageData !== null) { - formData['imageData'] = imageData; - } - httpRequest.formData = formData; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1247,38 +1135,40 @@ function _createImagesFromData(projectId, imageData, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Delete images from the set of training images + * @summary Get tagged images for a given project iteration. * - * @param {uuid} projectId The project id + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1288,13 +1178,13 @@ function _createImagesFromData(projectId, imageData, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImages(projectId, imageIds, options, callback) { +function _getTaggedImages(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1304,19 +1194,38 @@ function _deleteImages(projectId, imageIds, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(imageIds)) { - throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } } } + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); + } + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -1326,17 +1235,32 @@ function _deleteImages(projectId, imageIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tagged'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1358,7 +1282,7 @@ function _deleteImages(projectId, imageIds, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1383,27 +1307,64 @@ function _deleteImages(projectId, imageIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Add the provided batch of images to the set of training images + * @summary Get untagged images for a given project iteration. * - * This API accepts a batch of files, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * @param {object} [options] Optional Parameters. * - * @param {array} [batch.images] + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [batch.tagIds] + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' * - * @param {object} [options] Optional Parameters. + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1414,14 +1375,13 @@ function _deleteImages(projectId, imageIds, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromFiles(projectId, batch, options, callback) { +function _getUntaggedImages(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1431,29 +1391,62 @@ function _createImagesFromFiles(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } - if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { - throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); } - } catch (error) { - return callback(error); + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } + if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { + throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); + } + } catch (error) { + return callback(error); } // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/files'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/untagged'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1468,21 +1461,7 @@ function _createImagesFromFiles(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageFileCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1521,7 +1500,21 @@ function _createImagesFromFiles(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1537,21 +1530,20 @@ function _createImagesFromFiles(projectId, batch, options, callback) { } /** - * @summary Add the provided images urls to the set of training images - * - * This API accepts a batch of urls, and optionally tags, to create images. - * There is a limit of 64 images and 20 tags. + * @summary Get images by id for a given project iteration. * - * @param {uuid} projectId The project id + * This API will return a set of Images for the specified tags and optionally + * iteration. If no iteration is specified the + * current workspace is used. * - * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * @param {uuid} projectId The project id. * - * @param {array} [batch.images] + * @param {object} [options] Optional Parameters. * - * @param {array} [batch.tagIds] + * @param {array} [options.imageIds] The list of image ids to retrieve. Limited + * to 256. * - * @param {object} [options] Optional Parameters. + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -1562,14 +1554,13 @@ function _createImagesFromFiles(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromUrls(projectId, batch, options, callback) { +function _getImagesByIds(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1579,13 +1570,25 @@ function _createImagesFromUrls(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let imageIds = (options && options.imageIds !== undefined) ? options.imageIds : undefined; + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (Array.isArray(imageIds)) { + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } + } + } + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1596,12 +1599,23 @@ function _createImagesFromUrls(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/urls'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/id'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (imageIds !== null && imageIds !== undefined) { + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + } + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1616,21 +1630,7 @@ function _createImagesFromUrls(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageUrlCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1669,7 +1669,21 @@ function _createImagesFromUrls(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageCreateSummary']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ImageElementType', + type: { + name: 'Composite', + className: 'Image' + } + } + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -1685,22 +1699,21 @@ function _createImagesFromUrls(projectId, batch, options, callback) { } /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id + * @summary Add the provided images to the set of training images. * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch + * This API accepts body content as multipart/form-data and + * application/octet-stream. When using multipart + * multiple image files can be sent at once, with a maximum of 64 files * - * @param {array} [batch.images] + * @param {uuid} projectId The project id. * - * @param {array} [batch.tagIds] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] The tags ids with which to tag each image. + * Limited to 20. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1717,7 +1730,7 @@ function _createImagesFromUrls(projectId, batch, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImagesFromPredictions(projectId, batch, options, callback) { +function _createImagesFromData(projectId, imageData, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1727,13 +1740,24 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } + } + if (imageData === null || imageData === undefined) { + throw new Error('imageData cannot be null or undefined and it must be of type object.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1744,8 +1768,16 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/predictions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -1753,7 +1785,7 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + httpRequest.headers['Content-Type'] = 'multipart/form-data'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -1765,20 +1797,11 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { } } // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageIdCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); + let formData = {}; + if (imageData !== undefined && imageData !== null) { + formData['imageData'] = imageData; } - httpRequest.body = requestContent; + httpRequest.formData = formData; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -1833,13 +1856,12 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { } /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id + * @summary Delete images from the set of training images. * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch + * @param {uuid} projectId The project id. * - * @param {array} [batch.tags] + * @param {array} imageIds Ids of the images to be deleted. Limted to 256 + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -1852,14 +1874,13 @@ function _createImagesFromPredictions(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImageTags(projectId, batch, options, callback) { +function _deleteImages(projectId, imageIds, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -1871,11 +1892,19 @@ function _createImageTags(projectId, batch, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (batch === null || batch === undefined) { - throw new Error('batch cannot be null or undefined.'); + if (!Array.isArray(imageIds)) { + throw new Error('imageIds cannot be null or undefined and it must be of type array.'); + } + for (let i = 0; i < imageIds.length; i++) { + if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { + throw new Error('imageIds[i] must be of type string.'); + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -1886,12 +1915,18 @@ function _createImageTags(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -1906,28 +1941,14 @@ function _createImageTags(projectId, batch, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageTagCreateBatch']().mapper(); - requestModel = client.serialize(requestModelMapper, batch, 'batch'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(batch, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1952,37 +1973,25 @@ function _createImageTags(projectId, batch, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageTagCreateSummary']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Remove a set of tags from a set of images + * @summary Add the provided batch of images to the set of training images. * - * @param {uuid} projectId The project id + * This API accepts a batch of files, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch The batch of image files to add. Limited to 64 images + * and 20 tags per batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -1995,13 +2004,14 @@ function _createImageTags(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { +function _createImagesFromFiles(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2013,24 +2023,14 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(imageIds)) { - throw new Error('imageIds cannot be null or undefined and it must be of type array.'); - } - for (let i = 0; i < imageIds.length; i++) { - if (imageIds[i] !== null && imageIds[i] !== undefined && typeof imageIds[i].valueOf() !== 'string') { - throw new Error('imageIds[i] must be of type string.'); - } - } - if (!Array.isArray(tagIds)) { - throw new Error('tagIds cannot be null or undefined and it must be of type array.'); - } - for (let i1 = 0; i1 < tagIds.length; i1++) { - if (tagIds[i1] !== null && tagIds[i1] !== undefined && typeof tagIds[i1].valueOf() !== 'string') { - throw new Error('tagIds[i1] must be of type string.'); - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2041,18 +2041,13 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/tags'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/files'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - queryParameters.push('imageIds=' + encodeURIComponent(imageIds.join(','))); - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2067,14 +2062,28 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageFileCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2099,24 +2108,42 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ImageCreateSummary']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Create a set of image regions + * @summary Add the provided images urls to the set of training images. * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * This API accepts a batch of urls, and optionally tags, to create images. + * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 + * tags per batch. * - * @param {array} [batch.regions] + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -2130,14 +2157,13 @@ function _deleteImageTags(projectId, imageIds, tagIds, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createImageRegions(projectId, batch, options, callback) { +function _createImagesFromUrls(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2149,6 +2175,9 @@ function _createImageRegions(projectId, batch, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2164,7 +2193,8 @@ function _createImageRegions(projectId, batch, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/urls'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects @@ -2189,7 +2219,7 @@ function _createImageRegions(projectId, batch, options, callback) { let requestModel = null; try { if (batch !== null && batch !== undefined) { - let requestModelMapper = new client.models['ImageRegionCreateBatch']().mapper(); + let requestModelMapper = new client.models['ImageUrlCreateBatch']().mapper(); requestModel = client.serialize(requestModelMapper, batch, 'batch'); requestContent = JSON.stringify(requestModel); } @@ -2237,7 +2267,7 @@ function _createImageRegions(projectId, batch, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImageRegionCreateSummary']().mapper(); + let resultMapper = new client.models['ImageCreateSummary']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2253,11 +2283,19 @@ function _createImageRegions(projectId, batch, options, callback) { } /** - * @summary Delete a set of image regions + * @summary Add the specified predicted images to the set of training images. + * + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. * - * @param {uuid} projectId The project id + * @param {array} [batch.images] * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -2270,13 +2308,14 @@ function _createImageRegions(projectId, batch, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteImageRegions(projectId, regionIds, options, callback) { +function _createImagesFromPredictions(projectId, batch, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2288,16 +2327,14 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (!Array.isArray(regionIds)) { - throw new Error('regionIds cannot be null or undefined and it must be of type array.'); - } - for (let i = 0; i < regionIds.length; i++) { - if (regionIds[i] !== null && regionIds[i] !== undefined && typeof regionIds[i].valueOf() !== 'string') { - throw new Error('regionIds[i] must be of type string.'); - } + if (batch === null || batch === undefined) { + throw new Error('batch cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2308,17 +2345,13 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/regions'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/images/predictions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - queryParameters.push('regionIds=' + encodeURIComponent(regionIds.join(','))); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -2333,14 +2366,28 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (batch !== null && batch !== undefined) { + let requestModelMapper = new client.models['ImageIdCreateBatch']().mapper(); + requestModel = client.serialize(requestModelMapper, batch, 'batch'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(batch, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2365,6 +2412,23 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ImageCreateSummary']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); @@ -2377,9 +2441,9 @@ function _deleteImageRegions(projectId, regionIds, options, callback) { * This API will get region proposals for an image along with confidences for * the region. It returns an empty array if no proposals are found. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} imageId The image id + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -2411,6 +2475,9 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2427,6 +2494,7 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{projectId}/images/{imageId}/regionproposals'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{imageId}', encodeURIComponent(imageId.toString())); @@ -2503,11 +2571,11 @@ function _getImageRegionProposals(projectId, imageId, options, callback) { /** * @summary Delete a set of predicted images and their associated prediction - * results + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -2538,6 +2606,9 @@ function _deletePrediction(projectId, ids, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -2559,6 +2630,7 @@ function _deletePrediction(projectId, ids, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; queryParameters.push('ids=' + encodeURIComponent(ids.join(','))); @@ -2621,34 +2693,21 @@ function _deletePrediction(projectId, ids, options, callback) { } /** - * @summary Get images that were sent to your prediction endpoint - * - * @param {uuid} projectId The project id - * - * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags - * - * @param {string} [query.session] - * - * @param {string} [query.continuation] - * - * @param {number} [query.maxCount] - * - * @param {string} [query.orderBy] Possible values include: 'Newest', 'Oldest', - * 'Suggested' - * - * @param {array} [query.tags] - * - * @param {uuid} [query.iterationId] + * @summary Quick test an image url. * - * @param {date} [query.startTime] + * @param {uuid} projectId The project to evaluate against. * - * @param {date} [query.endTime] + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {string} [query.application] + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2659,13 +2718,13 @@ function _deletePrediction(projectId, ids, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link PredictionQueryResult} for more information. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _queryPredictions(projectId, query, options, callback) { +function _quickTestImageUrl(projectId, imageUrl, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2675,13 +2734,20 @@ function _queryPredictions(projectId, query, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (query === null || query === undefined) { - throw new Error('query cannot be null or undefined.'); + if (imageUrl === null || imageUrl === undefined) { + throw new Error('imageUrl cannot be null or undefined.'); + } + if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { + throw new Error('iterationId must be of type string and must be a valid uuid.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2692,8 +2758,16 @@ function _queryPredictions(projectId, query, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions/query'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/url'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let queryParameters = []; + if (iterationId !== null && iterationId !== undefined) { + queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -2716,14 +2790,14 @@ function _queryPredictions(projectId, query, options, callback) { let requestContent = null; let requestModel = null; try { - if (query !== null && query !== undefined) { - let requestModelMapper = new client.models['PredictionQueryToken']().mapper(); - requestModel = client.serialize(requestModelMapper, query, 'query'); + if (imageUrl !== null && imageUrl !== undefined) { + let requestModelMapper = new client.models['ImageUrl']().mapper(); + requestModel = client.serialize(requestModelMapper, imageUrl, 'imageUrl'); requestContent = JSON.stringify(requestModel); } } catch (error) { let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(query, null, 2)}.`); + `payload - ${JSON.stringify(imageUrl, null, 2)}.`); return callback(serializationError); } httpRequest.body = requestContent; @@ -2765,7 +2839,7 @@ function _queryPredictions(projectId, query, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['PredictionQueryResult']().mapper(); + let resultMapper = new client.models['ImagePrediction']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -2781,14 +2855,11 @@ function _queryPredictions(projectId, query, options, callback) { } /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Quick test an image. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The project id. * - * @param {string} [imageUrl.url] + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * @@ -2812,7 +2883,7 @@ function _queryPredictions(projectId, query, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _quickTestImageUrl(projectId, imageUrl, options, callback) { +function _quickTestImage(projectId, imageData, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2825,15 +2896,18 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (imageUrl === null || imageUrl === undefined) { - throw new Error('imageUrl cannot be null or undefined.'); - } if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { throw new Error('iterationId must be of type string and must be a valid uuid.'); } + if (imageData === null || imageData === undefined) { + throw new Error('imageData cannot be null or undefined and it must be of type object.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -2843,7 +2917,8 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/url'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/image'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -2859,7 +2934,7 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + httpRequest.headers['Content-Type'] = 'multipart/form-data'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -2871,20 +2946,11 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { } } // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (imageUrl !== null && imageUrl !== undefined) { - let requestModelMapper = new client.models['ImageUrl']().mapper(); - requestModel = client.serialize(requestModelMapper, imageUrl, 'imageUrl'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(imageUrl, null, 2)}.`); - return callback(serializationError); + let formData = {}; + if (imageData !== undefined && imageData !== null) { + formData['imageData'] = imageData; } - httpRequest.body = requestContent; + httpRequest.formData = formData; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -2939,17 +3005,33 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { } /** - * @summary Quick test an image + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} query Parameters used to query the predictions. Limited to + * combining 2 tags. * - * @param {object} [options] Optional Parameters. + * @param {string} [query.session] * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {string} [query.continuation] + * + * @param {number} [query.maxCount] + * + * @param {string} [query.orderBy] Possible values include: 'Newest', 'Oldest', + * 'Suggested' + * + * @param {array} [query.tags] + * + * @param {uuid} [query.iterationId] + * + * @param {date} [query.startTime] + * + * @param {date} [query.endTime] + * + * @param {string} [query.application] + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2961,13 +3043,13 @@ function _quickTestImageUrl(projectId, imageUrl, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * See {@link PredictionQueryResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _quickTestImage(projectId, imageData, options, callback) { +function _queryPredictions(projectId, query, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -2977,17 +3059,16 @@ function _quickTestImage(projectId, imageData, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId !== null && iterationId !== undefined && !(typeof iterationId.valueOf() === 'string' && msRest.isValidUuid(iterationId))) { - throw new Error('iterationId must be of type string and must be a valid uuid.'); - } - if (imageData === null || imageData === undefined) { - throw new Error('imageData cannot be null or undefined and it must be of type object.'); + if (query === null || query === undefined) { + throw new Error('query cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -2998,15 +3079,9 @@ function _quickTestImage(projectId, imageData, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/quicktest/image'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/predictions/query'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - let queryParameters = []; - if (iterationId !== null && iterationId !== undefined) { - queryParameters.push('iterationId=' + encodeURIComponent(iterationId.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3014,7 +3089,7 @@ function _quickTestImage(projectId, imageData, options, callback) { httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers - httpRequest.headers['Content-Type'] = 'multipart/form-data'; + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; if (this.apiKey !== undefined && this.apiKey !== null) { httpRequest.headers['Training-Key'] = this.apiKey; } @@ -3026,11 +3101,20 @@ function _quickTestImage(projectId, imageData, options, callback) { } } // Serialize Request - let formData = {}; - if (imageData !== undefined && imageData !== null) { - formData['imageData'] = imageData; + let requestContent = null; + let requestModel = null; + try { + if (query !== null && query !== undefined) { + let requestModelMapper = new client.models['PredictionQueryToken']().mapper(); + requestModel = client.serialize(requestModelMapper, query, 'query'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(query, null, 2)}.`); + return callback(serializationError); } - httpRequest.formData = formData; + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3069,7 +3153,7 @@ function _quickTestImage(projectId, imageData, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['ImagePrediction']().mapper(); + let resultMapper = new client.models['PredictionQueryResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3085,12 +3169,20 @@ function _quickTestImage(projectId, imageData, options, callback) { } /** - * @summary Queues project for training + * @summary Get detailed performance information about an iteration. + * + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3101,13 +3193,13 @@ function _quickTestImage(projectId, imageData, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * See {@link IterationPerformance} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _trainProject(projectId, options, callback) { +function _getIterationPerformance(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3117,11 +3209,25 @@ function _trainProject(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let threshold = (options && options.threshold !== undefined) ? options.threshold : undefined; + let overlapThreshold = (options && options.overlapThreshold !== undefined) ? options.overlapThreshold : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (threshold !== null && threshold !== undefined && typeof threshold !== 'number') { + throw new Error('threshold must be of type number.'); + } + if (overlapThreshold !== null && overlapThreshold !== undefined && typeof overlapThreshold !== 'number') { + throw new Error('overlapThreshold must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3131,12 +3237,24 @@ function _trainProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/train'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); + let queryParameters = []; + if (threshold !== null && threshold !== undefined) { + queryParameters.push('threshold=' + encodeURIComponent(threshold.toString())); + } + if (overlapThreshold !== null && overlapThreshold !== undefined) { + queryParameters.push('overlapThreshold=' + encodeURIComponent(overlapThreshold.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3190,7 +3308,7 @@ function _trainProject(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Iteration']().mapper(); + let resultMapper = new client.models['IterationPerformance']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3206,10 +3324,34 @@ function _trainProject(projectId, options, callback) { } /** - * @summary Get your projects + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. + * + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3225,7 +3367,7 @@ function _trainProject(projectId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getProjects(options, callback) { +function _getImagePerformances(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3235,8 +3377,37 @@ function _getProjects(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; + let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; + let take = (options && options.take !== undefined) ? options.take : 50; + let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } + if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { + throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + } + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } + } + if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { + throw new Error('orderBy must be of type string.'); + } + if (take !== null && take !== undefined && typeof take !== 'number') { + throw new Error('take must be of type number.'); + } + if (skip !== null && skip !== undefined && typeof skip !== 'number') { + throw new Error('skip must be of type number.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3246,7 +3417,26 @@ function _getProjects(options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); + let queryParameters = []; + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); + } + if (orderBy !== null && orderBy !== undefined) { + queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); + } + if (take !== null && take !== undefined) { + queryParameters.push('take=' + encodeURIComponent(take.toString())); + } + if (skip !== null && skip !== undefined) { + queryParameters.push('skip=' + encodeURIComponent(skip.toString())); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3311,10 +3501,10 @@ function _getProjects(options, callback) { name: 'Sequence', element: { required: false, - serializedName: 'ProjectElementType', + serializedName: 'ImagePerformanceElementType', type: { name: 'Composite', - className: 'Project' + className: 'ImagePerformance' } } } @@ -3334,19 +3524,22 @@ function _getProjects(options, callback) { } /** - * @summary Create a project + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. * - * @param {string} name Name of the project + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {object} [options] Optional Parameters. + * @param {uuid} projectId The project id. * - * @param {string} [options.description] The description of the project + * @param {uuid} iterationId The iteration id. Defaults to workspace. * - * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * @param {object} [options] Optional Parameters. * - * @param {string} [options.classificationType] The type of classifier to - * create for this project. Possible values include: 'Multiclass', 'Multilabel' + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3357,14 +3550,13 @@ function _getProjects(options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Project} for more information. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _createProject(name, options, callback) { +function _getImagePerformanceCount(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3374,22 +3566,24 @@ function _createProject(name, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let description = (options && options.description !== undefined) ? options.description : undefined; - let domainId = (options && options.domainId !== undefined) ? options.domainId : undefined; - let classificationType = (options && options.classificationType !== undefined) ? options.classificationType : undefined; + let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { - if (name === null || name === undefined || typeof name.valueOf() !== 'string') { - throw new Error('name cannot be null or undefined and it must be of type string.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); } - if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { - throw new Error('description must be of type string.'); + if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { + throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (domainId !== null && domainId !== undefined && !(typeof domainId.valueOf() === 'string' && msRest.isValidUuid(domainId))) { - throw new Error('domainId must be of type string and must be a valid uuid.'); + if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { + throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (classificationType !== null && classificationType !== undefined && typeof classificationType.valueOf() !== 'string') { - throw new Error('classificationType must be of type string.'); + if (Array.isArray(tagIds)) { + for (let i = 0; i < tagIds.length; i++) { + if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { + throw new Error('tagIds[i] must be of type string.'); + } + } } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3400,17 +3594,13 @@ function _createProject(name, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images/count'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); let queryParameters = []; - queryParameters.push('name=' + encodeURIComponent(name)); - if (description !== null && description !== undefined) { - queryParameters.push('description=' + encodeURIComponent(description)); - } - if (domainId !== null && domainId !== undefined) { - queryParameters.push('domainId=' + encodeURIComponent(domainId.toString())); - } - if (classificationType !== null && classificationType !== undefined) { - queryParameters.push('classificationType=' + encodeURIComponent(classificationType)); + if (tagIds !== null && tagIds !== undefined) { + queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -3418,7 +3608,7 @@ function _createProject(name, options, callback) { // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'POST'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3472,7 +3662,13 @@ function _createProject(name, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Project']().mapper(); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Number' + } + }; result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3488,9 +3684,7 @@ function _createProject(name, options, callback) { } /** - * @summary Get a specific project - * - * @param {uuid} projectId The id of the project to get + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -3503,14 +3697,13 @@ function _createProject(name, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Project} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getProject(projectId, options, callback) { +function _getProjects(options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3522,8 +3715,8 @@ function _getProject(projectId, options, callback) { } // Validate try { - if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { - throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3534,8 +3727,8 @@ function _getProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; - requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); // Create HTTP transport objects let httpRequest = new WebResource(); @@ -3593,8 +3786,22 @@ function _getProject(projectId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Project']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ProjectElementType', + type: { + name: 'Composite', + className: 'Project' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); @@ -3609,12 +3816,20 @@ function _getProject(projectId, options, callback) { } /** - * @summary Delete a specific project + * @summary Create a project. * - * @param {uuid} projectId The project id + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.description] The description of the project. + * + * @param {uuid} [options.domainId] The id of the domain to use for this + * project. Defaults to General. + * + * @param {string} [options.classificationType] The type of classifier to + * create for this project. Possible values include: 'Multiclass', 'Multilabel' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3624,13 +3839,14 @@ function _getProject(projectId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Project} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteProject(projectId, options, callback) { +function _createProject(name, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3640,10 +3856,25 @@ function _deleteProject(projectId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let description = (options && options.description !== undefined) ? options.description : undefined; + let domainId = (options && options.domainId !== undefined) ? options.domainId : undefined; + let classificationType = (options && options.classificationType !== undefined) ? options.classificationType : undefined; // Validate try { - if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { - throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } + if (name === null || name === undefined || typeof name.valueOf() !== 'string') { + throw new Error('name cannot be null or undefined and it must be of type string.'); + } + if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { + throw new Error('description must be of type string.'); + } + if (domainId !== null && domainId !== undefined && !(typeof domainId.valueOf() === 'string' && msRest.isValidUuid(domainId))) { + throw new Error('domainId must be of type string and must be a valid uuid.'); + } + if (classificationType !== null && classificationType !== undefined && typeof classificationType.valueOf() !== 'string') { + throw new Error('classificationType must be of type string.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -3654,12 +3885,26 @@ function _deleteProject(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; - requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); + let queryParameters = []; + queryParameters.push('name=' + encodeURIComponent(name)); + if (description !== null && description !== undefined) { + queryParameters.push('description=' + encodeURIComponent(description)); + } + if (domainId !== null && domainId !== undefined) { + queryParameters.push('domainId=' + encodeURIComponent(domainId.toString())); + } + if (classificationType !== null && classificationType !== undefined) { + queryParameters.push('classificationType=' + encodeURIComponent(classificationType)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3681,7 +3926,7 @@ function _deleteProject(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3706,31 +3951,32 @@ function _deleteProject(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['Project']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Update a specific project - * - * @param {uuid} projectId The id of the project to update - * - * @param {object} updatedProject The updated project model - * - * @param {string} [updatedProject.name] Gets or sets the name of the project - * - * @param {string} [updatedProject.description] Gets or sets the description of - * the project - * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @summary Get a specific project. * - * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project - * - * @param {string} [updatedProject.settings.classificationType] Gets or sets - * the classification type of the project. Possible values include: - * 'Multiclass', 'Multilabel' + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -3750,7 +3996,7 @@ function _deleteProject(projectId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateProject(projectId, updatedProject, options, callback) { +function _getProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3762,12 +4008,12 @@ function _updateProject(projectId, updatedProject, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (updatedProject === null || updatedProject === undefined) { - throw new Error('updatedProject cannot be null or undefined.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -3778,11 +4024,12 @@ function _updateProject(projectId, updatedProject, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3797,21 +4044,7 @@ function _updateProject(projectId, updatedProject, options, callback) { } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (updatedProject !== null && updatedProject !== undefined) { - let requestModelMapper = new client.models['Project']().mapper(); - requestModel = client.serialize(requestModelMapper, updatedProject, 'updatedProject'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(updatedProject, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -3866,9 +4099,9 @@ function _updateProject(projectId, updatedProject, options, callback) { } /** - * @summary Get iterations for the project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -3881,13 +4114,13 @@ function _updateProject(projectId, updatedProject, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIterations(projectId, options, callback) { +function _deleteProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -3899,6 +4132,9 @@ function _getIterations(projectId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -3911,12 +4147,13 @@ function _getIterations(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3938,7 +4175,7 @@ function _getIterations(projectId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3963,48 +4200,31 @@ function _getIterations(projectId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'IterationElementType', - type: { - name: 'Composite', - className: 'Iteration' - } - } - } - }; - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get a specific iteration + * @summary Update a specific project. + * + * @param {uuid} projectId The id of the project to update. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {object} updatedProject The updated project model. * - * @param {uuid} iterationId The id of the iteration to get + * @param {string} [updatedProject.name] Gets or sets the name of the project. + * + * @param {string} [updatedProject.description] Gets or sets the description of + * the project. + * + * @param {object} [updatedProject.settings] Gets or sets the project settings. + * + * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the + * Domain to use with this project. + * + * @param {string} [updatedProject.settings.classificationType] Gets or sets + * the classification type of the project. Possible values include: + * 'Multiclass', 'Multilabel' * * @param {object} [options] Optional Parameters. * @@ -4018,13 +4238,13 @@ function _getIterations(projectId, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * See {@link Project} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIteration(projectId, iterationId, options, callback) { +function _updateProject(projectId, updatedProject, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4036,11 +4256,14 @@ function _getIteration(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); + if (updatedProject === null || updatedProject === undefined) { + throw new Error('updatedProject cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -4051,13 +4274,13 @@ function _getIteration(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4072,7 +4295,21 @@ function _getIteration(projectId, iterationId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (updatedProject !== null && updatedProject !== undefined) { + let requestModelMapper = new client.models['Project']().mapper(); + requestModel = client.serialize(requestModelMapper, updatedProject, 'updatedProject'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(updatedProject, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4111,7 +4348,7 @@ function _getIteration(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Iteration']().mapper(); + let resultMapper = new client.models['Project']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4127,11 +4364,9 @@ function _getIteration(projectId, iterationId, options, callback) { } /** - * @summary Delete a specific iteration of a project - * - * @param {uuid} projectId The project id + * @summary Get iterations for the project. * - * @param {uuid} iterationId The iteration id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -4144,13 +4379,13 @@ function _getIteration(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _deleteIteration(projectId, iterationId, options, callback) { +function _getIterations(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4162,12 +4397,12 @@ function _deleteIteration(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4177,13 +4412,13 @@ function _deleteIteration(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'DELETE'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4205,7 +4440,7 @@ function _deleteIteration(projectId, iterationId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204) { + if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -4230,25 +4465,48 @@ function _deleteIteration(projectId, iterationId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = { + required: false, + serializedName: 'parsedResponse', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IterationElementType', + type: { + name: 'Composite', + className: 'Iteration' + } + } + } + }; + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } return callback(null, result, httpRequest, response); }); } /** - * @summary Update a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId Iteration id - * - * @param {object} updatedIteration The updated iteration model - * - * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration - * - * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -4268,7 +4526,7 @@ function _deleteIteration(projectId, iterationId, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _updateIteration(projectId, iterationId, updatedIteration, options, callback) { +function _getIteration(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4280,15 +4538,15 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (updatedIteration === null || updatedIteration === undefined) { - throw new Error('updatedIteration cannot be null or undefined.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4299,12 +4557,13 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'PATCH'; + httpRequest.method = 'GET'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4319,21 +4578,7 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } } } - // Serialize Request - let requestContent = null; - let requestModel = null; - try { - if (updatedIteration !== null && updatedIteration !== undefined) { - let requestModelMapper = new client.models['Iteration']().mapper(); - requestModel = client.serialize(requestModelMapper, updatedIteration, 'updatedIteration'); - requestContent = JSON.stringify(requestModel); - } - } catch (error) { - let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + - `payload - ${JSON.stringify(updatedIteration, null, 2)}.`); - return callback(serializationError); - } - httpRequest.body = requestContent; + httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4388,20 +4633,14 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal } /** - * @summary Get detailed performance information about an iteration + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4411,14 +4650,13 @@ function _updateIteration(projectId, iterationId, updatedIteration, options, cal * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getIterationPerformance(projectId, iterationId, options, callback) { +function _deleteIteration(projectId, iterationId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4428,22 +4666,17 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let threshold = (options && options.threshold !== undefined) ? options.threshold : undefined; - let overlapThreshold = (options && options.overlapThreshold !== undefined) ? options.overlapThreshold : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (threshold !== null && threshold !== undefined && typeof threshold !== 'number') { - throw new Error('threshold must be of type number.'); - } - if (overlapThreshold !== null && overlapThreshold !== undefined && typeof overlapThreshold !== 'number') { - throw new Error('overlapThreshold must be of type number.'); - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4453,23 +4686,14 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (threshold !== null && threshold !== undefined) { - queryParameters.push('threshold=' + encodeURIComponent(threshold.toString())); - } - if (overlapThreshold !== null && overlapThreshold !== undefined) { - queryParameters.push('overlapThreshold=' + encodeURIComponent(overlapThreshold.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'DELETE'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4491,7 +4715,7 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -4516,56 +4740,27 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { // Create Result let result = null; if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['IterationPerformance']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } return callback(null, result, httpRequest, response); }); } /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * @summary Update a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} iterationId Iteration id. * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {object} updatedIteration The updated iteration model. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {string} [updatedIteration.name] Gets or sets the name of the + * iteration. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {boolean} [updatedIteration.isDefault] Gets or sets a value + * indicating whether the iteration is the default iteration for the project. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -4576,13 +4771,14 @@ function _getIterationPerformance(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagePerformances(projectId, iterationId, options, callback) { +function _updateIteration(projectId, iterationId, updatedIteration, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4592,33 +4788,19 @@ function _getImagePerformances(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; - let orderBy = (options && options.orderBy !== undefined) ? options.orderBy : undefined; - let take = (options && options.take !== undefined) ? options.take : 50; - let skip = (options && options.skip !== undefined) ? options.skip : 0; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } - } - if (orderBy !== null && orderBy !== undefined && typeof orderBy.valueOf() !== 'string') { - throw new Error('orderBy must be of type string.'); - } - if (take !== null && take !== undefined && typeof take !== 'number') { - throw new Error('take must be of type number.'); - } - if (skip !== null && skip !== undefined && typeof skip !== 'number') { - throw new Error('skip must be of type number.'); + if (updatedIteration === null || updatedIteration === undefined) { + throw new Error('updatedIteration cannot be null or undefined.'); } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); @@ -4629,29 +4811,14 @@ function _getImagePerformances(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (orderBy !== null && orderBy !== undefined) { - queryParameters.push('orderBy=' + encodeURIComponent(orderBy)); - } - if (take !== null && take !== undefined) { - queryParameters.push('take=' + encodeURIComponent(take.toString())); - } - if (skip !== null && skip !== undefined) { - queryParameters.push('skip=' + encodeURIComponent(skip.toString())); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'PATCH'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4666,7 +4833,21 @@ function _getImagePerformances(projectId, iterationId, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (updatedIteration !== null && updatedIteration !== undefined) { + let requestModelMapper = new client.models['Iteration']().mapper(); + requestModel = client.serialize(requestModelMapper, updatedIteration, 'updatedIteration'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(updatedIteration, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { @@ -4705,21 +4886,7 @@ function _getImagePerformances(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'ImagePerformanceElementType', - type: { - name: 'Composite', - className: 'ImagePerformance' - } - } - } - }; + let resultMapper = new client.models['Iteration']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4735,23 +4902,12 @@ function _getImagePerformances(projectId, iterationId, options, callback) { } /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id + * @summary Queues project for training. * - * @param {uuid} iterationId The iteration id. Defaults to workspace + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4761,13 +4917,14 @@ function _getImagePerformances(projectId, iterationId, options, callback) { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getImagePerformanceCount(projectId, iterationId, options, callback) { +function _trainProject(projectId, options, callback) { /* jshint validthis: true */ let client = this; if(!callback && typeof options === 'function') { @@ -4777,22 +4934,14 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let tagIds = (options && options.tagIds !== undefined) ? options.tagIds : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } - if (iterationId === null || iterationId === undefined || typeof iterationId.valueOf() !== 'string' || !msRest.isValidUuid(iterationId)) { - throw new Error('iterationId cannot be null or undefined and it must be of type string and must be a valid uuid.'); - } - if (Array.isArray(tagIds)) { - for (let i = 0; i < tagIds.length; i++) { - if (tagIds[i] !== null && tagIds[i] !== undefined && typeof tagIds[i].valueOf() !== 'string') { - throw new Error('tagIds[i] must be of type string.'); - } - } - } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -4802,20 +4951,13 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/performance/images/count'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/train'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); - requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); - let queryParameters = []; - if (tagIds !== null && tagIds !== undefined) { - queryParameters.push('tagIds=' + encodeURIComponent(tagIds.join(','))); - } - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -4869,13 +5011,7 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = { - required: false, - serializedName: 'parsedResponse', - type: { - name: 'Number' - } - }; + let resultMapper = new client.models['Iteration']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -4891,11 +5027,11 @@ function _getImagePerformanceCount(projectId, iterationId, options, callback) { } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -4926,6 +5062,9 @@ function _getExports(projectId, iterationId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -4942,6 +5081,7 @@ function _getExports(projectId, iterationId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/export'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); @@ -5031,19 +5171,19 @@ function _getExports(projectId, iterationId, options, callback) { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5074,6 +5214,9 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { let flavor = (options && options.flavor !== undefined) ? options.flavor : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5096,6 +5239,7 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/iterations/{iterationId}/export'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{iterationId}', encodeURIComponent(iterationId.toString())); let queryParameters = []; @@ -5179,16 +5323,16 @@ function _exportIteration(projectId, iterationId, platform, options, callback) { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5219,6 +5363,9 @@ function _getTag(projectId, tagId, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5238,6 +5385,7 @@ function _getTag(projectId, tagId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); let queryParameters = []; @@ -5320,11 +5468,11 @@ function _getTag(projectId, tagId, options, callback) { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -5355,6 +5503,9 @@ function _deleteTag(projectId, tagId, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5371,6 +5522,7 @@ function _deleteTag(projectId, tagId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); @@ -5429,18 +5581,21 @@ function _deleteTag(projectId, tagId, options, callback) { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -5472,6 +5627,9 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { } // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5491,6 +5649,7 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags/{tagId}'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); requestUrl = requestUrl.replace('{tagId}', encodeURIComponent(tagId.toString())); @@ -5580,13 +5739,13 @@ function _updateTag(projectId, tagId, updatedTag, options, callback) { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5616,6 +5775,9 @@ function _getTags(projectId, options, callback) { let iterationId = (options && options.iterationId !== undefined) ? options.iterationId : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5632,6 +5794,7 @@ function _getTags(projectId, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; if (iterationId !== null && iterationId !== undefined) { @@ -5727,15 +5890,18 @@ function _getTags(projectId, options, callback) { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -5764,8 +5930,12 @@ function _createTag(projectId, name, options, callback) { throw new Error('callback cannot be null.'); } let description = (options && options.description !== undefined) ? options.description : undefined; + let type = (options && options.type !== undefined) ? options.type : undefined; // Validate try { + if (this.endpoint === null || this.endpoint === undefined || typeof this.endpoint.valueOf() !== 'string') { + throw new Error('this.endpoint cannot be null or undefined and it must be of type string.'); + } if (projectId === null || projectId === undefined || typeof projectId.valueOf() !== 'string' || !msRest.isValidUuid(projectId)) { throw new Error('projectId cannot be null or undefined and it must be of type string and must be a valid uuid.'); } @@ -5775,6 +5945,9 @@ function _createTag(projectId, name, options, callback) { if (description !== null && description !== undefined && typeof description.valueOf() !== 'string') { throw new Error('description must be of type string.'); } + if (type !== null && type !== undefined && typeof type.valueOf() !== 'string') { + throw new Error('type must be of type string.'); + } if (this.apiKey === null || this.apiKey === undefined || typeof this.apiKey.valueOf() !== 'string') { throw new Error('this.apiKey cannot be null or undefined and it must be of type string.'); } @@ -5785,12 +5958,16 @@ function _createTag(projectId, name, options, callback) { // Construct URL let baseUrl = this.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'projects/{projectId}/tags'; + requestUrl = requestUrl.replace('{Endpoint}', this.endpoint); requestUrl = requestUrl.replace('{projectId}', encodeURIComponent(projectId.toString())); let queryParameters = []; queryParameters.push('name=' + encodeURIComponent(name)); if (description !== null && description !== undefined) { queryParameters.push('description=' + encodeURIComponent(description)); } + if (type !== null && type !== undefined) { + queryParameters.push('type=' + encodeURIComponent(type)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -5871,53 +6048,56 @@ class TrainingAPIClient extends ServiceClient { /** * Create a TrainingAPIClient. * @param {string} apiKey - - * @param {string} [baseUri] - The base URI of the service. + * @param {string} endpoint - Supported Cognitive Services endpoints * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy */ - constructor(apiKey, baseUri, options) { + constructor(apiKey, endpoint, options) { if (apiKey === null || apiKey === undefined) { throw new Error('\'apiKey\' cannot be null.'); } + if (endpoint === null || endpoint === undefined) { + throw new Error('\'endpoint\' cannot be null.'); + } if (!options) options = {}; super(null, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://southcentralus.api.cognitive.microsoft.com/customvision/v2.1/Training'; - } + this.baseUri = '{Endpoint}/customvision/v2.2/Training'; this.apiKey = apiKey; + this.endpoint = endpoint; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); this.models = models; this._getDomains = _getDomains; this._getDomain = _getDomain; - this._getTaggedImages = _getTaggedImages; - this._getUntaggedImages = _getUntaggedImages; this._getTaggedImageCount = _getTaggedImageCount; this._getUntaggedImageCount = _getUntaggedImageCount; + this._createImageTags = _createImageTags; + this._deleteImageTags = _deleteImageTags; + this._createImageRegions = _createImageRegions; + this._deleteImageRegions = _deleteImageRegions; + this._getTaggedImages = _getTaggedImages; + this._getUntaggedImages = _getUntaggedImages; this._getImagesByIds = _getImagesByIds; this._createImagesFromData = _createImagesFromData; this._deleteImages = _deleteImages; this._createImagesFromFiles = _createImagesFromFiles; this._createImagesFromUrls = _createImagesFromUrls; this._createImagesFromPredictions = _createImagesFromPredictions; - this._createImageTags = _createImageTags; - this._deleteImageTags = _deleteImageTags; - this._createImageRegions = _createImageRegions; - this._deleteImageRegions = _deleteImageRegions; this._getImageRegionProposals = _getImageRegionProposals; this._deletePrediction = _deletePrediction; - this._queryPredictions = _queryPredictions; this._quickTestImageUrl = _quickTestImageUrl; this._quickTestImage = _quickTestImage; - this._trainProject = _trainProject; + this._queryPredictions = _queryPredictions; + this._getIterationPerformance = _getIterationPerformance; + this._getImagePerformances = _getImagePerformances; + this._getImagePerformanceCount = _getImagePerformanceCount; this._getProjects = _getProjects; this._createProject = _createProject; this._getProject = _getProject; @@ -5927,9 +6107,7 @@ class TrainingAPIClient extends ServiceClient { this._getIteration = _getIteration; this._deleteIteration = _deleteIteration; this._updateIteration = _updateIteration; - this._getIterationPerformance = _getIterationPerformance; - this._getImagePerformances = _getImagePerformances; - this._getImagePerformanceCount = _getImagePerformanceCount; + this._trainProject = _trainProject; this._getExports = _getExports; this._exportIteration = _exportIteration; this._getTag = _getTag; @@ -5941,7 +6119,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -5969,7 +6147,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a list of the available domains + * @summary Get a list of the available domains. * * @param {object} [options] Optional Parameters. * @@ -6018,9 +6196,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -6048,9 +6226,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific domain + * @summary Get information about a specific domain. * - * @param {uuid} domainId The id of the domain to get information about + * @param {uuid} domainId The id of the domain to get information about. * * @param {object} [options] Optional Parameters. * @@ -6100,48 +6278,35 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getTaggedImagesWithHttpOperationResponse(projectId, options) { + getTaggedImageCountWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getTaggedImages(projectId, options, (err, result, request, response) => { + self._getTaggedImageCount(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6152,33 +6317,113 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get tagged images for a given project iteration + * @summary Gets the number of images tagged with the provided {tagIds}. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @param {function} [optionalCallback] - The optional callback. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {Number} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {number} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getTaggedImageCount(projectId, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getTaggedImageCount(projectId, options, optionalCallback); + } + } + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getUntaggedImageCountWithHttpOperationResponse(projectId, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Gets the number of untagged images. + * + * This API returns the images which have no tags for a given project and + * optionally an iteration. If no iteration is specified the + * current workspace is used. + * + * @param {uuid} projectId The project id. + * + * @param {object} [options] Optional Parameters. + * + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6190,7 +6435,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6198,13 +6443,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImages(projectId, options, optionalCallback) { + getUntaggedImageCount(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6213,54 +6458,133 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getTaggedImages(projectId, options, (err, result, request, response) => { + self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getTaggedImages(projectId, options, optionalCallback); + return self._getUntaggedImageCount(projectId, options, optionalCallback); } } /** - * @summary Get untagged images for a given project iteration + * @summary Associate a set of images with a set of tags. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {Promise} A promise is returned * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @reject {Error} - The error object. + */ + createImageTagsWithHttpOperationResponse(projectId, batch, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createImageTags(projectId, batch, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Associate a set of images with a set of tags. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image tags. Limited to 128 tags per batch. + * + * @param {array} [batch.tags] Image Tag entries to include in this batch. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ImageTagCreateSummary} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageTagCreateSummary} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createImageTags(projectId, batch, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createImageTags(projectId, batch, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createImageTags(projectId, batch, options, optionalCallback); + } + } + + /** + * @summary Remove a set of tags from a set of images. + * + * @param {uuid} projectId The project id. + * + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getUntaggedImagesWithHttpOperationResponse(projectId, options) { + deleteImageTagsWithHttpOperationResponse(projectId, imageIds, tagIds, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getUntaggedImages(projectId, options, (err, result, request, response) => { + self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6271,27 +6595,115 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get untagged images for a given project iteration + * @summary Remove a set of tags from a set of images. * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {array} imageIds Image ids. Limited to 64 images. + * + * @param {array} tagIds Tags to be deleted from the specified images. Limted + * to 20 tags. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 + * {Promise} A promise is returned * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback); + } + } + + /** + * @summary Create a set of image regions. + * + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. + * + * @param {array} [batch.regions] + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createImageRegionsWithHttpOperationResponse(projectId, batch, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create a set of image regions. + * + * This API accepts a batch of image regions, and optionally tags, to update + * existing images with region information. + * There is a limit of 64 entries in the batch. + * + * @param {uuid} projectId The project id. + * + * @param {object} batch Batch of image regions which include a tag and + * bounding box. Limited to 64. + * + * @param {array} [batch.regions] + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6303,7 +6715,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Array} - The deserialized result object. + * @resolve {ImageRegionCreateSummary} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6311,13 +6723,15 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {array} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageRegionCreateSummary} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImages(projectId, options, optionalCallback) { + createImageRegions(projectId, batch, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6326,47 +6740,145 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getUntaggedImages(projectId, options, (err, result, request, response) => { + self._createImageRegions(projectId, batch, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getUntaggedImages(projectId, options, optionalCallback); + return self._createImageRegions(projectId, batch, options, optionalCallback); } } /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Delete a set of image regions. + * + * @param {uuid} projectId The project id. + * + * @param {array} regionIds Regions to delete. Limited to 64. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteImageRegionsWithHttpOperationResponse(projectId, regionIds, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete a set of image regions. + * + * @param {uuid} projectId The project id. + * + * @param {array} regionIds Regions to delete. Limited to 64. + * + * @param {object} [options] Optional Parameters. * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteImageRegions(projectId, regionIds, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteImageRegions(projectId, regionIds, options, optionalCallback); + } + } + + /** + * @summary Get tagged images for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getTaggedImageCountWithHttpOperationResponse(projectId, options) { + getTaggedImagesWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + self._getTaggedImages(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6377,20 +6889,33 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Gets the number of images tagged with the provided {tagIds} + * @summary Get tagged images for a given project iteration. * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * The filtering is on an and/or relationship. For example, if the provided tag * ids are for the "Dog" and * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6402,7 +6927,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Number} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6410,13 +6935,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getTaggedImageCount(projectId, options, optionalCallback) { + getTaggedImages(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6425,44 +6950,54 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getTaggedImageCount(projectId, options, (err, result, request, response) => { + self._getTaggedImages(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getTaggedImageCount(projectId, options, optionalCallback); + return self._getTaggedImages(projectId, options, optionalCallback); } } /** - * @summary Gets the number of untagged images + * @summary Get untagged images for a given project iteration. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getUntaggedImageCountWithHttpOperationResponse(projectId, options) { + getUntaggedImagesWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + self._getUntaggedImages(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -6473,17 +7008,27 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Gets the number of untagged images + * @summary Get untagged images for a given project iteration. * - * This API returns the images which have no tags for a given project and - * optionally an iteration. If no iteration is specified the - * current workspace is used. + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6495,7 +7040,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Number} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -6503,13 +7048,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {number} [result] - The deserialized result object if an error did not occur. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getUntaggedImageCount(projectId, options, optionalCallback) { + getUntaggedImages(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -6518,32 +7063,32 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getUntaggedImageCount(projectId, options, (err, result, request, response) => { + self._getUntaggedImages(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getUntaggedImageCount(projectId, options, optionalCallback); + return self._getUntaggedImages(projectId, options, optionalCallback); } } /** - * @summary Get images by id for a given project iteration + * @summary Get images by id for a given project iteration. * * This API will return a set of Images for the specified tags and optionally * iteration. If no iteration is specified the * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6569,20 +7114,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get images by id for a given project iteration + * @summary Get images by id for a given project iteration. * * This API will return a set of Images for the specified tags and optionally * iteration. If no iteration is specified the * current workspace is used. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * * @param {array} [options.imageIds] The list of image ids to retrieve. Limited - * to 256 + * to 256. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6629,20 +7174,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images to the set of training images + * @summary Add the provided images to the set of training images. * * This API accepts body content as multipart/form-data and * application/octet-stream. When using multipart * multiple image files can be sent at once, with a maximum of 64 files * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * Limited to 20. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6668,20 +7213,20 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images to the set of training images + * @summary Add the provided images to the set of training images. * * This API accepts body content as multipart/form-data and * application/octet-stream. When using multipart * multiple image files can be sent at once, with a maximum of 64 files * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * * @param {array} [options.tagIds] The tags ids with which to tag each image. - * Limited to 20 + * Limited to 20. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -6729,12 +7274,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete images from the set of training images + * @summary Delete images from the set of training images. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -6762,12 +7307,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete images from the set of training images + * @summary Delete images from the set of training images. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {array} imageIds Ids of the images to be deleted. Limted to 256 - * images per batch + * images per batch. * * @param {object} [options] Optional Parameters. * @@ -6816,15 +7361,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided batch of images to the set of training images. * * This API accepts a batch of files, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -6856,15 +7401,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided batch of images to the set of training images + * @summary Add the provided batch of images to the set of training images. * * This API accepts a batch of files, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch The batch of image files to add. Limited to 64 images - * and 20 tags per batch + * and 20 tags per batch. * * @param {array} [batch.images] * @@ -6918,15 +7463,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images urls to the set of training images + * @summary Add the provided images urls to the set of training images. * * This API accepts a batch of urls, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * tags per batch. * * @param {array} [batch.images] * @@ -6958,15 +7503,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Add the provided images urls to the set of training images + * @summary Add the provided images urls to the set of training images. * * This API accepts a batch of urls, and optionally tags, to create images. * There is a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} batch Image urls and tag ids. Limited to 64 images and 20 - * tags per batch + * tags per batch. * * @param {array} [batch.images] * @@ -7015,211 +7560,24 @@ class TrainingAPIClient extends ServiceClient { }); }); } else { - return self._createImagesFromUrls(projectId, batch, options, optionalCallback); - } - } - - /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch - * - * @param {array} [batch.images] - * - * @param {array} [batch.tagIds] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createImagesFromPredictionsWithHttpOperationResponse(projectId, batch, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Add the specified predicted images to the set of training images - * - * This API creates a batch of images from predicted images specified. There is - * a limit of 64 images and 20 tags. - * - * @param {uuid} projectId The project id - * - * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per - * batch - * - * @param {array} [batch.images] - * - * @param {array} [batch.tagIds] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ImageCreateSummary} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageCreateSummary} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - createImagesFromPredictions(projectId, batch, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createImagesFromPredictions(projectId, batch, options, optionalCallback); - } - } - - /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id - * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch - * - * @param {array} [batch.tags] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - createImageTagsWithHttpOperationResponse(projectId, batch, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._createImageTags(projectId, batch, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Associate a set of images with a set of tags - * - * @param {uuid} projectId The project id - * - * @param {object} batch Batch of image tags. Limited to 128 tags per batch - * - * @param {array} [batch.tags] - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {ImageTagCreateSummary} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageTagCreateSummary} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - createImageTags(projectId, batch, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._createImageTags(projectId, batch, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._createImageTags(projectId, batch, options, optionalCallback); + return self._createImagesFromUrls(projectId, batch, options, optionalCallback); } } /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. * - * @param {uuid} projectId The project id + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {uuid} projectId The project id. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. + * + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -7228,15 +7586,15 @@ class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteImageTagsWithHttpOperationResponse(projectId, imageIds, tagIds, options) { + createImagesFromPredictionsWithHttpOperationResponse(projectId, batch, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7247,14 +7605,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Remove a set of tags from a set of images + * @summary Add the specified predicted images to the set of training images. + * + * This API creates a batch of images from predicted images specified. There is + * a limit of 64 images and 20 tags. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} imageIds Image ids. Limited to 64 images + * @param {object} batch Image and tag ids. Limted to 64 images and 20 tags per + * batch. * - * @param {array} tagIds Tags to be deleted from the specified images. Limted - * to 20 tags + * @param {array} [batch.images] + * + * @param {array} [batch.tagIds] * * @param {object} [options] Optional Parameters. * @@ -7268,7 +7631,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ImageCreateSummary} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7276,13 +7639,14 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImageCreateSummary} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback) { + createImagesFromPredictions(projectId, batch, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7291,30 +7655,27 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageTags(projectId, imageIds, tagIds, options, (err, result, request, response) => { + self._createImagesFromPredictions(projectId, batch, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageTags(projectId, imageIds, tagIds, options, optionalCallback); + return self._createImagesFromPredictions(projectId, batch, options, optionalCallback); } } /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -7323,15 +7684,15 @@ class TrainingAPIClient extends ServiceClient { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createImageRegionsWithHttpOperationResponse(projectId, batch, options) { + getImageRegionProposalsWithHttpOperationResponse(projectId, imageId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7342,18 +7703,15 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a set of image regions - * - * This API accepts a batch of image regions, and optionally tags, to update - * existing images with region information. - * There is a limit of 64 entries in the batch. + * @summary Get region proposals for an image. Returns empty array if no + * proposals are found. * - * @param {uuid} projectId The project id + * This API will get region proposals for an image along with confidences for + * the region. It returns an empty array if no proposals are found. * - * @param {object} batch Batch of image regions which include a tag and - * bounding box. Limited to 64 + * @param {uuid} projectId The project id. * - * @param {array} [batch.regions] + * @param {uuid} imageId The image id. * * @param {object} [options] Optional Parameters. * @@ -7367,7 +7725,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageRegionCreateSummary} - The deserialized result object. + * @resolve {ImageRegionProposal} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7376,14 +7734,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionCreateSummary} for more - * information. + * See {@link ImageRegionProposal} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createImageRegions(projectId, batch, options, optionalCallback) { + getImageRegionProposals(projectId, imageId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7392,23 +7749,24 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createImageRegions(projectId, batch, options, (err, result, request, response) => { + self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createImageRegions(projectId, batch, options, optionalCallback); + return self._getImageRegionProposals(projectId, imageId, options, optionalCallback); } } /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -7421,11 +7779,11 @@ class TrainingAPIClient extends ServiceClient { * * @reject {Error} - The error object. */ - deleteImageRegionsWithHttpOperationResponse(projectId, regionIds, options) { + deletePredictionWithHttpOperationResponse(projectId, ids, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + self._deletePrediction(projectId, ids, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7436,11 +7794,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a set of image regions + * @summary Delete a set of predicted images and their associated prediction + * results. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} regionIds Regions to delete. Limited to 64 + * @param {array} ids The prediction ids. Limited to 64. * * @param {object} [options] Optional Parameters. * @@ -7468,7 +7827,7 @@ class TrainingAPIClient extends ServiceClient { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteImageRegions(projectId, regionIds, options, optionalCallback) { + deletePrediction(projectId, ids, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7477,44 +7836,47 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteImageRegions(projectId, regionIds, options, (err, result, request, response) => { + self._deletePrediction(projectId, ids, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteImageRegions(projectId, regionIds, options, optionalCallback); + return self._deletePrediction(projectId, ids, options, optionalCallback); } } /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getImageRegionProposalsWithHttpOperationResponse(projectId, imageId, options) { + quickTestImageUrlWithHttpOperationResponse(projectId, imageUrl, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { + self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7525,18 +7887,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get region proposals for an image. Returns empty array if no - * proposals are found. + * @summary Quick test an image url. * - * This API will get region proposals for an image along with confidences for - * the region. It returns an empty array if no proposals are found. + * @param {uuid} projectId The project to evaluate against. * - * @param {uuid} projectId The project id + * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the + * url of the image to be evaluated. * - * @param {uuid} imageId The image id + * @param {string} [imageUrl.url] * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7547,7 +7912,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImageRegionProposal} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7556,13 +7921,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImageRegionProposal} for more information. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImageRegionProposals(projectId, imageId, options, optionalCallback) { + quickTestImageUrl(projectId, imageUrl, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7571,41 +7936,44 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImageRegionProposals(projectId, imageId, options, (err, result, request, response) => { + self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImageRegionProposals(projectId, imageId, options, optionalCallback); + return self._quickTestImageUrl(projectId, imageUrl, options, optionalCallback); } } /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deletePredictionWithHttpOperationResponse(projectId, ids, options) { + quickTestImageWithHttpOperationResponse(projectId, imageData, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._deletePrediction(projectId, ids, options, (err, result, request, response) => { + self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7616,15 +7984,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a set of predicted images and their associated prediction - * results + * @summary Quick test an image. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {array} ids The prediction ids. Limited to 64 + * @param {object} imageData Binary image data. * * @param {object} [options] Optional Parameters. * + * @param {uuid} [options.iterationId] Optional. Specifies the id of a + * particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7635,7 +8006,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {ImagePrediction} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7643,13 +8014,14 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ImagePrediction} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deletePrediction(projectId, ids, options, optionalCallback) { + quickTestImage(projectId, imageData, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7658,24 +8030,24 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deletePrediction(projectId, ids, options, (err, result, request, response) => { + self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deletePrediction(projectId, ids, options, optionalCallback); + return self._quickTestImage(projectId, imageData, options, optionalCallback); } } /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -7722,12 +8094,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get images that were sent to your prediction endpoint + * @summary Get images that were sent to your prediction endpoint. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} query Parameters used to query the predictions. Limited to - * combining 2 tags + * combining 2 tags. * * @param {string} [query.session] * @@ -7796,35 +8168,34 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image url + * @summary Get detailed performance information about an iteration. * - * @param {uuid} projectId The project to evaluate against - * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - quickTestImageUrlWithHttpOperationResponse(projectId, imageUrl, options) { + getIterationPerformanceWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { + self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7835,20 +8206,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image url - * - * @param {uuid} projectId The project to evaluate against + * @summary Get detailed performance information about an iteration. * - * @param {object} imageUrl An {Iris.Web.Api.Models.ImageUrl} that contains the - * url of the image to be evaluated + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {string} [imageUrl.url] + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {number} [options.threshold] The threshold used to determine true + * predictions. + * + * @param {number} [options.overlapThreshold] If applicable, the bounding box + * overlap threshold used to determine true predictions. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7860,7 +8230,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {IterationPerformance} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7869,13 +8239,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * See {@link IterationPerformance} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImageUrl(projectId, imageUrl, options, optionalCallback) { + getIterationPerformance(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7884,44 +8254,60 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._quickTestImageUrl(projectId, imageUrl, options, (err, result, request, response) => { + self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._quickTestImageUrl(projectId, imageUrl, options, optionalCallback); + return self._getIterationPerformance(projectId, iterationId, options, optionalCallback); } } /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - quickTestImageWithHttpOperationResponse(projectId, imageData, options) { + getImagePerformancesWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { + self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -7932,17 +8318,33 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Quick test an image + * @summary Get image with its prediction for a given project iteration. + * + * This API supports batching and range selection. By default it will only + * return first 50 images matching images. + * Use the {take} and {skip} parameters to control how many images to return in + * a given batch. + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {object} imageData + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] Optional. Specifies the id of a - * particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * @param {array} [options.tagIds] A list of tags ids to filter the images. + * Defaults to all tagged images when null. Limited to 20. + * + * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible + * values include: 'Newest', 'Oldest' + * + * @param {number} [options.take] Maximum number of images to return. Defaults + * to 50, limited to 256. + * + * @param {number} [options.skip] Number of images to skip before beginning the + * image batch. Defaults to 0. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -7954,7 +8356,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {ImagePrediction} - The deserialized result object. + * @resolve {Array} - The deserialized result object. * * @reject {Error} - The error object. * @@ -7962,14 +8364,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link ImagePrediction} for more information. + * {array} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - quickTestImage(projectId, imageData, options, optionalCallback) { + getImagePerformances(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -7978,38 +8379,49 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._quickTestImage(projectId, imageData, options, (err, result, request, response) => { + self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._quickTestImage(projectId, imageData, options, optionalCallback); + return self._getImagePerformances(projectId, iterationId, options, optionalCallback); } } /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - trainProjectWithHttpOperationResponse(projectId, options) { + getImagePerformanceCountWithHttpOperationResponse(projectId, iterationId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._trainProject(projectId, options, (err, result, request, response) => { + self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -8020,12 +8432,23 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Queues project for training + * @summary Gets the number of images tagged with the provided {tagIds} that + * have prediction results from + * training for the provided iteration {iterationId}. + * + * The filtering is on an and/or relationship. For example, if the provided tag + * ids are for the "Dog" and + * "Cat" tags, then only images tagged with Dog and/or Cat will be returned + * + * @param {uuid} projectId The project id. * - * @param {uuid} projectId The project id + * @param {uuid} iterationId The iteration id. Defaults to workspace. * * @param {object} [options] Optional Parameters. * + * @param {array} [options.tagIds] A list of tags ids to filter the images to + * count. Defaults to all tags when null. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8036,7 +8459,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {Iteration} - The deserialized result object. + * @resolve {Number} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8044,14 +8467,13 @@ class TrainingAPIClient extends ServiceClient { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Iteration} for more information. + * {number} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - trainProject(projectId, options, optionalCallback) { + getImagePerformanceCount(projectId, iterationId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -8060,19 +8482,19 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._trainProject(projectId, options, (err, result, request, response) => { + self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._trainProject(projectId, options, optionalCallback); + return self._getImagePerformanceCount(projectId, iterationId, options, optionalCallback); } } /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -8100,7 +8522,7 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get your projects + * @summary Get your projects. * * @param {object} [options] Optional Parameters. * @@ -8149,16 +8571,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -8187,16 +8609,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a project + * @summary Create a project. * - * @param {string} name Name of the project + * @param {string} name Name of the project. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] The description of the project + * @param {string} [options.description] The description of the project. * * @param {uuid} [options.domainId] The id of the domain to use for this - * project. Defaults to General + * project. Defaults to General. * * @param {string} [options.classificationType] The type of classifier to * create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -8247,9 +8669,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -8277,9 +8699,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific project + * @summary Get a specific project. * - * @param {uuid} projectId The id of the project to get + * @param {uuid} projectId The id of the project to get. * * @param {object} [options] Optional Parameters. * @@ -8329,9 +8751,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8359,9 +8781,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific project + * @summary Delete a specific project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8410,21 +8832,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -8456,21 +8878,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific project + * @summary Update a specific project. * - * @param {uuid} projectId The id of the project to update + * @param {uuid} projectId The id of the project to update. * - * @param {object} updatedProject The updated project model + * @param {object} updatedProject The updated project model. * - * @param {string} [updatedProject.name] Gets or sets the name of the project + * @param {string} [updatedProject.name] Gets or sets the name of the project. * * @param {string} [updatedProject.description] Gets or sets the description of - * the project + * the project. * - * @param {object} [updatedProject.settings] Gets or sets the project settings + * @param {object} [updatedProject.settings] Gets or sets the project settings. * * @param {uuid} [updatedProject.settings.domainId] Gets or sets the id of the - * Domain to use with this project + * Domain to use with this project. * * @param {string} [updatedProject.settings.classificationType] Gets or sets * the classification type of the project. Possible values include: @@ -8524,9 +8946,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8554,9 +8976,9 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get iterations for the project + * @summary Get iterations for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * @@ -8605,11 +9027,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -8637,11 +9059,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get a specific iteration + * @summary Get a specific iteration. * - * @param {uuid} projectId The id of the project the iteration belongs to + * @param {uuid} projectId The id of the project the iteration belongs to. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} iterationId The id of the iteration to get. * * @param {object} [options] Optional Parameters. * @@ -8691,11 +9113,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -8723,11 +9145,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a specific iteration of a project + * @summary Delete a specific iteration of a project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -8776,19 +9198,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -8816,19 +9238,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a specific iteration + * @summary Update a specific iteration. * - * @param {uuid} projectId Project id + * @param {uuid} projectId Project id. * - * @param {uuid} iterationId Iteration id + * @param {uuid} iterationId Iteration id. * - * @param {object} updatedIteration The updated iteration model + * @param {object} updatedIteration The updated iteration model. * * @param {string} [updatedIteration.name] Gets or sets the name of the - * iteration + * iteration. * * @param {boolean} [updatedIteration.isDefault] Gets or sets a value - * indicating whether the iteration is the default iteration for the project + * indicating whether the iteration is the default iteration for the project. * * @param {object} [options] Optional Parameters. * @@ -8878,34 +9300,26 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get detailed performance information about an iteration + * @summary Queues project for training. * - * @param {uuid} projectId The id of the project the iteration belongs to - * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getIterationPerformanceWithHttpOperationResponse(projectId, iterationId, options) { + trainProjectWithHttpOperationResponse(projectId, options) { let client = this; let self = this; return new Promise((resolve, reject) => { - self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { + self._trainProject(projectId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -8916,20 +9330,12 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get detailed performance information about an iteration - * - * @param {uuid} projectId The id of the project the iteration belongs to + * @summary Queues project for training. * - * @param {uuid} iterationId The id of the iteration to get + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {number} [options.threshold] The threshold used to determine true - * predictions - * - * @param {number} [options.overlapThreshold] If applicable, the bounding box - * overlap threshold used to determine true predictions - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8940,7 +9346,7 @@ class TrainingAPIClient extends ServiceClient { * * {Promise} A promise is returned * - * @resolve {IterationPerformance} - The deserialized result object. + * @resolve {Iteration} - The deserialized result object. * * @reject {Error} - The error object. * @@ -8949,241 +9355,13 @@ class TrainingAPIClient extends ServiceClient { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link IterationPerformance} for more information. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getIterationPerformance(projectId, iterationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getIterationPerformance(projectId, iterationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getIterationPerformance(projectId, iterationId, options, optionalCallback); - } - } - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getImagePerformancesWithHttpOperationResponse(projectId, iterationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Get image with its prediction for a given project iteration - * - * This API supports batching and range selection. By default it will only - * return first 50 images matching images. - * Use the {take} and {skip} parameters to control how many images to return in - * a given batch. - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images. - * Defaults to all tagged images when null. Limited to 20 - * - * @param {string} [options.orderBy] The ordering. Defaults to newest. Possible - * values include: 'Newest', 'Oldest' - * - * @param {number} [options.take] Maximum number of images to return. Defaults - * to 50, limited to 256 - * - * @param {number} [options.skip] Number of images to skip before beginning the - * image batch. Defaults to 0 - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {Array} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {array} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ - getImagePerformances(projectId, iterationId, options, optionalCallback) { - let client = this; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._getImagePerformances(projectId, iterationId, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._getImagePerformances(projectId, iterationId, options, optionalCallback); - } - } - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - getImagePerformanceCountWithHttpOperationResponse(projectId, iterationId, options) { - let client = this; - let self = this; - return new Promise((resolve, reject) => { - self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Gets the number of images tagged with the provided {tagIds} that - * have prediction results from - * training for the provided iteration {iterationId} - * - * The filtering is on an and/or relationship. For example, if the provided tag - * ids are for the "Dog" and - * "Cat" tags, then only images tagged with Dog and/or Cat will be returned - * - * @param {uuid} projectId The project id - * - * @param {uuid} iterationId The iteration id. Defaults to workspace - * - * @param {object} [options] Optional Parameters. - * - * @param {array} [options.tagIds] A list of tags ids to filter the images to - * count. Defaults to all tags when null. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {Number} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * - * {number} [result] - The deserialized result object if an error did not occur. + * See {@link Iteration} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getImagePerformanceCount(projectId, iterationId, options, optionalCallback) { + trainProject(projectId, options, optionalCallback) { let client = this; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -9192,23 +9370,23 @@ class TrainingAPIClient extends ServiceClient { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getImagePerformanceCount(projectId, iterationId, options, (err, result, request, response) => { + self._trainProject(projectId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getImagePerformanceCount(projectId, iterationId, options, optionalCallback); + return self._trainProject(projectId, options, optionalCallback); } } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -9236,11 +9414,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the list of exports for a specific iteration + * @summary Get the list of exports for a specific iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * * @param {object} [options] Optional Parameters. * @@ -9289,19 +9467,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9327,19 +9505,19 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Export a trained iteration + * @summary Export a trained iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} iterationId The iteration id + * @param {uuid} iterationId The iteration id. * - * @param {string} platform The target platform (coreml or tensorflow). - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + * @param {string} platform The target platform. Possible values include: + * 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' * * @param {object} [options] Optional Parameters. * - * @param {string} [options.flavor] The flavor of the target platform (Windows, - * Linux, ARM, or GPU). Possible values include: 'Linux', 'Windows' + * @param {string} [options.flavor] The flavor of the target platform. Possible + * values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9387,16 +9565,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9422,16 +9600,16 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get information about a specific tag + * @summary Get information about a specific tag. * - * @param {uuid} projectId The project this tag belongs to + * @param {uuid} projectId The project this tag belongs to. * - * @param {uuid} tagId The tag id + * @param {uuid} tagId The tag id. * * @param {object} [options] Optional Parameters. * * @param {uuid} [options.iterationId] The iteration to retrieve this tag from. - * Optional, defaults to current training set + * Optional, defaults to current training set. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9479,11 +9657,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -9511,11 +9689,11 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Delete a tag from the project + * @summary Delete a tag from the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId Id of the tag to be deleted + * @param {uuid} tagId Id of the tag to be deleted. * * @param {object} [options] Optional Parameters. * @@ -9564,18 +9742,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -9603,18 +9784,21 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Update a tag + * @summary Update a tag. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {uuid} tagId The id of the target tag + * @param {uuid} tagId The id of the target tag. * - * @param {object} updatedTag The updated tag model + * @param {object} updatedTag The updated tag model. * - * @param {string} [updatedTag.name] Gets or sets the name of the tag + * @param {string} [updatedTag.name] Gets or sets the name of the tag. * * @param {string} [updatedTag.description] Gets or sets the description of the - * tag + * tag. + * + * @param {string} [updatedTag.type] Gets or sets the type of the tag. Possible + * values include: 'Regular', 'Negative' * * @param {object} [options] Optional Parameters. * @@ -9664,13 +9848,13 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9696,13 +9880,13 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Get the tags for a given project and iteration + * @summary Get the tags for a given project and iteration. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * * @param {object} [options] Optional Parameters. * - * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace + * @param {uuid} [options.iterationId] The iteration id. Defaults to workspace. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9749,15 +9933,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -9783,15 +9970,18 @@ class TrainingAPIClient extends ServiceClient { } /** - * @summary Create a tag for the project + * @summary Create a tag for the project. * - * @param {uuid} projectId The project id + * @param {uuid} projectId The project id. * - * @param {string} name The tag name + * @param {string} name The tag name. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.description] Optional description for the tag + * @param {string} [options.description] Optional description for the tag. + * + * @param {string} [options.type] Optional type for the tag. Possible values + * include: 'Regular', 'Negative' * * @param {object} [options.customHeaders] Headers that will be added to the * request diff --git a/lib/services/customVision/training/package.json b/lib/services/customVision/training/package.json index ddadee7b65..6b0a02943b 100644 --- a/lib/services/customVision/training/package.json +++ b/lib/services/customVision/training/package.json @@ -2,7 +2,7 @@ "name": "azure-cognitiveservices-customvision-training", "author": "Microsoft Corporation", "description": "TrainingAPIClient Library with typescript type definitions for node", - "version": "1.1.0-preview", + "version": "2.0.0", "dependencies": { "ms-rest": "^2.3.3" }, @@ -13,12 +13,12 @@ "license": "MIT", "main": "./lib/trainingAPIClient.js", "types": "./lib/trainingAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/customVision/training", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}