diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/LICENSE.txt b/sdk/cognitiveservices/cognitiveservices-customvision-training/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/LICENSE.txt +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md b/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md index 542c9ac4aece..acd32cc13d44 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/README.md @@ -17,61 +17,44 @@ npm install @azure/cognitiveservices-customvision-training #### nodejs - Authentication, client creation and getDomains as an example written in TypeScript. +##### Install @azure/ms-rest-nodeauth + +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" +``` + ##### Sample code -The following sample performs a quick test of the given image based on your custom vision training. To know more, refer to the [Azure Documentation on Custom Vision Services](https://docs.microsoft.com/en-us/azure/cognitive-services/custom-vision-service/home). ```typescript -import { - TrainingAPIClient, - TrainingAPIModels -} from "@azure/cognitiveservices-customvision-training"; - -async function main(): Promise { - const customVisionTrainingKey = - process.env["customVisionTrainingKey"] || ""; - const customVisionTrainingEndPoint = - process.env["customVisionTrainingEndPoint"] || - ""; - const projectId = process.env["projectId"] || ""; - const iterationId = process.env["iterationId"] || ""; - - const imageURL = - "https://www.atlantatrails.com/wp-content/uploads/2019/02/north-georgia-waterfalls-1024x683.jpg"; - - const client = new TrainingAPIClient( - customVisionTrainingKey, - customVisionTrainingEndPoint - ); - - const options: TrainingAPIModels.TrainingAPIClientQuickTestImageUrlOptionalParams = { - iterationId: iterationId - }; - - client - .quickTestImageUrl( - projectId, - { - url: imageURL - }, - options - ) - .then(result => { - console.log("The result is: "); - console.log(result); - }) - .catch(err => { - console.log("An error occurred:"); - console.error(err); - }); -} - -main(); +import * as msRest from "@azure/ms-rest-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { TrainingAPIClient, TrainingAPIModels, TrainingAPIMappers } from "@azure/cognitiveservices-customvision-training"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new TrainingAPIClient(creds, subscriptionId); + client.getDomains().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); ``` #### browser - Authentication, client creation and getDomains as an example written in JavaScript. +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + ##### Sample code +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + - index.html ```html @@ -79,51 +62,36 @@ main(); @azure/cognitiveservices-customvision-training sample + - ``` ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-customvision-training%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/cognitiveservices/cognitiveservices-customvision-training/README.png) diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/index.ts b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/index.ts index 1f8808dccf7e..2063ed7169f1 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/index.ts +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/index.ts @@ -10,151 +10,155 @@ import * as msRest from "@azure/ms-rest-js"; /** - * An interface representing Domain. + * Bounding box that defines a region of an image. */ -export interface Domain { - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; +export interface BoundingBox { /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Coordinate of the left boundary. */ - readonly name?: string; + left: number; /** - * Possible values include: 'Classification', 'ObjectDetection' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Coordinate of the top boundary. */ - readonly type?: DomainType; + top: number; /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Width. */ - readonly exportable?: boolean; + width: number; /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Height. */ - readonly enabled?: boolean; + height: number; } /** - * Entry associating a tag to an image. + * An interface representing CustomVisionError. */ -export interface ImageTagCreateEntry { - /** - * Id of the image. - */ - imageId?: string; +export interface CustomVisionError { /** - * Id of the tag. + * The error code. Possible values include: 'NoError', 'BadRequest', + * 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', + * 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', + * 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', + * 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', + * 'BadRequestProjectImagePreprocessingSettings', 'BadRequestProjectDuplicated', + * 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', + * 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', + * 'BadRequestIterationValidationFailed', 'BadRequestWorkspaceCannotBeModified', + * 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', + * 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', + * 'BadRequestImageTags', 'BadRequestImageRegions', 'BadRequestNegativeAndRegularTagOnSameImage', + * 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished', + * 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', + * 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', + * 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', + * 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', + * 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', + * 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', + * 'BadRequestImageUrl', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', + * 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', + * 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', 'BadRequestTrainingValidationFailed', + * 'BadRequestClassificationTrainingValidationFailed', + * 'BadRequestMultiClassClassificationTrainingValidationFailed', + * 'BadRequestMultiLabelClassificationTrainingValidationFailed', + * 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', + * 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', + * 'BadRequestDomainNotSupportedForAdvancedTraining', + * 'BadRequestExportPlatformNotSupportedForAdvancedTraining', + * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', + * 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', + * 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', + * 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', + * 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', + * 'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining', 'BadRequestInvalid', + * 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', 'ForbiddenUserResource', + * 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', + * 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', + * 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', + * 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', + * 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', + * 'NotFoundInvalid', 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorIterationCopyFailed', + * 'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace', + * 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', + * 'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed', + * 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', + * 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', + * 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', + * 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', + * 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', + * 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', + * 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', + * 'ErrorRegionProposal', 'ErrorInvalid' */ - tagId?: string; -} - -/** - * Batch of image tags. - */ -export interface ImageTagCreateBatch { + code: CustomVisionErrorCodes; /** - * Image Tag entries to include in this batch. + * A message explaining the error reported by the service. */ - tags?: ImageTagCreateEntry[]; -} - -/** - * An interface representing ImageTagCreateSummary. - */ -export interface ImageTagCreateSummary { - created?: ImageTagCreateEntry[]; - duplicated?: ImageTagCreateEntry[]; - exceeded?: ImageTagCreateEntry[]; + message: string; } /** - * Entry associating a region to an image. + * An interface representing Domain. */ -export interface ImageRegionCreateEntry { - /** - * Id of the image. - */ - imageId: string; +export interface Domain { /** - * Id of the tag associated with this region. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - tagId: string; + readonly id?: string; /** - * Coordinate of the left boundary. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - left: number; + readonly name?: string; /** - * Coordinate of the top boundary. + * Possible values include: 'Classification', 'ObjectDetection' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top: number; + readonly type?: DomainType; /** - * Width. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - width: number; + readonly exportable?: boolean; /** - * Height. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - height: number; -} - -/** - * Batch of image region information to create. - */ -export interface ImageRegionCreateBatch { - regions?: ImageRegionCreateEntry[]; + readonly enabled?: boolean; } /** - * An interface representing ImageRegionCreateResult. + * An interface representing ExportModel. */ -export interface ImageRegionCreateResult { +export interface ExportModel { /** + * Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', + * 'VAIDK' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly imageId?: string; + readonly platform?: ExportPlatform; /** + * Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly regionId?: string; + readonly status?: ExportStatus; /** + * URI used to download the model. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tagName?: string; + readonly downloadUri?: string; /** + * Flavor of the export. These are specializations of the export platform. + * Docker platform has valid flavors: Linux, Windows, ARM. + * Tensorflow platform has valid flavors: TensorFlowNormal, TensorFlowLite. + * ONNX platform has valid flavors: ONNX10, ONNX12. Possible values include: 'Linux', 'Windows', + * 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly created?: Date; - /** - * Id of the tag associated with this region. - */ - tagId: string; - /** - * Coordinate of the left boundary. - */ - left: number; - /** - * Coordinate of the top boundary. - */ - top: number; - /** - * Width. - */ - width: number; + readonly flavor?: ExportFlavor; /** - * Height. + * Indicates an updated version of the export package is available and should be re-exported for + * the latest changes. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - height: number; -} - -/** - * An interface representing ImageRegionCreateSummary. - */ -export interface ImageRegionCreateSummary { - created?: ImageRegionCreateResult[]; - duplicated?: ImageRegionCreateEntry[]; - exceeded?: ImageRegionCreateEntry[]; + readonly newerVersionAvailable?: boolean; } /** @@ -348,26 +352,6 @@ export interface ImageFileCreateBatch { tagIds?: string[]; } -/** - * An interface representing ImageUrlCreateEntry. - */ -export interface ImageUrlCreateEntry { - /** - * Url of the image. - */ - url: string; - tagIds?: string[]; - regions?: Region[]; -} - -/** - * An interface representing ImageUrlCreateBatch. - */ -export interface ImageUrlCreateBatch { - images?: ImageUrlCreateEntry[]; - tagIds?: string[]; -} - /** * An interface representing ImageIdCreateEntry. */ @@ -389,93 +373,71 @@ export interface ImageIdCreateBatch { } /** - * Bounding box that defines a region of an image. + * Prediction result. */ -export interface BoundingBox { +export interface Prediction { /** - * Coordinate of the left boundary. + * Probability of the tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - left: number; + readonly probability?: number; /** - * Coordinate of the top boundary. + * Id of the predicted tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - top: number; + readonly tagId?: string; /** - * Width. + * Name of the predicted tag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - width: number; + readonly tagName?: string; /** - * Height. + * Bounding box of the prediction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - height: number; + readonly boundingBox?: BoundingBox; } /** - * An interface representing RegionProposal. + * Image performance model. */ -export interface RegionProposal { +export interface ImagePerformance { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly confidence?: number; + readonly predictions?: Prediction[]; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly boundingBox?: BoundingBox; -} - -/** - * An interface representing ImageRegionProposal. - */ -export interface ImageRegionProposal { + readonly id?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly projectId?: string; + readonly created?: Date; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly imageId?: string; + readonly width?: number; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly proposals?: RegionProposal[]; -} - -/** - * Image url. - */ -export interface ImageUrl { + readonly height?: number; /** - * Url of the image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - url: string; -} - -/** - * Prediction result. - */ -export interface Prediction { + readonly imageUri?: string; /** - * Probability of the tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly probability?: number; + readonly thumbnailUri?: string; /** - * Id of the predicted tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tagId?: string; - /** - * Name of the predicted tag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tagName?: string; + readonly tags?: ImageTag[]; /** - * Bounding box of the prediction. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly boundingBox?: BoundingBox; + readonly regions?: ImageRegion[]; } /** @@ -510,104 +472,285 @@ export interface ImagePrediction { } /** - * An interface representing PredictionQueryTag. + * Represents image preprocessing settings used by image augmentation. */ -export interface PredictionQueryTag { +export interface ImageProcessingSettings { + /** + * Gets or sets enabled image transforms. The key corresponds to the transform name. If value is + * set to true, then correspondent transform is enabled. Otherwise this transform will not be + * used. + * Augmentation will be uniformly distributed among enabled transforms. + */ + augmentationMethods?: { [propertyName: string]: boolean }; +} + +/** + * 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; + /** + * Coordinate of the left boundary. + */ + left: number; + /** + * Coordinate of the top boundary. + */ + top: number; + /** + * Width. + */ + width: number; + /** + * Height. + */ + height: number; +} + +/** + * Batch of image region information to create. + */ +export interface ImageRegionCreateBatch { + regions?: ImageRegionCreateEntry[]; +} + +/** + * An interface representing ImageRegionCreateResult. + */ +export interface ImageRegionCreateResult { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly imageId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly minThreshold?: number; + readonly regionId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly maxThreshold?: number; + readonly tagName?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly created?: Date; + /** + * Id of the tag associated with this region. + */ + tagId: string; + /** + * Coordinate of the left boundary. + */ + left: number; + /** + * Coordinate of the top boundary. + */ + top: number; + /** + * Width. + */ + width: number; + /** + * Height. + */ + height: number; } /** - * An interface representing PredictionQueryToken. + * An interface representing ImageRegionCreateSummary. */ -export interface PredictionQueryToken { - session?: string; - continuation?: string; - maxCount?: number; +export interface ImageRegionCreateSummary { + created?: ImageRegionCreateResult[]; + duplicated?: ImageRegionCreateEntry[]; + exceeded?: ImageRegionCreateEntry[]; +} + +/** + * An interface representing RegionProposal. + */ +export interface RegionProposal { /** - * Possible values include: 'Newest', 'Oldest', 'Suggested' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - orderBy?: OrderBy; - tags?: PredictionQueryTag[]; - iterationId?: string; - startTime?: Date; - endTime?: Date; - application?: string; + readonly confidence?: number; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly boundingBox?: BoundingBox; } /** - * result of an image classification request. + * An interface representing ImageRegionProposal. */ -export interface StoredImagePrediction { +export interface ImageRegionProposal { /** - * The URI to the (resized) prediction image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resizedImageUri?: string; + readonly projectId?: string; /** - * The URI to the thumbnail of the original prediction image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly thumbnailUri?: string; + readonly imageId?: string; /** - * The URI to the original prediction image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalImageUri?: string; + readonly proposals?: RegionProposal[]; +} + +/** + * Entry associating a tag to an image. + */ +export interface ImageTagCreateEntry { /** - * Domain used for the prediction. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Id of the image. */ - readonly domain?: string; + imageId?: string; /** - * Prediction Id. + * Id of the tag. + */ + tagId?: string; +} + +/** + * Batch of image tags. + */ +export interface ImageTagCreateBatch { + /** + * Image Tag entries to include in this batch. + */ + tags?: ImageTagCreateEntry[]; +} + +/** + * An interface representing ImageTagCreateSummary. + */ +export interface ImageTagCreateSummary { + created?: ImageTagCreateEntry[]; + duplicated?: ImageTagCreateEntry[]; + exceeded?: ImageTagCreateEntry[]; +} + +/** + * Image url. + */ +export interface ImageUrl { + /** + * Url of the image. + */ + url: string; +} + +/** + * An interface representing ImageUrlCreateEntry. + */ +export interface ImageUrlCreateEntry { + /** + * Url of the image. + */ + url: string; + tagIds?: string[]; + regions?: Region[]; +} + +/** + * An interface representing ImageUrlCreateBatch. + */ +export interface ImageUrlCreateBatch { + images?: ImageUrlCreateEntry[]; + tagIds?: string[]; +} + +/** + * Iteration model to be sent over JSON. + */ +export interface Iteration { + /** + * Gets the id of the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Project Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Gets or sets the name of the iteration. */ - readonly project?: string; + name: string; /** - * Iteration Id. + * Gets the current iteration status. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly iteration?: string; + readonly status?: string; /** - * Date this prediction was created. + * Gets the time this iteration was completed. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** - * List of predictions. + * Gets the time this iteration was last modified. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly predictions?: Prediction[]; -} - -/** - * An interface representing PredictionQueryResult. - */ -export interface PredictionQueryResult { + readonly lastModified?: Date; /** + * Gets the time this iteration was last modified. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly token?: PredictionQueryToken; + readonly trainedAt?: Date; /** + * Gets the project id of the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly results?: StoredImagePrediction[]; + readonly projectId?: string; + /** + * Whether the iteration can be exported to another format for download. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exportable?: boolean; + /** + * A set of platforms this iteration can export to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly exportableTo?: string[]; + /** + * Get or sets a guid of the domain the iteration has been trained on. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly domainId?: string; + /** + * Gets the classification type of the project. Possible values include: 'Multiclass', + * 'Multilabel' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly classificationType?: Classifier; + /** + * Gets the training type of the iteration. Possible values include: 'Regular', 'Advanced' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly trainingType?: TrainingType; + /** + * Gets the reserved advanced training budget for the iteration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservedBudgetInHours?: number; + /** + * Gets the training time for the iteration. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly trainingTimeInMinutes?: number; + /** + * Name of the published model. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publishName?: string; + /** + * Resource Provider Id this iteration was originally published to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly originalPublishResourceId?: string; } /** @@ -686,45 +829,96 @@ export interface IterationPerformance { } /** - * Image performance model. + * An interface representing PredictionQueryTag. */ -export interface ImagePerformance { +export interface PredictionQueryTag { + id?: string; + minThreshold?: number; + maxThreshold?: number; +} + +/** + * An interface representing PredictionQueryToken. + */ +export interface PredictionQueryToken { + session?: string; + continuation?: string; + maxCount?: number; + /** + * Possible values include: 'Newest', 'Oldest', 'Suggested' + */ + orderBy?: OrderBy; + tags?: PredictionQueryTag[]; + iterationId?: string; + startTime?: Date; + endTime?: Date; + application?: string; +} + +/** + * Result of an image prediction request. + */ +export interface StoredImagePrediction { + /** + * The URI to the (resized) prediction image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resizedImageUri?: string; /** + * The URI to the thumbnail of the original prediction image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly predictions?: Prediction[]; + readonly thumbnailUri?: string; /** + * The URI to the original prediction image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly originalImageUri?: string; /** + * Domain used for the prediction. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly created?: Date; + readonly domain?: string; /** + * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly width?: number; + readonly id?: string; /** + * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly height?: number; + readonly project?: string; /** + * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly imageUri?: string; + readonly iteration?: string; /** + * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly thumbnailUri?: string; + readonly created?: Date; /** + * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tags?: ImageTag[]; + readonly predictions?: Prediction[]; +} + +/** + * Query result of the prediction images that were sent to your prediction endpoint. + */ +export interface PredictionQueryResult { + /** + * Prediction Query Token. + */ + token?: PredictionQueryToken; /** + * Result of an prediction request. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly regions?: ImageRegion[]; + readonly results?: StoredImagePrediction[]; } /** @@ -744,6 +938,20 @@ export interface ProjectSettings { * A list of ExportPlatform that the trained model should be able to support. */ targetExportPlatforms?: string[]; + /** + * Indicates if negative set is being used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly useNegativeSet?: boolean; + /** + * Detection parameters in use, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly detectionParameters?: string; + /** + * Gets or sets image preprocessing settings. + */ + imageProcessingSettings?: ImageProcessingSettings; } /** @@ -783,124 +991,206 @@ export interface Project { */ readonly thumbnailUri?: string; /** - * Gets if the DR mode is on. + * Gets if the Disaster Recovery (DR) mode is on, indicating the project is temporarily + * read-only. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly drModeEnabled?: boolean; + /** + * Gets the status of the project. Possible values include: 'Succeeded', 'Importing', 'Failed' + */ + status?: ProjectStatus; } /** - * Iteration model to be sent over JSON. + * Represents information about a project export. */ -export interface Iteration { +export interface ProjectExport { /** - * Gets the id of the iteration. + * Count of iterations that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly iterationCount?: number; /** - * Gets or sets the name of the iteration. + * Count of images that will be exported. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name: string; + readonly imageCount?: number; /** - * Gets the current iteration status. + * Count of tags that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: string; + readonly tagCount?: number; /** - * Gets the time this iteration was completed. + * Count of regions that will be exported. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly regionCount?: number; + /** + * Estimated time this project will take to import, can change based on network connectivity and + * load between + * source and destination regions. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly estimatedImportTimeInMS?: number; + /** + * Opaque token that should be passed to ImportProject to perform the import. This token grants + * access to import this + * project to all that have the token. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly token?: string; +} + +/** + * Result of a suggested tags and regions request of the untagged image. + */ +export interface StoredSuggestedTagAndRegion { + /** + * Width of the resized image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly width?: number; + /** + * Height of the resized image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly height?: number; + /** + * The URI to the (resized) prediction image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resizedImageUri?: string; + /** + * The URI to the thumbnail of the original prediction image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly thumbnailUri?: string; + /** + * The URI to the original prediction image. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly originalImageUri?: string; + /** + * Domain used for the prediction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly domain?: string; + /** + * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly created?: Date; + readonly id?: string; /** - * Gets the time this iteration was last modified. + * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lastModified?: Date; + readonly project?: string; /** - * Gets the time this iteration was last modified. + * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly trainedAt?: Date; + readonly iteration?: string; /** - * Gets the project id of the iteration. + * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly projectId?: string; + readonly created?: Date; /** - * Whether the iteration can be exported to another format for download. + * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exportable?: boolean; + readonly predictions?: Prediction[]; /** - * A set of platforms this iteration can export to. + * Uncertainty (entropy) of suggested tags or regions per image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exportableTo?: string[]; + readonly predictionUncertainty?: number; +} + +/** + * Result of a suggested tags and regions request. + */ +export interface SuggestedTagAndRegion { /** - * Get or sets a guid of the domain the iteration has been trained on. + * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly domainId?: string; + readonly id?: string; /** - * Gets the classification type of the project. Possible values include: 'Multiclass', - * 'Multilabel' + * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly classificationType?: Classifier; + readonly project?: string; /** - * Gets the training type of the iteration. Possible values include: 'Regular', 'Advanced' + * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly trainingType?: TrainingType; + readonly iteration?: string; /** - * Gets the reserved advanced training budget for the iteration. + * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservedBudgetInHours?: number; + readonly created?: Date; /** - * Name of the published model. + * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly publishName?: string; + readonly predictions?: Prediction[]; /** - * Resource Provider Id this iteration was originally published to. + * Uncertainty (entropy) of suggested tags or regions per image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalPublishResourceId?: string; + readonly predictionUncertainty?: number; } /** - * An interface representing ExportModel. + * Contains properties we need to fetch suggested tags for. For the first call, Session and + * continuation set to null. + * Then on subsequent calls, uses the session/continuation from the previous + * SuggestedTagAndRegionQuery result to fetch additional results. */ -export interface ExportModel { +export interface SuggestedTagAndRegionQueryToken { /** - * Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', - * 'VAIDK' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Existing TagIds in project to filter suggested tags on. */ - readonly platform?: ExportPlatform; + tagIds?: string[]; /** - * Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Confidence threshold to filter suggested tags on. */ - readonly status?: ExportStatus; + threshold?: number; /** - * URI used to download the model. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * SessionId for database query. Initially set to null but later used to paginate. */ - readonly downloadUri?: string; + session?: string; /** - * Flavor of the export. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Continuation Id for database pagination. Initially null but later used to paginate. */ - readonly flavor?: ExportFlavor; + continuation?: string; /** - * Indicates an updated version of the export package is available and should be re-exported for - * the latest changes. + * Maximum number of results you want to be returned in the response. + */ + maxCount?: number; + /** + * OrderBy. Ordering mechanism for your results. Possible values include: 'UncertaintyAscending', + * 'UncertaintyDescending' + */ + sortBy?: SortBy; +} + +/** + * The array of result images and token containing session and continuation Ids for the next query. + */ +export interface SuggestedTagAndRegionQuery { + /** + * Contains properties we need to fetch suggested tags for. + */ + token?: SuggestedTagAndRegionQueryToken; + /** + * Result of a suggested tags and regions request of the untagged image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newerVersionAvailable?: boolean; + readonly results?: StoredSuggestedTagAndRegion[]; } /** @@ -932,78 +1222,59 @@ export interface Tag { } /** - * An interface representing CustomVisionError. + * Model that query for counting of images whose suggested tags match given tags and their + * probability are greater than or equal to the given threshold. */ -export interface CustomVisionError { +export interface TagFilter { /** - * The error code. Possible values include: 'NoError', 'BadRequest', - * 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', - * 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', - * 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', - * 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', - * 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', - * 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', - * 'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', - * 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', 'BadRequestTagType', - * 'BadRequestMultipleNegativeTag', 'BadRequestImageTags', 'BadRequestImageRegions', - * 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestRequiredParamIsNull', - * 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', - * 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', - * 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', - * 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', - * 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', - * 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', - * 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', - * 'BadRequestImageUrl', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', - * 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', - * 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', 'BadRequestTrainingValidationFailed', - * 'BadRequestClassificationTrainingValidationFailed', - * 'BadRequestMultiClassClassificationTrainingValidationFailed', - * 'BadRequestMultiLabelClassificationTrainingValidationFailed', - * 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', - * 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', - * 'BadRequestDomainNotSupportedForAdvancedTraining', - * 'BadRequestExportPlatformNotSupportedForAdvancedTraining', - * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', - * 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', - * 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', - * 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', - * 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', - * 'BadRequestInvalid', 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', - * 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', - * 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', - * 'ForbiddenUserInsufficientCapability', 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', - * 'NotFound', 'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration', - * 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', - * 'NotFoundApimSubscription', 'NotFoundInvalid', 'Conflict', 'ConflictInvalid', 'ErrorUnknown', - * 'ErrorProjectInvalidWorkspace', 'ErrorProjectInvalidPipelineConfiguration', - * 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', - * 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', - * 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', - * 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', - * 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', - * 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', - * 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', - * 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', - * 'ErrorRegionProposal', 'ErrorInvalid' + * Existing TagIds in project to get suggested tags count for. */ - code: CustomVisionErrorCodes; + tagIds?: string[]; /** - * A message explaining the error reported by the service. + * Confidence threshold to filter suggested tags on. */ - message: string; + threshold?: number; +} + +/** + * Parameters used for training. + */ +export interface TrainingParameters { + /** + * List of tags selected for this training session, other tags in the project will be ignored. + */ + selectedTags?: string[]; } /** * Optional Parameters. */ -export interface TrainingAPIClientGetTaggedImageCountOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientCreateProjectOptionalParams extends msRest.RequestOptionsBase { /** - * The iteration id. Defaults to workspace. + * The description of the project. */ - iterationId?: string; + description?: string; /** - * A list of tags ids to filter the images to count. Defaults to all tags when null. + * The id of the domain to use for this project. Defaults to General. + */ + domainId?: string; + /** + * The type of classifier to create for this project. Possible values include: 'Multiclass', + * 'Multilabel' + */ + classificationType?: ClassificationType; + /** + * List of platforms the trained model is intending exporting to. + */ + targetExportPlatforms?: string[]; +} + +/** + * Optional Parameters. + */ +export interface TrainingAPIClientCreateImagesFromDataOptionalParams extends msRest.RequestOptionsBase { + /** + * The tags ids with which to tag each image. Limited to 20. */ tagIds?: string[]; } @@ -1011,7 +1282,31 @@ export interface TrainingAPIClientGetTaggedImageCountOptionalParams extends msRe /** * Optional Parameters. */ -export interface TrainingAPIClientGetUntaggedImageCountOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientDeleteImagesOptionalParams extends msRest.RequestOptionsBase { + /** + * Ids of the images to be deleted. Limited to 256 images per batch. + */ + imageIds?: string[]; + /** + * Flag to specify delete all images, specify this flag or a list of images. Using this flag will + * return a 202 response to indicate the images are being deleted. + */ + allImages?: boolean; + /** + * Removes these images from all iterations, not just the current workspace. Using this flag will + * return a 202 response to indicate the images are being deleted. + */ + allIterations?: boolean; +} + +/** + * Optional Parameters. + */ +export interface TrainingAPIClientGetImagesByIdsOptionalParams extends msRest.RequestOptionsBase { + /** + * The list of image ids to retrieve. Limited to 256. + */ + imageIds?: string[]; /** * The iteration id. Defaults to workspace. */ @@ -1045,6 +1340,20 @@ export interface TrainingAPIClientGetTaggedImagesOptionalParams extends msRest.R skip?: number; } +/** + * Optional Parameters. + */ +export interface TrainingAPIClientGetTaggedImageCountOptionalParams extends msRest.RequestOptionsBase { + /** + * The iteration id. Defaults to workspace. + */ + iterationId?: string; + /** + * A list of tags ids to filter the images to count. Defaults to all tags when null. + */ + tagIds?: string[]; +} + /** * Optional Parameters. */ @@ -1070,11 +1379,7 @@ export interface TrainingAPIClientGetUntaggedImagesOptionalParams extends msRest /** * Optional Parameters. */ -export interface TrainingAPIClientGetImagesByIdsOptionalParams extends msRest.RequestOptionsBase { - /** - * The list of image ids to retrieve. Limited to 256. - */ - imageIds?: string[]; +export interface TrainingAPIClientGetUntaggedImageCountOptionalParams extends msRest.RequestOptionsBase { /** * The iteration id. Defaults to workspace. */ @@ -1084,103 +1389,125 @@ export interface TrainingAPIClientGetImagesByIdsOptionalParams extends msRest.Re /** * Optional Parameters. */ -export interface TrainingAPIClientCreateImagesFromDataOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientExportIterationOptionalParams extends msRest.RequestOptionsBase { /** - * The tags ids with which to tag each image. Limited to 20. + * The flavor of the target platform. Possible values include: 'Linux', 'Windows', 'ONNX10', + * 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' */ - tagIds?: string[]; + flavor?: Flavor; } /** * Optional Parameters. */ -export interface TrainingAPIClientQuickTestImageUrlOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientGetIterationPerformanceOptionalParams extends msRest.RequestOptionsBase { /** - * Optional. Specifies the id of a particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * The threshold used to determine true predictions. */ - iterationId?: string; + threshold?: number; + /** + * If applicable, the bounding box overlap threshold used to determine true predictions. + */ + overlapThreshold?: number; } /** * Optional Parameters. */ -export interface TrainingAPIClientQuickTestImageOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientGetImagePerformancesOptionalParams extends msRest.RequestOptionsBase { /** - * Optional. Specifies the id of a particular iteration to evaluate against. - * The default iteration for the project will be used when not specified. + * A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to + * 20. */ - iterationId?: string; + tagIds?: string[]; + /** + * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest' + */ + orderBy?: OrderBy3; + /** + * Maximum number of images to return. Defaults to 50, limited to 256. Default value: 50. + */ + take?: number; + /** + * Number of images to skip before beginning the image batch. Defaults to 0. Default value: 0. + */ + skip?: number; } /** * Optional Parameters. */ -export interface TrainingAPIClientGetIterationPerformanceOptionalParams extends msRest.RequestOptionsBase { - /** - * The threshold used to determine true predictions. - */ - threshold?: number; +export interface TrainingAPIClientGetImagePerformanceCountOptionalParams extends msRest.RequestOptionsBase { /** - * If applicable, the bounding box overlap threshold used to determine true predictions. + * A list of tags ids to filter the images to count. Defaults to all tags when null. */ - overlapThreshold?: number; + tagIds?: string[]; } /** * Optional Parameters. */ -export interface TrainingAPIClientGetImagePerformancesOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientQuickTestImageOptionalParams extends msRest.RequestOptionsBase { /** - * A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to - * 20. + * Optional. Specifies the id of a particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. */ - tagIds?: string[]; + iterationId?: string; /** - * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest' + * Optional. Specifies whether or not to store the result of this prediction. The default is + * true, to store. Default value: true. */ - orderBy?: OrderBy3; + store?: boolean; +} + +/** + * Optional Parameters. + */ +export interface TrainingAPIClientQuickTestImageUrlOptionalParams extends msRest.RequestOptionsBase { /** - * Maximum number of images to return. Defaults to 50, limited to 256. Default value: 50. + * Optional. Specifies the id of a particular iteration to evaluate against. + * The default iteration for the project will be used when not specified. */ - take?: number; + iterationId?: string; /** - * Number of images to skip before beginning the image batch. Defaults to 0. Default value: 0. + * Optional. Specifies whether or not to store the result of this prediction. The default is + * true, to store. Default value: true. */ - skip?: number; + store?: boolean; } /** * Optional Parameters. */ -export interface TrainingAPIClientGetImagePerformanceCountOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientGetTagsOptionalParams extends msRest.RequestOptionsBase { /** - * A list of tags ids to filter the images to count. Defaults to all tags when null. + * The iteration id. Defaults to workspace. */ - tagIds?: string[]; + iterationId?: string; } /** * Optional Parameters. */ -export interface TrainingAPIClientCreateProjectOptionalParams extends msRest.RequestOptionsBase { +export interface TrainingAPIClientCreateTagOptionalParams extends msRest.RequestOptionsBase { /** - * The description of the project. + * Optional description for the tag. */ description?: string; /** - * The id of the domain to use for this project. Defaults to General. - */ - domainId?: string; - /** - * The type of classifier to create for this project. Possible values include: 'Multiclass', - * 'Multilabel' + * Optional type for the tag. Possible values include: 'Regular', 'Negative' */ - classificationType?: ClassificationType; + type?: Type; +} + +/** + * Optional Parameters. + */ +export interface TrainingAPIClientGetTagOptionalParams extends msRest.RequestOptionsBase { /** - * List of platforms the trained model is intending exporting to. + * The iteration to retrieve this tag from. Optional, defaults to current training set. */ - targetExportPlatforms?: string[]; + iterationId?: string; } /** @@ -1205,60 +1532,103 @@ export interface TrainingAPIClientTrainProjectOptionalParams extends msRest.Requ * The email address to send notification to when training finishes (default: null). */ notificationEmailAddress?: string; + /** + * Additional training parameters passed in to control how the project is trained. + */ + trainingParameters?: TrainingParameters; } /** - * Optional Parameters. + * Defines values for CustomVisionErrorCodes. + * Possible values include: 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', + * 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName', + * 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', + * 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', + * 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', + * 'BadRequestProjectImagePreprocessingSettings', 'BadRequestProjectDuplicated', + * 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', + * 'BadRequestIterationIsNotTrained', 'BadRequestIterationValidationFailed', + * 'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', + * 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', 'BadRequestTagType', + * 'BadRequestMultipleNegativeTag', 'BadRequestImageTags', 'BadRequestImageRegions', + * 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestRequiredParamIsNull', + * 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', + * 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', + * 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', 'BadRequestExceedProjectLimit', + * 'BadRequestExceedIterationPerProjectLimit', 'BadRequestExceedTagPerProjectLimit', + * 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', + * 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', + * 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat', + * 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', + * 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', 'BadRequestTrainingValidationFailed', + * 'BadRequestClassificationTrainingValidationFailed', + * 'BadRequestMultiClassClassificationTrainingValidationFailed', + * 'BadRequestMultiLabelClassificationTrainingValidationFailed', + * 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', + * 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', + * 'BadRequestDomainNotSupportedForAdvancedTraining', + * 'BadRequestExportPlatformNotSupportedForAdvancedTraining', + * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', + * 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', + * 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', + * 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', + * 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', + * 'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining', 'BadRequestInvalid', + * 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', 'ForbiddenUserResource', + * 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', + * 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', + * 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', + * 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', + * 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', + * 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorIterationCopyFailed', + * 'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace', + * 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', + * 'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed', + * 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', + * 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', + * 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', + * 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', + * 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', + * 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', + * 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', + * 'ErrorRegionProposal', 'ErrorInvalid' + * @readonly + * @enum {string} */ -export interface TrainingAPIClientExportIterationOptionalParams extends msRest.RequestOptionsBase { - /** - * The flavor of the target platform. Possible values include: 'Linux', 'Windows', 'ONNX10', - * 'ONNX12', 'ARM' - */ - flavor?: Flavor; -} +export type CustomVisionErrorCodes = 'NoError' | 'BadRequest' | 'BadRequestExceededBatchSize' | 'BadRequestNotSupported' | 'BadRequestInvalidIds' | 'BadRequestProjectName' | 'BadRequestProjectNameNotUnique' | 'BadRequestProjectDescription' | 'BadRequestProjectUnknownDomain' | 'BadRequestProjectUnknownClassification' | 'BadRequestProjectUnsupportedDomainTypeChange' | 'BadRequestProjectUnsupportedExportPlatform' | 'BadRequestProjectImagePreprocessingSettings' | 'BadRequestProjectDuplicated' | 'BadRequestIterationName' | 'BadRequestIterationNameNotUnique' | 'BadRequestIterationDescription' | 'BadRequestIterationIsNotTrained' | 'BadRequestIterationValidationFailed' | 'BadRequestWorkspaceCannotBeModified' | 'BadRequestWorkspaceNotDeletable' | 'BadRequestTagName' | 'BadRequestTagNameNotUnique' | 'BadRequestTagDescription' | 'BadRequestTagType' | 'BadRequestMultipleNegativeTag' | 'BadRequestImageTags' | 'BadRequestImageRegions' | 'BadRequestNegativeAndRegularTagOnSameImage' | 'BadRequestRequiredParamIsNull' | 'BadRequestIterationIsPublished' | 'BadRequestInvalidPublishName' | 'BadRequestInvalidPublishTarget' | 'BadRequestUnpublishFailed' | 'BadRequestIterationNotPublished' | 'BadRequestSubscriptionApi' | 'BadRequestExceedProjectLimit' | 'BadRequestExceedIterationPerProjectLimit' | 'BadRequestExceedTagPerProjectLimit' | 'BadRequestExceedTagPerImageLimit' | 'BadRequestExceededQuota' | 'BadRequestCannotMigrateProjectWithName' | 'BadRequestNotLimitedTrial' | 'BadRequestImageBatch' | 'BadRequestImageStream' | 'BadRequestImageUrl' | 'BadRequestImageFormat' | 'BadRequestImageSizeBytes' | 'BadRequestImageExceededCount' | 'BadRequestTrainingNotNeeded' | 'BadRequestTrainingNotNeededButTrainingPipelineUpdated' | 'BadRequestTrainingValidationFailed' | 'BadRequestClassificationTrainingValidationFailed' | 'BadRequestMultiClassClassificationTrainingValidationFailed' | 'BadRequestMultiLabelClassificationTrainingValidationFailed' | 'BadRequestDetectionTrainingValidationFailed' | 'BadRequestTrainingAlreadyInProgress' | 'BadRequestDetectionTrainingNotAllowNegativeTag' | 'BadRequestInvalidEmailAddress' | 'BadRequestDomainNotSupportedForAdvancedTraining' | 'BadRequestExportPlatformNotSupportedForAdvancedTraining' | 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining' | 'BadRequestExportValidationFailed' | 'BadRequestExportAlreadyInProgress' | 'BadRequestPredictionIdsMissing' | 'BadRequestPredictionIdsExceededCount' | 'BadRequestPredictionTagsExceededCount' | 'BadRequestPredictionResultsExceededCount' | 'BadRequestPredictionInvalidApplicationName' | 'BadRequestPredictionInvalidQueryParameters' | 'BadRequestInvalidImportToken' | 'BadRequestExportWhileTraining' | 'BadRequestInvalid' | 'UnsupportedMediaType' | 'Forbidden' | 'ForbiddenUser' | 'ForbiddenUserResource' | 'ForbiddenUserSignupDisabled' | 'ForbiddenUserSignupAllowanceExceeded' | 'ForbiddenUserDoesNotExist' | 'ForbiddenUserDisabled' | 'ForbiddenUserInsufficientCapability' | 'ForbiddenDRModeEnabled' | 'ForbiddenInvalid' | 'NotFound' | 'NotFoundProject' | 'NotFoundProjectDefaultIteration' | 'NotFoundIteration' | 'NotFoundIterationPerformance' | 'NotFoundTag' | 'NotFoundImage' | 'NotFoundDomain' | 'NotFoundApimSubscription' | 'NotFoundInvalid' | 'Conflict' | 'ConflictInvalid' | 'ErrorUnknown' | 'ErrorIterationCopyFailed' | 'ErrorPreparePerformanceMigrationFailed' | 'ErrorProjectInvalidWorkspace' | 'ErrorProjectInvalidPipelineConfiguration' | 'ErrorProjectInvalidDomain' | 'ErrorProjectTrainingRequestFailed' | 'ErrorProjectImportRequestFailed' | 'ErrorProjectExportRequestFailed' | 'ErrorFeaturizationServiceUnavailable' | 'ErrorFeaturizationQueueTimeout' | 'ErrorFeaturizationInvalidFeaturizer' | 'ErrorFeaturizationAugmentationUnavailable' | 'ErrorFeaturizationUnrecognizedJob' | 'ErrorFeaturizationAugmentationError' | 'ErrorExporterInvalidPlatform' | 'ErrorExporterInvalidFeaturizer' | 'ErrorExporterInvalidClassifier' | 'ErrorPredictionServiceUnavailable' | 'ErrorPredictionModelNotFound' | 'ErrorPredictionModelNotCached' | 'ErrorPrediction' | 'ErrorPredictionStorage' | 'ErrorRegionProposal' | 'ErrorInvalid'; /** - * Optional Parameters. + * Defines values for DomainType. + * Possible values include: 'Classification', 'ObjectDetection' + * @readonly + * @enum {string} */ -export interface TrainingAPIClientGetTagOptionalParams extends msRest.RequestOptionsBase { - /** - * The iteration to retrieve this tag from. Optional, defaults to current training set. - */ - iterationId?: string; -} +export type DomainType = 'Classification' | 'ObjectDetection'; /** - * Optional Parameters. + * Defines values for ExportPlatform. + * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK' + * @readonly + * @enum {string} */ -export interface TrainingAPIClientGetTagsOptionalParams extends msRest.RequestOptionsBase { - /** - * The iteration id. Defaults to workspace. - */ - iterationId?: string; -} +export type ExportPlatform = 'CoreML' | 'TensorFlow' | 'DockerFile' | 'ONNX' | 'VAIDK'; /** - * Optional Parameters. + * Defines values for ExportStatus. + * Possible values include: 'Exporting', 'Failed', 'Done' + * @readonly + * @enum {string} */ -export interface TrainingAPIClientCreateTagOptionalParams extends msRest.RequestOptionsBase { - /** - * Optional description for the tag. - */ - description?: string; - /** - * Optional type for the tag. Possible values include: 'Regular', 'Negative' - */ - type?: Type; -} +export type ExportStatus = 'Exporting' | 'Failed' | 'Done'; /** - * Defines values for DomainType. - * Possible values include: 'Classification', 'ObjectDetection' + * Defines values for ExportFlavor. + * Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', + * 'TensorFlowLite' * @readonly * @enum {string} */ -export type DomainType = 'Classification' | 'ObjectDetection'; +export type ExportFlavor = 'Linux' | 'Windows' | 'ONNX10' | 'ONNX12' | 'ARM' | 'TensorFlowNormal' | 'TensorFlowLite'; /** * Defines values for ImageCreateStatus. @@ -1270,14 +1640,6 @@ export type DomainType = 'Classification' | 'ObjectDetection'; */ export type ImageCreateStatus = 'OK' | 'OKDuplicate' | 'ErrorSource' | 'ErrorImageFormat' | 'ErrorImageSize' | 'ErrorStorage' | 'ErrorLimitExceed' | 'ErrorTagLimitExceed' | 'ErrorRegionLimitExceed' | 'ErrorUnknown' | 'ErrorNegativeAndRegularTagOnSameImage'; -/** - * Defines values for OrderBy. - * Possible values include: 'Newest', 'Oldest', 'Suggested' - * @readonly - * @enum {string} - */ -export type OrderBy = 'Newest' | 'Oldest' | 'Suggested'; - /** * Defines values for Classifier. * Possible values include: 'Multiclass', 'Multilabel' @@ -1295,28 +1657,28 @@ export type Classifier = 'Multiclass' | 'Multilabel'; export type TrainingType = 'Regular' | 'Advanced'; /** - * Defines values for ExportPlatform. - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK' + * Defines values for OrderBy. + * Possible values include: 'Newest', 'Oldest', 'Suggested' * @readonly * @enum {string} */ -export type ExportPlatform = 'CoreML' | 'TensorFlow' | 'DockerFile' | 'ONNX' | 'VAIDK'; +export type OrderBy = 'Newest' | 'Oldest' | 'Suggested'; /** - * Defines values for ExportStatus. - * Possible values include: 'Exporting', 'Failed', 'Done' + * Defines values for ProjectStatus. + * Possible values include: 'Succeeded', 'Importing', 'Failed' * @readonly * @enum {string} */ -export type ExportStatus = 'Exporting' | 'Failed' | 'Done'; +export type ProjectStatus = 'Succeeded' | 'Importing' | 'Failed'; /** - * Defines values for ExportFlavor. - * Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM' + * Defines values for SortBy. + * Possible values include: 'UncertaintyAscending', 'UncertaintyDescending' * @readonly * @enum {string} */ -export type ExportFlavor = 'Linux' | 'Windows' | 'ONNX10' | 'ONNX12' | 'ARM'; +export type SortBy = 'UncertaintyAscending' | 'UncertaintyDescending'; /** * Defines values for TagType. @@ -1327,58 +1689,12 @@ export type ExportFlavor = 'Linux' | 'Windows' | 'ONNX10' | 'ONNX12' | 'ARM'; export type TagType = 'Regular' | 'Negative'; /** - * Defines values for CustomVisionErrorCodes. - * Possible values include: 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', - * 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName', - * 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', - * 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', - * 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', - * 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', - * 'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified', - * 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', - * 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', - * 'BadRequestImageTags', 'BadRequestImageRegions', 'BadRequestNegativeAndRegularTagOnSameImage', - * 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished', - * 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', - * 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', 'BadRequestExceedProjectLimit', - * 'BadRequestExceedIterationPerProjectLimit', 'BadRequestExceedTagPerProjectLimit', - * 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', - * 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', - * 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat', - * 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', - * 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', 'BadRequestTrainingValidationFailed', - * 'BadRequestClassificationTrainingValidationFailed', - * 'BadRequestMultiClassClassificationTrainingValidationFailed', - * 'BadRequestMultiLabelClassificationTrainingValidationFailed', - * 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', - * 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', - * 'BadRequestDomainNotSupportedForAdvancedTraining', - * 'BadRequestExportPlatformNotSupportedForAdvancedTraining', - * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', - * 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', - * 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', - * 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', - * 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', - * 'BadRequestInvalid', 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', - * 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', - * 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', - * 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', - * 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', - * 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', - * 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorProjectInvalidWorkspace', - * 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', - * 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed', - * 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout', - * 'ErrorFeaturizationInvalidFeaturizer', 'ErrorFeaturizationAugmentationUnavailable', - * 'ErrorFeaturizationUnrecognizedJob', 'ErrorFeaturizationAugmentationError', - * 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', - * 'ErrorExporterInvalidClassifier', 'ErrorPredictionServiceUnavailable', - * 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', 'ErrorPrediction', - * 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid' + * Defines values for ClassificationType. + * Possible values include: 'Multiclass', 'Multilabel' * @readonly * @enum {string} */ -export type CustomVisionErrorCodes = 'NoError' | 'BadRequest' | 'BadRequestExceededBatchSize' | 'BadRequestNotSupported' | 'BadRequestInvalidIds' | 'BadRequestProjectName' | 'BadRequestProjectNameNotUnique' | 'BadRequestProjectDescription' | 'BadRequestProjectUnknownDomain' | 'BadRequestProjectUnknownClassification' | 'BadRequestProjectUnsupportedDomainTypeChange' | 'BadRequestProjectUnsupportedExportPlatform' | 'BadRequestIterationName' | 'BadRequestIterationNameNotUnique' | 'BadRequestIterationDescription' | 'BadRequestIterationIsNotTrained' | 'BadRequestWorkspaceCannotBeModified' | 'BadRequestWorkspaceNotDeletable' | 'BadRequestTagName' | 'BadRequestTagNameNotUnique' | 'BadRequestTagDescription' | 'BadRequestTagType' | 'BadRequestMultipleNegativeTag' | 'BadRequestImageTags' | 'BadRequestImageRegions' | 'BadRequestNegativeAndRegularTagOnSameImage' | 'BadRequestRequiredParamIsNull' | 'BadRequestIterationIsPublished' | 'BadRequestInvalidPublishName' | 'BadRequestInvalidPublishTarget' | 'BadRequestUnpublishFailed' | 'BadRequestIterationNotPublished' | 'BadRequestSubscriptionApi' | 'BadRequestExceedProjectLimit' | 'BadRequestExceedIterationPerProjectLimit' | 'BadRequestExceedTagPerProjectLimit' | 'BadRequestExceedTagPerImageLimit' | 'BadRequestExceededQuota' | 'BadRequestCannotMigrateProjectWithName' | 'BadRequestNotLimitedTrial' | 'BadRequestImageBatch' | 'BadRequestImageStream' | 'BadRequestImageUrl' | 'BadRequestImageFormat' | 'BadRequestImageSizeBytes' | 'BadRequestImageExceededCount' | 'BadRequestTrainingNotNeeded' | 'BadRequestTrainingNotNeededButTrainingPipelineUpdated' | 'BadRequestTrainingValidationFailed' | 'BadRequestClassificationTrainingValidationFailed' | 'BadRequestMultiClassClassificationTrainingValidationFailed' | 'BadRequestMultiLabelClassificationTrainingValidationFailed' | 'BadRequestDetectionTrainingValidationFailed' | 'BadRequestTrainingAlreadyInProgress' | 'BadRequestDetectionTrainingNotAllowNegativeTag' | 'BadRequestInvalidEmailAddress' | 'BadRequestDomainNotSupportedForAdvancedTraining' | 'BadRequestExportPlatformNotSupportedForAdvancedTraining' | 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining' | 'BadRequestExportValidationFailed' | 'BadRequestExportAlreadyInProgress' | 'BadRequestPredictionIdsMissing' | 'BadRequestPredictionIdsExceededCount' | 'BadRequestPredictionTagsExceededCount' | 'BadRequestPredictionResultsExceededCount' | 'BadRequestPredictionInvalidApplicationName' | 'BadRequestPredictionInvalidQueryParameters' | 'BadRequestInvalid' | 'UnsupportedMediaType' | 'Forbidden' | 'ForbiddenUser' | 'ForbiddenUserResource' | 'ForbiddenUserSignupDisabled' | 'ForbiddenUserSignupAllowanceExceeded' | 'ForbiddenUserDoesNotExist' | 'ForbiddenUserDisabled' | 'ForbiddenUserInsufficientCapability' | 'ForbiddenDRModeEnabled' | 'ForbiddenInvalid' | 'NotFound' | 'NotFoundProject' | 'NotFoundProjectDefaultIteration' | 'NotFoundIteration' | 'NotFoundIterationPerformance' | 'NotFoundTag' | 'NotFoundImage' | 'NotFoundDomain' | 'NotFoundApimSubscription' | 'NotFoundInvalid' | 'Conflict' | 'ConflictInvalid' | 'ErrorUnknown' | 'ErrorProjectInvalidWorkspace' | 'ErrorProjectInvalidPipelineConfiguration' | 'ErrorProjectInvalidDomain' | 'ErrorProjectTrainingRequestFailed' | 'ErrorProjectExportRequestFailed' | 'ErrorFeaturizationServiceUnavailable' | 'ErrorFeaturizationQueueTimeout' | 'ErrorFeaturizationInvalidFeaturizer' | 'ErrorFeaturizationAugmentationUnavailable' | 'ErrorFeaturizationUnrecognizedJob' | 'ErrorFeaturizationAugmentationError' | 'ErrorExporterInvalidPlatform' | 'ErrorExporterInvalidFeaturizer' | 'ErrorExporterInvalidClassifier' | 'ErrorPredictionServiceUnavailable' | 'ErrorPredictionModelNotFound' | 'ErrorPredictionModelNotCached' | 'ErrorPrediction' | 'ErrorPredictionStorage' | 'ErrorRegionProposal' | 'ErrorInvalid'; +export type ClassificationType = 'Multiclass' | 'Multilabel'; /** * Defines values for OrderBy1. @@ -1396,6 +1712,15 @@ export type OrderBy1 = 'Newest' | 'Oldest'; */ export type OrderBy2 = 'Newest' | 'Oldest'; +/** + * Defines values for Flavor. + * Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', + * 'TensorFlowLite' + * @readonly + * @enum {string} + */ +export type Flavor = 'Linux' | 'Windows' | 'ONNX10' | 'ONNX12' | 'ARM' | 'TensorFlowNormal' | 'TensorFlowLite'; + /** * Defines values for OrderBy3. * Possible values include: 'Newest', 'Oldest' @@ -1405,12 +1730,12 @@ export type OrderBy2 = 'Newest' | 'Oldest'; export type OrderBy3 = 'Newest' | 'Oldest'; /** - * Defines values for ClassificationType. - * Possible values include: 'Multiclass', 'Multilabel' + * Defines values for Type. + * Possible values include: 'Regular', 'Negative' * @readonly * @enum {string} */ -export type ClassificationType = 'Multiclass' | 'Multilabel'; +export type Type = 'Regular' | 'Negative'; /** * Defines values for TrainingType1. @@ -1421,33 +1746,77 @@ export type ClassificationType = 'Multiclass' | 'Multilabel'; export type TrainingType1 = 'Regular' | 'Advanced'; /** - * Defines values for Flavor. - * Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM' + * Defines values for Platform. + * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK' * @readonly * @enum {string} */ -export type Flavor = 'Linux' | 'Windows' | 'ONNX10' | 'ONNX12' | 'ARM'; +export type Platform = 'CoreML' | 'TensorFlow' | 'DockerFile' | 'ONNX' | 'VAIDK'; /** - * Defines values for Type. - * Possible values include: 'Regular', 'Negative' - * @readonly - * @enum {string} + * Contains response data for the getDomains operation. */ -export type Type = 'Regular' | 'Negative'; +export type GetDomainsResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Domain[]; + }; +}; /** - * Defines values for Platform. - * Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK' - * @readonly - * @enum {string} + * Contains response data for the getDomain operation. */ -export type Platform = 'CoreML' | 'TensorFlow' | 'DockerFile' | 'ONNX' | 'VAIDK'; +export type GetDomainResponse = Domain & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Domain; + }; +}; /** - * Contains response data for the getDomains operation. + * Contains response data for the getProjects operation. + */ +export type GetProjectsResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Project[]; + }; +}; + +/** + * Contains response data for the createProject operation. */ -export type GetDomainsResponse = Array & { +export type CreateProjectResponse = Project & { /** * The underlying HTTP response. */ @@ -1460,14 +1829,14 @@ export type GetDomainsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Domain[]; + parsedBody: Project; }; }; /** - * Contains response data for the getDomain operation. + * Contains response data for the getProject operation. */ -export type GetDomainResponse = Domain & { +export type GetProjectResponse = Project & { /** * The underlying HTTP response. */ @@ -1480,19 +1849,14 @@ export type GetDomainResponse = Domain & { /** * The response body as parsed JSON or XML */ - parsedBody: Domain; + parsedBody: Project; }; }; /** - * Contains response data for the getTaggedImageCount operation. + * Contains response data for the updateProject operation. */ -export type GetTaggedImageCountResponse = { - /** - * The parsed response body. - */ - body: number; - +export type UpdateProjectResponse = Project & { /** * The underlying HTTP response. */ @@ -1505,19 +1869,14 @@ export type GetTaggedImageCountResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: number; + parsedBody: Project; }; }; /** - * Contains response data for the getUntaggedImageCount operation. + * Contains response data for the exportProject operation. */ -export type GetUntaggedImageCountResponse = { - /** - * The parsed response body. - */ - body: number; - +export type ExportProjectResponse = ProjectExport & { /** * The underlying HTTP response. */ @@ -1530,14 +1889,14 @@ export type GetUntaggedImageCountResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: number; + parsedBody: ProjectExport; }; }; /** - * Contains response data for the createImageTags operation. + * Contains response data for the createImagesFromData operation. */ -export type CreateImageTagsResponse = ImageTagCreateSummary & { +export type CreateImagesFromDataResponse = ImageCreateSummary & { /** * The underlying HTTP response. */ @@ -1550,14 +1909,14 @@ export type CreateImageTagsResponse = ImageTagCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageTagCreateSummary; + parsedBody: ImageCreateSummary; }; }; /** - * Contains response data for the createImageRegions operation. + * Contains response data for the getImageRegionProposals operation. */ -export type CreateImageRegionsResponse = ImageRegionCreateSummary & { +export type GetImageRegionProposalsResponse = ImageRegionProposal & { /** * The underlying HTTP response. */ @@ -1570,14 +1929,14 @@ export type CreateImageRegionsResponse = ImageRegionCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageRegionCreateSummary; + parsedBody: ImageRegionProposal; }; }; /** - * Contains response data for the getTaggedImages operation. + * Contains response data for the createImagesFromFiles operation. */ -export type GetTaggedImagesResponse = Array & { +export type CreateImagesFromFilesResponse = ImageCreateSummary & { /** * The underlying HTTP response. */ @@ -1590,14 +1949,14 @@ export type GetTaggedImagesResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Image[]; + parsedBody: ImageCreateSummary; }; }; /** - * Contains response data for the getUntaggedImages operation. + * Contains response data for the getImagesByIds operation. */ -export type GetUntaggedImagesResponse = Array & { +export type GetImagesByIdsResponse = Array & { /** * The underlying HTTP response. */ @@ -1615,9 +1974,9 @@ export type GetUntaggedImagesResponse = Array & { }; /** - * Contains response data for the getImagesByIds operation. + * Contains response data for the createImagesFromPredictions operation. */ -export type GetImagesByIdsResponse = Array & { +export type CreateImagesFromPredictionsResponse = ImageCreateSummary & { /** * The underlying HTTP response. */ @@ -1630,14 +1989,14 @@ export type GetImagesByIdsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Image[]; + parsedBody: ImageCreateSummary; }; }; /** - * Contains response data for the createImagesFromData operation. + * Contains response data for the createImageRegions operation. */ -export type CreateImagesFromDataResponse = ImageCreateSummary & { +export type CreateImageRegionsResponse = ImageRegionCreateSummary & { /** * The underlying HTTP response. */ @@ -1650,14 +2009,14 @@ export type CreateImagesFromDataResponse = ImageCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageCreateSummary; + parsedBody: ImageRegionCreateSummary; }; }; /** - * Contains response data for the createImagesFromFiles operation. + * Contains response data for the querySuggestedImages operation. */ -export type CreateImagesFromFilesResponse = ImageCreateSummary & { +export type QuerySuggestedImagesResponse = SuggestedTagAndRegionQuery & { /** * The underlying HTTP response. */ @@ -1670,14 +2029,19 @@ export type CreateImagesFromFilesResponse = ImageCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageCreateSummary; + parsedBody: SuggestedTagAndRegionQuery; }; }; /** - * Contains response data for the createImagesFromUrls operation. + * Contains response data for the querySuggestedImageCount operation. */ -export type CreateImagesFromUrlsResponse = ImageCreateSummary & { +export type QuerySuggestedImageCountResponse = { + /** + * The response body properties. + */ + [propertyName: string]: number; +} & { /** * The underlying HTTP response. */ @@ -1690,14 +2054,14 @@ export type CreateImagesFromUrlsResponse = ImageCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageCreateSummary; + parsedBody: { [propertyName: string]: number }; }; }; /** - * Contains response data for the createImagesFromPredictions operation. + * Contains response data for the getTaggedImages operation. */ -export type CreateImagesFromPredictionsResponse = ImageCreateSummary & { +export type GetTaggedImagesResponse = Array & { /** * The underlying HTTP response. */ @@ -1710,14 +2074,19 @@ export type CreateImagesFromPredictionsResponse = ImageCreateSummary & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageCreateSummary; + parsedBody: Image[]; }; }; /** - * Contains response data for the getImageRegionProposals operation. + * Contains response data for the getTaggedImageCount operation. */ -export type GetImageRegionProposalsResponse = ImageRegionProposal & { +export type GetTaggedImageCountResponse = { + /** + * The parsed response body. + */ + body: number; + /** * The underlying HTTP response. */ @@ -1730,14 +2099,14 @@ export type GetImageRegionProposalsResponse = ImageRegionProposal & { /** * The response body as parsed JSON or XML */ - parsedBody: ImageRegionProposal; + parsedBody: number; }; }; /** - * Contains response data for the quickTestImageUrl operation. + * Contains response data for the createImageTags operation. */ -export type QuickTestImageUrlResponse = ImagePrediction & { +export type CreateImageTagsResponse = ImageTagCreateSummary & { /** * The underlying HTTP response. */ @@ -1750,14 +2119,14 @@ export type QuickTestImageUrlResponse = ImagePrediction & { /** * The response body as parsed JSON or XML */ - parsedBody: ImagePrediction; + parsedBody: ImageTagCreateSummary; }; }; /** - * Contains response data for the quickTestImage operation. + * Contains response data for the getUntaggedImages operation. */ -export type QuickTestImageResponse = ImagePrediction & { +export type GetUntaggedImagesResponse = Array & { /** * The underlying HTTP response. */ @@ -1770,14 +2139,19 @@ export type QuickTestImageResponse = ImagePrediction & { /** * The response body as parsed JSON or XML */ - parsedBody: ImagePrediction; + parsedBody: Image[]; }; }; /** - * Contains response data for the queryPredictions operation. + * Contains response data for the getUntaggedImageCount operation. */ -export type QueryPredictionsResponse = PredictionQueryResult & { +export type GetUntaggedImageCountResponse = { + /** + * The parsed response body. + */ + body: number; + /** * The underlying HTTP response. */ @@ -1790,14 +2164,14 @@ export type QueryPredictionsResponse = PredictionQueryResult & { /** * The response body as parsed JSON or XML */ - parsedBody: PredictionQueryResult; + parsedBody: number; }; }; /** - * Contains response data for the getIterationPerformance operation. + * Contains response data for the createImagesFromUrls operation. */ -export type GetIterationPerformanceResponse = IterationPerformance & { +export type CreateImagesFromUrlsResponse = ImageCreateSummary & { /** * The underlying HTTP response. */ @@ -1810,14 +2184,14 @@ export type GetIterationPerformanceResponse = IterationPerformance & { /** * The response body as parsed JSON or XML */ - parsedBody: IterationPerformance; + parsedBody: ImageCreateSummary; }; }; /** - * Contains response data for the getImagePerformances operation. + * Contains response data for the getIterations operation. */ -export type GetImagePerformancesResponse = Array & { +export type GetIterationsResponse = Array & { /** * The underlying HTTP response. */ @@ -1830,19 +2204,14 @@ export type GetImagePerformancesResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: ImagePerformance[]; + parsedBody: Iteration[]; }; }; /** - * Contains response data for the getImagePerformanceCount operation. + * Contains response data for the getIteration operation. */ -export type GetImagePerformanceCountResponse = { - /** - * The parsed response body. - */ - body: number; - +export type GetIterationResponse = Iteration & { /** * The underlying HTTP response. */ @@ -1855,14 +2224,14 @@ export type GetImagePerformanceCountResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: number; + parsedBody: Iteration; }; }; /** - * Contains response data for the getProjects operation. + * Contains response data for the updateIteration operation. */ -export type GetProjectsResponse = Array & { +export type UpdateIterationResponse = Iteration & { /** * The underlying HTTP response. */ @@ -1875,14 +2244,14 @@ export type GetProjectsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Project[]; + parsedBody: Iteration; }; }; /** - * Contains response data for the createProject operation. + * Contains response data for the getExports operation. */ -export type CreateProjectResponse = Project & { +export type GetExportsResponse = Array & { /** * The underlying HTTP response. */ @@ -1895,14 +2264,14 @@ export type CreateProjectResponse = Project & { /** * The response body as parsed JSON or XML */ - parsedBody: Project; + parsedBody: ExportModel[]; }; }; /** - * Contains response data for the getProject operation. + * Contains response data for the exportIteration operation. */ -export type GetProjectResponse = Project & { +export type ExportIterationResponse = ExportModel & { /** * The underlying HTTP response. */ @@ -1915,14 +2284,14 @@ export type GetProjectResponse = Project & { /** * The response body as parsed JSON or XML */ - parsedBody: Project; + parsedBody: ExportModel; }; }; /** - * Contains response data for the updateProject operation. + * Contains response data for the getIterationPerformance operation. */ -export type UpdateProjectResponse = Project & { +export type GetIterationPerformanceResponse = IterationPerformance & { /** * The underlying HTTP response. */ @@ -1935,14 +2304,14 @@ export type UpdateProjectResponse = Project & { /** * The response body as parsed JSON or XML */ - parsedBody: Project; + parsedBody: IterationPerformance; }; }; /** - * Contains response data for the trainProject operation. + * Contains response data for the getImagePerformances operation. */ -export type TrainProjectResponse = Iteration & { +export type GetImagePerformancesResponse = Array & { /** * The underlying HTTP response. */ @@ -1955,14 +2324,19 @@ export type TrainProjectResponse = Iteration & { /** * The response body as parsed JSON or XML */ - parsedBody: Iteration; + parsedBody: ImagePerformance[]; }; }; /** - * Contains response data for the getIterations operation. + * Contains response data for the getImagePerformanceCount operation. */ -export type GetIterationsResponse = Array & { +export type GetImagePerformanceCountResponse = { + /** + * The parsed response body. + */ + body: number; + /** * The underlying HTTP response. */ @@ -1975,14 +2349,19 @@ export type GetIterationsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Iteration[]; + parsedBody: number; }; }; /** - * Contains response data for the getIteration operation. + * Contains response data for the publishIteration operation. */ -export type GetIterationResponse = Iteration & { +export type PublishIterationResponse = { + /** + * The parsed response body. + */ + body: boolean; + /** * The underlying HTTP response. */ @@ -1995,14 +2374,14 @@ export type GetIterationResponse = Iteration & { /** * The response body as parsed JSON or XML */ - parsedBody: Iteration; + parsedBody: boolean; }; }; /** - * Contains response data for the updateIteration operation. + * Contains response data for the queryPredictions operation. */ -export type UpdateIterationResponse = Iteration & { +export type QueryPredictionsResponse = PredictionQueryResult & { /** * The underlying HTTP response. */ @@ -2015,19 +2394,34 @@ export type UpdateIterationResponse = Iteration & { /** * The response body as parsed JSON or XML */ - parsedBody: Iteration; + parsedBody: PredictionQueryResult; }; }; /** - * Contains response data for the publishIteration operation. + * Contains response data for the quickTestImage operation. */ -export type PublishIterationResponse = { +export type QuickTestImageResponse = ImagePrediction & { /** - * The parsed response body. + * The underlying HTTP response. */ - body: boolean; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ImagePrediction; + }; +}; +/** + * Contains response data for the quickTestImageUrl operation. + */ +export type QuickTestImageUrlResponse = ImagePrediction & { /** * The underlying HTTP response. */ @@ -2040,14 +2434,14 @@ export type PublishIterationResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: boolean; + parsedBody: ImagePrediction; }; }; /** - * Contains response data for the getExports operation. + * Contains response data for the getTags operation. */ -export type GetExportsResponse = Array & { +export type GetTagsResponse = Array & { /** * The underlying HTTP response. */ @@ -2060,14 +2454,14 @@ export type GetExportsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: ExportModel[]; + parsedBody: Tag[]; }; }; /** - * Contains response data for the exportIteration operation. + * Contains response data for the createTag operation. */ -export type ExportIterationResponse = ExportModel & { +export type CreateTagResponse = Tag & { /** * The underlying HTTP response. */ @@ -2080,7 +2474,7 @@ export type ExportIterationResponse = ExportModel & { /** * The response body as parsed JSON or XML */ - parsedBody: ExportModel; + parsedBody: Tag; }; }; @@ -2125,9 +2519,9 @@ export type UpdateTagResponse = Tag & { }; /** - * Contains response data for the getTags operation. + * Contains response data for the suggestTagsAndRegions operation. */ -export type GetTagsResponse = Array & { +export type SuggestTagsAndRegionsResponse = Array & { /** * The underlying HTTP response. */ @@ -2140,14 +2534,14 @@ export type GetTagsResponse = Array & { /** * The response body as parsed JSON or XML */ - parsedBody: Tag[]; + parsedBody: SuggestedTagAndRegion[]; }; }; /** - * Contains response data for the createTag operation. + * Contains response data for the trainProject operation. */ -export type CreateTagResponse = Tag & { +export type TrainProjectResponse = Iteration & { /** * The underlying HTTP response. */ @@ -2160,6 +2554,26 @@ export type CreateTagResponse = Tag & { /** * The response body as parsed JSON or XML */ - parsedBody: Tag; + parsedBody: Iteration; + }; +}; + +/** + * Contains response data for the importProject operation. + */ +export type ImportProjectResponse = Project & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Project; }; }; diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/mappers.ts b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/mappers.ts index 33b947320d6a..97bb7a9ca6d0 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/mappers.ts +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/mappers.ts @@ -9,6 +9,72 @@ import * as msRest from "@azure/ms-rest-js"; +export const BoundingBox: msRest.CompositeMapper = { + serializedName: "BoundingBox", + type: { + name: "Composite", + className: "BoundingBox", + modelProperties: { + left: { + required: true, + nullable: false, + serializedName: "left", + type: { + name: "Number" + } + }, + top: { + required: true, + nullable: false, + serializedName: "top", + type: { + name: "Number" + } + }, + width: { + required: true, + nullable: false, + serializedName: "width", + type: { + name: "Number" + } + }, + height: { + required: true, + nullable: false, + serializedName: "height", + type: { + name: "Number" + } + } + } + } +}; + +export const CustomVisionError: msRest.CompositeMapper = { + serializedName: "CustomVisionError", + type: { + name: "Composite", + className: "CustomVisionError", + modelProperties: { + code: { + required: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + required: true, + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + export const Domain: msRest.CompositeMapper = { serializedName: "Domain", type: { @@ -59,195 +125,95 @@ export const Domain: msRest.CompositeMapper = { } }; -export const ImageTagCreateEntry: msRest.CompositeMapper = { - serializedName: "ImageTagCreateEntry", +export const ExportModel: msRest.CompositeMapper = { + serializedName: "Export", type: { name: "Composite", - className: "ImageTagCreateEntry", + className: "ExportModel", modelProperties: { - imageId: { + platform: { nullable: false, - serializedName: "imageId", + readOnly: true, + serializedName: "platform", type: { - name: "Uuid" + name: "String" } }, - tagId: { + status: { nullable: false, - serializedName: "tagId", - type: { - name: "Uuid" - } - } - } - } -}; - -export const ImageTagCreateBatch: msRest.CompositeMapper = { - serializedName: "ImageTagCreateBatch", - type: { - name: "Composite", - className: "ImageTagCreateBatch", - modelProperties: { - tags: { - serializedName: "tags", + readOnly: true, + serializedName: "status", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageTagCreateEntry" - } - } + name: "String" } - } - } - } -}; - -export const ImageTagCreateSummary: msRest.CompositeMapper = { - serializedName: "ImageTagCreateSummary", - type: { - name: "Composite", - className: "ImageTagCreateSummary", - modelProperties: { - created: { - nullable: true, - serializedName: "created", + }, + downloadUri: { + readOnly: true, + serializedName: "downloadUri", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageTagCreateEntry" - } - } + name: "String" } }, - duplicated: { + flavor: { nullable: true, - serializedName: "duplicated", + readOnly: true, + serializedName: "flavor", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageTagCreateEntry" - } - } + name: "String" } }, - exceeded: { - nullable: true, - serializedName: "exceeded", + newerVersionAvailable: { + nullable: false, + readOnly: true, + serializedName: "newerVersionAvailable", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageTagCreateEntry" - } - } + name: "Boolean" } } } } }; -export const ImageRegionCreateEntry: msRest.CompositeMapper = { - serializedName: "ImageRegionCreateEntry", +export const ImageTag: msRest.CompositeMapper = { + serializedName: "ImageTag", type: { name: "Composite", - className: "ImageRegionCreateEntry", + className: "ImageTag", modelProperties: { - imageId: { - required: true, - nullable: false, - serializedName: "imageId", - type: { - name: "Uuid" - } - }, tagId: { - required: true, nullable: false, + readOnly: true, serializedName: "tagId", type: { name: "Uuid" } }, - left: { - required: true, - nullable: false, - serializedName: "left", - type: { - name: "Number" - } - }, - top: { - required: true, - nullable: false, - serializedName: "top", - type: { - name: "Number" - } - }, - width: { - required: true, + tagName: { nullable: false, - serializedName: "width", + readOnly: true, + serializedName: "tagName", type: { - name: "Number" + name: "String" } }, - height: { - required: true, + created: { nullable: false, - serializedName: "height", - type: { - name: "Number" - } - } - } - } -}; - -export const ImageRegionCreateBatch: msRest.CompositeMapper = { - serializedName: "ImageRegionCreateBatch", - type: { - name: "Composite", - className: "ImageRegionCreateBatch", - modelProperties: { - regions: { - serializedName: "regions", + readOnly: true, + serializedName: "created", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageRegionCreateEntry" - } - } + name: "DateTime" } } } } }; -export const ImageRegionCreateResult: msRest.CompositeMapper = { - serializedName: "ImageRegionCreateResult", +export const ImageRegion: msRest.CompositeMapper = { + serializedName: "ImageRegion", type: { name: "Composite", - className: "ImageRegionCreateResult", + className: "ImageRegion", modelProperties: { - imageId: { - nullable: false, - readOnly: true, - serializedName: "imageId", - type: { - name: "Uuid" - } - }, regionId: { nullable: false, readOnly: true, @@ -316,168 +282,11 @@ export const ImageRegionCreateResult: msRest.CompositeMapper = { } }; -export const ImageRegionCreateSummary: msRest.CompositeMapper = { - serializedName: "ImageRegionCreateSummary", +export const Image: msRest.CompositeMapper = { + serializedName: "Image", type: { name: "Composite", - className: "ImageRegionCreateSummary", - modelProperties: { - created: { - nullable: true, - serializedName: "created", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageRegionCreateResult" - } - } - } - }, - duplicated: { - nullable: true, - serializedName: "duplicated", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageRegionCreateEntry" - } - } - } - }, - exceeded: { - nullable: true, - serializedName: "exceeded", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ImageRegionCreateEntry" - } - } - } - } - } - } -}; - -export const ImageTag: msRest.CompositeMapper = { - serializedName: "ImageTag", - type: { - name: "Composite", - className: "ImageTag", - modelProperties: { - tagId: { - nullable: false, - readOnly: true, - serializedName: "tagId", - type: { - name: "Uuid" - } - }, - tagName: { - nullable: false, - readOnly: true, - serializedName: "tagName", - type: { - name: "String" - } - }, - created: { - nullable: false, - readOnly: true, - serializedName: "created", - type: { - name: "DateTime" - } - } - } - } -}; - -export const ImageRegion: msRest.CompositeMapper = { - serializedName: "ImageRegion", - type: { - name: "Composite", - className: "ImageRegion", - modelProperties: { - regionId: { - nullable: false, - readOnly: true, - serializedName: "regionId", - type: { - name: "Uuid" - } - }, - tagName: { - nullable: false, - readOnly: true, - serializedName: "tagName", - type: { - name: "String" - } - }, - created: { - nullable: false, - readOnly: true, - serializedName: "created", - type: { - name: "DateTime" - } - }, - tagId: { - required: true, - nullable: false, - serializedName: "tagId", - type: { - name: "Uuid" - } - }, - left: { - required: true, - nullable: false, - serializedName: "left", - type: { - name: "Number" - } - }, - top: { - required: true, - nullable: false, - serializedName: "top", - type: { - name: "Number" - } - }, - width: { - required: true, - nullable: false, - serializedName: "width", - type: { - name: "Number" - } - }, - height: { - required: true, - nullable: false, - serializedName: "height", - type: { - name: "Number" - } - } - } - } -}; - -export const Image: msRest.CompositeMapper = { - serializedName: "Image", - type: { - name: "Composite", - className: "Image", + className: "Image", modelProperties: { id: { nullable: false, @@ -512,7 +321,6 @@ export const Image: msRest.CompositeMapper = { } }, resizedImageUri: { - nullable: false, readOnly: true, serializedName: "resizedImageUri", type: { @@ -520,7 +328,6 @@ export const Image: msRest.CompositeMapper = { } }, thumbnailUri: { - nullable: false, readOnly: true, serializedName: "thumbnailUri", type: { @@ -528,7 +335,6 @@ export const Image: msRest.CompositeMapper = { } }, originalImageUri: { - nullable: false, readOnly: true, serializedName: "originalImageUri", type: { @@ -590,7 +396,6 @@ export const ImageCreateResult: msRest.CompositeMapper = { } }, image: { - nullable: false, readOnly: true, serializedName: "image", type: { @@ -697,7 +502,6 @@ export const ImageFileCreateEntry: msRest.CompositeMapper = { } }, contents: { - nullable: false, serializedName: "contents", type: { name: "ByteArray" @@ -763,18 +567,17 @@ export const ImageFileCreateBatch: msRest.CompositeMapper = { } }; -export const ImageUrlCreateEntry: msRest.CompositeMapper = { - serializedName: "ImageUrlCreateEntry", +export const ImageIdCreateEntry: msRest.CompositeMapper = { + serializedName: "ImageIdCreateEntry", type: { name: "Composite", - className: "ImageUrlCreateEntry", + className: "ImageIdCreateEntry", modelProperties: { - url: { - required: true, + id: { nullable: false, - serializedName: "url", + serializedName: "id", type: { - name: "String" + name: "Uuid" } }, tagIds: { @@ -804,11 +607,11 @@ export const ImageUrlCreateEntry: msRest.CompositeMapper = { } }; -export const ImageUrlCreateBatch: msRest.CompositeMapper = { - serializedName: "ImageUrlCreateBatch", +export const ImageIdCreateBatch: msRest.CompositeMapper = { + serializedName: "ImageIdCreateBatch", type: { name: "Composite", - className: "ImageUrlCreateBatch", + className: "ImageIdCreateBatch", modelProperties: { images: { serializedName: "images", @@ -817,7 +620,7 @@ export const ImageUrlCreateBatch: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ImageUrlCreateEntry" + className: "ImageIdCreateEntry" } } } @@ -837,242 +640,141 @@ export const ImageUrlCreateBatch: msRest.CompositeMapper = { } }; -export const ImageIdCreateEntry: msRest.CompositeMapper = { - serializedName: "ImageIdCreateEntry", +export const Prediction: msRest.CompositeMapper = { + serializedName: "Prediction", type: { name: "Composite", - className: "ImageIdCreateEntry", + className: "Prediction", modelProperties: { - id: { + probability: { nullable: false, - serializedName: "id", + readOnly: true, + serializedName: "probability", + type: { + name: "Number" + } + }, + tagId: { + nullable: false, + readOnly: true, + serializedName: "tagId", type: { name: "Uuid" } }, - tagIds: { - serializedName: "tagIds", + tagName: { + nullable: true, + readOnly: true, + serializedName: "tagName", type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } + name: "String" } }, - regions: { - serializedName: "regions", + boundingBox: { + nullable: true, + readOnly: true, + serializedName: "boundingBox", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Region" - } - } + name: "Composite", + className: "BoundingBox" } } } } }; -export const ImageIdCreateBatch: msRest.CompositeMapper = { - serializedName: "ImageIdCreateBatch", +export const ImagePerformance: msRest.CompositeMapper = { + serializedName: "ImagePerformance", type: { name: "Composite", - className: "ImageIdCreateBatch", + className: "ImagePerformance", modelProperties: { - images: { - serializedName: "images", + predictions: { + nullable: true, + readOnly: true, + serializedName: "predictions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ImageIdCreateEntry" + className: "Prediction" } } } }, - tagIds: { - serializedName: "tagIds", + id: { + nullable: false, + readOnly: true, + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } - } - } - } - } -}; - -export const BoundingBox: msRest.CompositeMapper = { - serializedName: "BoundingBox", - type: { - name: "Composite", - className: "BoundingBox", - modelProperties: { - left: { - required: true, - nullable: false, - serializedName: "left", - type: { - name: "Number" + name: "Uuid" } }, - top: { - required: true, + created: { nullable: false, - serializedName: "top", + readOnly: true, + serializedName: "created", type: { - name: "Number" + name: "DateTime" } }, width: { - required: true, nullable: false, + readOnly: true, serializedName: "width", type: { name: "Number" } }, height: { - required: true, - nullable: false, - serializedName: "height", - type: { - name: "Number" - } - } - } - } -}; - -export const RegionProposal: msRest.CompositeMapper = { - serializedName: "RegionProposal", - type: { - name: "Composite", - className: "RegionProposal", - modelProperties: { - confidence: { nullable: false, readOnly: true, - serializedName: "confidence", + serializedName: "height", type: { name: "Number" } }, - boundingBox: { - nullable: false, - readOnly: true, - serializedName: "boundingBox", - type: { - name: "Composite", - className: "BoundingBox" - } - } - } - } -}; - -export const ImageRegionProposal: msRest.CompositeMapper = { - serializedName: "ImageRegionProposal", - type: { - name: "Composite", - className: "ImageRegionProposal", - modelProperties: { - projectId: { - nullable: false, + imageUri: { readOnly: true, - serializedName: "projectId", + serializedName: "imageUri", type: { - name: "Uuid" + name: "String" } }, - imageId: { - nullable: false, + thumbnailUri: { readOnly: true, - serializedName: "imageId", + serializedName: "thumbnailUri", type: { - name: "Uuid" + name: "String" } }, - proposals: { + tags: { + nullable: true, readOnly: true, - serializedName: "proposals", + serializedName: "tags", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegionProposal" + className: "ImageTag" } } } - } - } - } -}; - -export const ImageUrl: msRest.CompositeMapper = { - serializedName: "ImageUrl", - type: { - name: "Composite", - className: "ImageUrl", - modelProperties: { - url: { - required: true, - nullable: false, - serializedName: "url", - type: { - name: "String" - } - } - } - } -}; - -export const Prediction: msRest.CompositeMapper = { - serializedName: "Prediction", - type: { - name: "Composite", - className: "Prediction", - modelProperties: { - probability: { - nullable: false, - readOnly: true, - serializedName: "probability", - type: { - name: "Number" - } - }, - tagId: { - nullable: false, - readOnly: true, - serializedName: "tagId", - type: { - name: "Uuid" - } - }, - tagName: { - nullable: true, - readOnly: true, - serializedName: "tagName", - type: { - name: "String" - } }, - boundingBox: { + regions: { nullable: true, readOnly: true, - serializedName: "boundingBox", + serializedName: "regions", type: { - name: "Composite", - className: "BoundingBox" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegion" + } + } } } } @@ -1134,458 +836,977 @@ export const ImagePrediction: msRest.CompositeMapper = { } }; -export const PredictionQueryTag: msRest.CompositeMapper = { - serializedName: "PredictionQueryTag", +export const ImageProcessingSettings: msRest.CompositeMapper = { + serializedName: "ImageProcessingSettings", type: { name: "Composite", - className: "PredictionQueryTag", + className: "ImageProcessingSettings", modelProperties: { - id: { - nullable: false, - readOnly: true, - serializedName: "id", - type: { - name: "Uuid" - } - }, - minThreshold: { - nullable: false, - readOnly: true, - serializedName: "minThreshold", - type: { - name: "Number" - } - }, - maxThreshold: { - nullable: false, - readOnly: true, - serializedName: "maxThreshold", + augmentationMethods: { + nullable: true, + serializedName: "augmentationMethods", type: { - name: "Number" + name: "Dictionary", + value: { + type: { + name: "Boolean" + } + } } } } } }; -export const PredictionQueryToken: msRest.CompositeMapper = { - serializedName: "PredictionQueryToken", +export const ImageRegionCreateEntry: msRest.CompositeMapper = { + serializedName: "ImageRegionCreateEntry", type: { name: "Composite", - className: "PredictionQueryToken", + className: "ImageRegionCreateEntry", modelProperties: { - session: { + imageId: { + required: true, nullable: false, - serializedName: "session", + serializedName: "imageId", type: { - name: "String" + name: "Uuid" } }, - continuation: { + tagId: { + required: true, nullable: false, - serializedName: "continuation", + serializedName: "tagId", type: { - name: "String" + name: "Uuid" } }, - maxCount: { + left: { + required: true, nullable: false, - serializedName: "maxCount", + serializedName: "left", type: { name: "Number" } }, - orderBy: { + top: { + required: true, nullable: false, - serializedName: "orderBy", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PredictionQueryTag" - } - } - } - }, - iterationId: { - nullable: true, - serializedName: "iterationId", - type: { - name: "Uuid" - } - }, - startTime: { - nullable: true, - serializedName: "startTime", + serializedName: "top", type: { - name: "DateTime" + name: "Number" } }, - endTime: { - nullable: true, - serializedName: "endTime", + width: { + required: true, + nullable: false, + serializedName: "width", type: { - name: "DateTime" + name: "Number" } }, - application: { + height: { + required: true, nullable: false, - serializedName: "application", + serializedName: "height", type: { - name: "String" + name: "Number" } } } } }; -export const StoredImagePrediction: msRest.CompositeMapper = { - serializedName: "StoredImagePrediction", +export const ImageRegionCreateBatch: msRest.CompositeMapper = { + serializedName: "ImageRegionCreateBatch", type: { name: "Composite", - className: "StoredImagePrediction", + className: "ImageRegionCreateBatch", modelProperties: { - resizedImageUri: { + regions: { + serializedName: "regions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegionCreateEntry" + } + } + } + } + } + } +}; + +export const ImageRegionCreateResult: msRest.CompositeMapper = { + serializedName: "ImageRegionCreateResult", + type: { + name: "Composite", + className: "ImageRegionCreateResult", + modelProperties: { + imageId: { nullable: false, readOnly: true, - serializedName: "resizedImageUri", + serializedName: "imageId", + type: { + name: "Uuid" + } + }, + regionId: { + nullable: false, + readOnly: true, + serializedName: "regionId", + type: { + name: "Uuid" + } + }, + tagName: { + nullable: false, + readOnly: true, + serializedName: "tagName", + type: { + name: "String" + } + }, + created: { + nullable: false, + readOnly: true, + serializedName: "created", + type: { + name: "DateTime" + } + }, + tagId: { + required: true, + nullable: false, + serializedName: "tagId", + type: { + name: "Uuid" + } + }, + left: { + required: true, + nullable: false, + serializedName: "left", + type: { + name: "Number" + } + }, + top: { + required: true, + nullable: false, + serializedName: "top", + type: { + name: "Number" + } + }, + width: { + required: true, + nullable: false, + serializedName: "width", + type: { + name: "Number" + } + }, + height: { + required: true, + nullable: false, + serializedName: "height", + type: { + name: "Number" + } + } + } + } +}; + +export const ImageRegionCreateSummary: msRest.CompositeMapper = { + serializedName: "ImageRegionCreateSummary", + type: { + name: "Composite", + className: "ImageRegionCreateSummary", + modelProperties: { + created: { + nullable: true, + serializedName: "created", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegionCreateResult" + } + } + } + }, + duplicated: { + nullable: true, + serializedName: "duplicated", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegionCreateEntry" + } + } + } + }, + exceeded: { + nullable: true, + serializedName: "exceeded", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageRegionCreateEntry" + } + } + } + } + } + } +}; + +export const RegionProposal: msRest.CompositeMapper = { + serializedName: "RegionProposal", + type: { + name: "Composite", + className: "RegionProposal", + modelProperties: { + confidence: { + nullable: false, + readOnly: true, + serializedName: "confidence", + type: { + name: "Number" + } + }, + boundingBox: { + readOnly: true, + serializedName: "boundingBox", + type: { + name: "Composite", + className: "BoundingBox" + } + } + } + } +}; + +export const ImageRegionProposal: msRest.CompositeMapper = { + serializedName: "ImageRegionProposal", + type: { + name: "Composite", + className: "ImageRegionProposal", + modelProperties: { + projectId: { + nullable: false, + readOnly: true, + serializedName: "projectId", + type: { + name: "Uuid" + } + }, + imageId: { + nullable: false, + readOnly: true, + serializedName: "imageId", + type: { + name: "Uuid" + } + }, + proposals: { + readOnly: true, + serializedName: "proposals", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionProposal" + } + } + } + } + } + } +}; + +export const ImageTagCreateEntry: msRest.CompositeMapper = { + serializedName: "ImageTagCreateEntry", + type: { + name: "Composite", + className: "ImageTagCreateEntry", + modelProperties: { + imageId: { + nullable: false, + serializedName: "imageId", + type: { + name: "Uuid" + } + }, + tagId: { + nullable: false, + serializedName: "tagId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const ImageTagCreateBatch: msRest.CompositeMapper = { + serializedName: "ImageTagCreateBatch", + type: { + name: "Composite", + className: "ImageTagCreateBatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageTagCreateEntry" + } + } + } + } + } + } +}; + +export const ImageTagCreateSummary: msRest.CompositeMapper = { + serializedName: "ImageTagCreateSummary", + type: { + name: "Composite", + className: "ImageTagCreateSummary", + modelProperties: { + created: { + nullable: true, + serializedName: "created", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageTagCreateEntry" + } + } + } + }, + duplicated: { + nullable: true, + serializedName: "duplicated", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageTagCreateEntry" + } + } + } + }, + exceeded: { + nullable: true, + serializedName: "exceeded", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageTagCreateEntry" + } + } + } + } + } + } +}; + +export const ImageUrl: msRest.CompositeMapper = { + serializedName: "ImageUrl", + type: { + name: "Composite", + className: "ImageUrl", + modelProperties: { + url: { + required: true, + nullable: false, + serializedName: "url", + type: { + name: "String" + } + } + } + } +}; + +export const ImageUrlCreateEntry: msRest.CompositeMapper = { + serializedName: "ImageUrlCreateEntry", + type: { + name: "Composite", + className: "ImageUrlCreateEntry", + modelProperties: { + url: { + required: true, + nullable: false, + serializedName: "url", + type: { + name: "String" + } + }, + tagIds: { + serializedName: "tagIds", + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } + } + }, + regions: { + serializedName: "regions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Region" + } + } + } + } + } + } +}; + +export const ImageUrlCreateBatch: msRest.CompositeMapper = { + serializedName: "ImageUrlCreateBatch", + type: { + name: "Composite", + className: "ImageUrlCreateBatch", + modelProperties: { + images: { + serializedName: "images", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImageUrlCreateEntry" + } + } + } + }, + tagIds: { + serializedName: "tagIds", + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } + } + } + } + } +}; + +export const Iteration: msRest.CompositeMapper = { + serializedName: "Iteration", + type: { + name: "Composite", + className: "Iteration", + modelProperties: { + id: { + nullable: false, + readOnly: true, + serializedName: "id", type: { - name: "String" + name: "Uuid" } }, - thumbnailUri: { + name: { + required: true, nullable: false, - readOnly: true, - serializedName: "thumbnailUri", + serializedName: "name", type: { name: "String" } }, - originalImageUri: { + status: { nullable: false, readOnly: true, - serializedName: "originalImageUri", + serializedName: "status", type: { name: "String" } }, - domain: { + created: { nullable: false, readOnly: true, - serializedName: "domain", + serializedName: "created", type: { - name: "Uuid" + name: "DateTime" } }, - id: { + lastModified: { nullable: false, readOnly: true, - serializedName: "id", + serializedName: "lastModified", type: { - name: "Uuid" + name: "DateTime" } }, - project: { - nullable: false, + trainedAt: { + nullable: true, readOnly: true, - serializedName: "project", + serializedName: "trainedAt", type: { - name: "Uuid" + name: "DateTime" } }, - iteration: { + projectId: { nullable: false, readOnly: true, - serializedName: "iteration", + serializedName: "projectId", type: { name: "Uuid" } }, - created: { + exportable: { nullable: false, readOnly: true, - serializedName: "created", + serializedName: "exportable", type: { - name: "DateTime" + name: "Boolean" } }, - predictions: { + exportableTo: { readOnly: true, - serializedName: "predictions", + serializedName: "exportableTo", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Prediction" + name: "String" } } } + }, + domainId: { + nullable: true, + readOnly: true, + serializedName: "domainId", + type: { + name: "Uuid" + } + }, + classificationType: { + nullable: true, + readOnly: true, + serializedName: "classificationType", + type: { + name: "String" + } + }, + trainingType: { + nullable: false, + readOnly: true, + serializedName: "trainingType", + type: { + name: "String" + } + }, + reservedBudgetInHours: { + nullable: false, + readOnly: true, + serializedName: "reservedBudgetInHours", + type: { + name: "Number" + } + }, + trainingTimeInMinutes: { + nullable: false, + readOnly: true, + serializedName: "trainingTimeInMinutes", + type: { + name: "Number" + } + }, + publishName: { + nullable: false, + readOnly: true, + serializedName: "publishName", + type: { + name: "String" + } + }, + originalPublishResourceId: { + nullable: false, + readOnly: true, + serializedName: "originalPublishResourceId", + type: { + name: "String" + } } } } }; -export const PredictionQueryResult: msRest.CompositeMapper = { - serializedName: "PredictionQueryResult", +export const TagPerformance: msRest.CompositeMapper = { + serializedName: "TagPerformance", type: { name: "Composite", - className: "PredictionQueryResult", + className: "TagPerformance", modelProperties: { - token: { + id: { nullable: false, readOnly: true, - serializedName: "token", + serializedName: "id", type: { - name: "Composite", - className: "PredictionQueryToken" + name: "Uuid" } }, - results: { + name: { + nullable: false, readOnly: true, - serializedName: "results", + serializedName: "name", + type: { + name: "String" + } + }, + precision: { + nullable: false, + readOnly: true, + serializedName: "precision", + type: { + name: "Number" + } + }, + precisionStdDeviation: { + nullable: false, + readOnly: true, + serializedName: "precisionStdDeviation", + type: { + name: "Number" + } + }, + recall: { + nullable: false, + readOnly: true, + serializedName: "recall", + type: { + name: "Number" + } + }, + recallStdDeviation: { + nullable: false, + readOnly: true, + serializedName: "recallStdDeviation", + type: { + name: "Number" + } + }, + averagePrecision: { + nullable: true, + readOnly: true, + serializedName: "averagePrecision", + type: { + name: "Number" + } + } + } + } +}; + +export const IterationPerformance: msRest.CompositeMapper = { + serializedName: "IterationPerformance", + type: { + name: "Composite", + className: "IterationPerformance", + modelProperties: { + perTagPerformance: { + readOnly: true, + serializedName: "perTagPerformance", type: { name: "Sequence", element: { type: { name: "Composite", - className: "StoredImagePrediction" + className: "TagPerformance" } } } + }, + precision: { + nullable: false, + readOnly: true, + serializedName: "precision", + type: { + name: "Number" + } + }, + precisionStdDeviation: { + nullable: false, + readOnly: true, + serializedName: "precisionStdDeviation", + type: { + name: "Number" + } + }, + recall: { + nullable: false, + readOnly: true, + serializedName: "recall", + type: { + name: "Number" + } + }, + recallStdDeviation: { + nullable: false, + readOnly: true, + serializedName: "recallStdDeviation", + type: { + name: "Number" + } + }, + averagePrecision: { + nullable: true, + readOnly: true, + serializedName: "averagePrecision", + type: { + name: "Number" + } } } } }; -export const TagPerformance: msRest.CompositeMapper = { - serializedName: "TagPerformance", +export const PredictionQueryTag: msRest.CompositeMapper = { + serializedName: "PredictionQueryTag", type: { name: "Composite", - className: "TagPerformance", + className: "PredictionQueryTag", modelProperties: { id: { nullable: false, - readOnly: true, serializedName: "id", type: { name: "Uuid" } }, - name: { + minThreshold: { nullable: false, - readOnly: true, - serializedName: "name", + serializedName: "minThreshold", type: { - name: "String" + name: "Number" } }, - precision: { + maxThreshold: { nullable: false, - readOnly: true, - serializedName: "precision", + serializedName: "maxThreshold", type: { name: "Number" } + } + } + } +}; + +export const PredictionQueryToken: msRest.CompositeMapper = { + serializedName: "PredictionQueryToken", + type: { + name: "Composite", + className: "PredictionQueryToken", + modelProperties: { + session: { + nullable: false, + serializedName: "session", + type: { + name: "String" + } }, - precisionStdDeviation: { + continuation: { nullable: false, - readOnly: true, - serializedName: "precisionStdDeviation", + serializedName: "continuation", type: { - name: "Number" + name: "String" } }, - recall: { + maxCount: { nullable: false, - readOnly: true, - serializedName: "recall", + serializedName: "maxCount", type: { name: "Number" } }, - recallStdDeviation: { + orderBy: { nullable: false, - readOnly: true, - serializedName: "recallStdDeviation", + serializedName: "orderBy", type: { - name: "Number" + name: "String" } }, - averagePrecision: { - nullable: true, - readOnly: true, - serializedName: "averagePrecision", - type: { - name: "Number" - } - } - } - } -}; - -export const IterationPerformance: msRest.CompositeMapper = { - serializedName: "IterationPerformance", - type: { - name: "Composite", - className: "IterationPerformance", - modelProperties: { - perTagPerformance: { - readOnly: true, - serializedName: "perTagPerformance", + tags: { + serializedName: "tags", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TagPerformance" + className: "PredictionQueryTag" } } } }, - precision: { - nullable: false, - readOnly: true, - serializedName: "precision", + iterationId: { + nullable: true, + serializedName: "iterationId", type: { - name: "Number" + name: "Uuid" } }, - precisionStdDeviation: { - nullable: false, - readOnly: true, - serializedName: "precisionStdDeviation", + startTime: { + nullable: true, + serializedName: "startTime", type: { - name: "Number" + name: "DateTime" } }, - recall: { - nullable: false, - readOnly: true, - serializedName: "recall", + endTime: { + nullable: true, + serializedName: "endTime", type: { - name: "Number" + name: "DateTime" } }, - recallStdDeviation: { + application: { nullable: false, - readOnly: true, - serializedName: "recallStdDeviation", - type: { - name: "Number" - } - }, - averagePrecision: { - nullable: true, - readOnly: true, - serializedName: "averagePrecision", + serializedName: "application", type: { - name: "Number" + name: "String" } } } } }; -export const ImagePerformance: msRest.CompositeMapper = { - serializedName: "ImagePerformance", +export const StoredImagePrediction: msRest.CompositeMapper = { + serializedName: "StoredImagePrediction", type: { name: "Composite", - className: "ImagePerformance", + className: "StoredImagePrediction", modelProperties: { - predictions: { - nullable: true, + resizedImageUri: { readOnly: true, - serializedName: "predictions", + serializedName: "resizedImageUri", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Prediction" - } - } + name: "String" } }, - id: { - nullable: false, + thumbnailUri: { readOnly: true, - serializedName: "id", + serializedName: "thumbnailUri", type: { - name: "Uuid" + name: "String" } }, - created: { + originalImageUri: { + readOnly: true, + serializedName: "originalImageUri", + type: { + name: "String" + } + }, + domain: { nullable: false, readOnly: true, - serializedName: "created", + serializedName: "domain", type: { - name: "DateTime" + name: "Uuid" } }, - width: { + id: { nullable: false, readOnly: true, - serializedName: "width", + serializedName: "id", type: { - name: "Number" + name: "Uuid" } }, - height: { + project: { nullable: false, readOnly: true, - serializedName: "height", + serializedName: "project", type: { - name: "Number" + name: "Uuid" } }, - imageUri: { + iteration: { nullable: false, readOnly: true, - serializedName: "imageUri", + serializedName: "iteration", type: { - name: "String" + name: "Uuid" } }, - thumbnailUri: { + created: { nullable: false, readOnly: true, - serializedName: "thumbnailUri", + serializedName: "created", type: { - name: "String" + name: "DateTime" } }, - tags: { - nullable: true, + predictions: { readOnly: true, - serializedName: "tags", + serializedName: "predictions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ImageTag" + className: "Prediction" } } } + } + } + } +}; + +export const PredictionQueryResult: msRest.CompositeMapper = { + serializedName: "PredictionQueryResult", + type: { + name: "Composite", + className: "PredictionQueryResult", + modelProperties: { + token: { + serializedName: "token", + type: { + name: "Composite", + className: "PredictionQueryToken" + } }, - regions: { - nullable: true, + results: { readOnly: true, - serializedName: "regions", + serializedName: "results", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ImageRegion" + className: "StoredImagePrediction" } } } @@ -1624,6 +1845,29 @@ export const ProjectSettings: msRest.CompositeMapper = { } } } + }, + useNegativeSet: { + nullable: true, + readOnly: true, + serializedName: "useNegativeSet", + type: { + name: "Boolean" + } + }, + detectionParameters: { + nullable: false, + readOnly: true, + serializedName: "detectionParameters", + type: { + name: "String" + } + }, + imageProcessingSettings: { + serializedName: "imageProcessingSettings", + type: { + name: "Composite", + className: "ImageProcessingSettings" + } } } } @@ -1653,7 +1897,7 @@ export const Project: msRest.CompositeMapper = { }, description: { required: true, - nullable: false, + nullable: true, serializedName: "description", type: { name: "String" @@ -1661,227 +1905,363 @@ export const Project: msRest.CompositeMapper = { }, settings: { required: true, - nullable: false, serializedName: "settings", type: { name: "Composite", className: "ProjectSettings" } }, - created: { + created: { + nullable: false, + readOnly: true, + serializedName: "created", + type: { + name: "DateTime" + } + }, + lastModified: { + nullable: false, + readOnly: true, + serializedName: "lastModified", + type: { + name: "DateTime" + } + }, + thumbnailUri: { + readOnly: true, + serializedName: "thumbnailUri", + type: { + name: "String" + } + }, + drModeEnabled: { + nullable: true, + readOnly: true, + serializedName: "drModeEnabled", + type: { + name: "Boolean" + } + }, + status: { + nullable: false, + serializedName: "status", + type: { + name: "String" + } + } + } + } +}; + +export const ProjectExport: msRest.CompositeMapper = { + serializedName: "ProjectExport", + type: { + name: "Composite", + className: "ProjectExport", + modelProperties: { + iterationCount: { + nullable: false, + readOnly: true, + serializedName: "iterationCount", + type: { + name: "Number" + } + }, + imageCount: { + nullable: false, + readOnly: true, + serializedName: "imageCount", + type: { + name: "Number" + } + }, + tagCount: { nullable: false, readOnly: true, - serializedName: "created", + serializedName: "tagCount", type: { - name: "DateTime" + name: "Number" } }, - lastModified: { + regionCount: { nullable: false, readOnly: true, - serializedName: "lastModified", + serializedName: "regionCount", type: { - name: "DateTime" + name: "Number" } }, - thumbnailUri: { + estimatedImportTimeInMS: { nullable: false, readOnly: true, - serializedName: "thumbnailUri", + serializedName: "estimatedImportTimeInMS", type: { - name: "String" + name: "Number" } }, - drModeEnabled: { - nullable: true, + token: { + nullable: false, readOnly: true, - serializedName: "drModeEnabled", + serializedName: "token", type: { - name: "Boolean" + name: "String" } } } } }; -export const Iteration: msRest.CompositeMapper = { - serializedName: "Iteration", +export const StoredSuggestedTagAndRegion: msRest.CompositeMapper = { + serializedName: "StoredSuggestedTagAndRegion", type: { name: "Composite", - className: "Iteration", + className: "StoredSuggestedTagAndRegion", modelProperties: { - id: { + width: { nullable: false, readOnly: true, - serializedName: "id", + serializedName: "width", type: { - name: "Uuid" + name: "Number" } }, - name: { - required: true, + height: { nullable: false, - serializedName: "name", + readOnly: true, + serializedName: "height", + type: { + name: "Number" + } + }, + resizedImageUri: { + readOnly: true, + serializedName: "resizedImageUri", type: { name: "String" } }, - status: { - nullable: false, + thumbnailUri: { readOnly: true, - serializedName: "status", + serializedName: "thumbnailUri", type: { name: "String" } }, - created: { + originalImageUri: { + readOnly: true, + serializedName: "originalImageUri", + type: { + name: "String" + } + }, + domain: { nullable: false, readOnly: true, - serializedName: "created", + serializedName: "domain", type: { - name: "DateTime" + name: "Uuid" } }, - lastModified: { + id: { nullable: false, readOnly: true, - serializedName: "lastModified", + serializedName: "id", type: { - name: "DateTime" + name: "Uuid" } }, - trainedAt: { - nullable: true, + project: { + nullable: false, readOnly: true, - serializedName: "trainedAt", + serializedName: "project", type: { - name: "DateTime" + name: "Uuid" } }, - projectId: { + iteration: { nullable: false, readOnly: true, - serializedName: "projectId", + serializedName: "iteration", type: { name: "Uuid" } }, - exportable: { + created: { nullable: false, readOnly: true, - serializedName: "exportable", + serializedName: "created", type: { - name: "Boolean" + name: "DateTime" } }, - exportableTo: { + predictions: { readOnly: true, - serializedName: "exportableTo", + serializedName: "predictions", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Prediction" } } } }, - domainId: { - nullable: true, + predictionUncertainty: { + nullable: false, readOnly: true, - serializedName: "domainId", + serializedName: "predictionUncertainty", + type: { + name: "Number" + } + } + } + } +}; + +export const SuggestedTagAndRegion: msRest.CompositeMapper = { + serializedName: "SuggestedTagAndRegion", + type: { + name: "Composite", + className: "SuggestedTagAndRegion", + modelProperties: { + id: { + nullable: false, + readOnly: true, + serializedName: "id", type: { name: "Uuid" } }, - classificationType: { - nullable: true, + project: { + nullable: false, readOnly: true, - serializedName: "classificationType", + serializedName: "project", type: { - name: "String" + name: "Uuid" } }, - trainingType: { + iteration: { nullable: false, readOnly: true, - serializedName: "trainingType", + serializedName: "iteration", type: { - name: "String" + name: "Uuid" } }, - reservedBudgetInHours: { + created: { nullable: false, readOnly: true, - serializedName: "reservedBudgetInHours", + serializedName: "created", type: { - name: "Number" + name: "DateTime" } }, - publishName: { - nullable: true, + predictions: { readOnly: true, - serializedName: "publishName", + serializedName: "predictions", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Prediction" + } + } } }, - originalPublishResourceId: { - nullable: true, + predictionUncertainty: { + nullable: false, readOnly: true, - serializedName: "originalPublishResourceId", + serializedName: "predictionUncertainty", type: { - name: "String" + name: "Number" } } } } }; -export const ExportModel: msRest.CompositeMapper = { - serializedName: "Export", +export const SuggestedTagAndRegionQueryToken: msRest.CompositeMapper = { + serializedName: "SuggestedTagAndRegionQueryToken", type: { name: "Composite", - className: "ExportModel", + className: "SuggestedTagAndRegionQueryToken", modelProperties: { - platform: { + tagIds: { + serializedName: "tagIds", + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } + } + }, + threshold: { nullable: false, - readOnly: true, - serializedName: "platform", + serializedName: "threshold", type: { - name: "String" + name: "Number" } }, - status: { + session: { nullable: false, - readOnly: true, - serializedName: "status", + serializedName: "session", type: { name: "String" } }, - downloadUri: { + continuation: { nullable: false, - readOnly: true, - serializedName: "downloadUri", + serializedName: "continuation", type: { name: "String" } }, - flavor: { - nullable: true, - readOnly: true, - serializedName: "flavor", + maxCount: { + nullable: false, + serializedName: "maxCount", type: { - name: "String" + name: "Number" } }, - newerVersionAvailable: { + sortBy: { nullable: false, + serializedName: "sortBy", + type: { + name: "String" + } + } + } + } +}; + +export const SuggestedTagAndRegionQuery: msRest.CompositeMapper = { + serializedName: "SuggestedTagAndRegionQuery", + type: { + name: "Composite", + className: "SuggestedTagAndRegionQuery", + modelProperties: { + token: { + serializedName: "token", + type: { + name: "Composite", + className: "SuggestedTagAndRegionQueryToken" + } + }, + results: { readOnly: true, - serializedName: "newerVersionAvailable", + serializedName: "results", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StoredSuggestedTagAndRegion" + } + } } } } @@ -1912,7 +2292,7 @@ export const Tag: msRest.CompositeMapper = { }, description: { required: true, - nullable: false, + nullable: true, serializedName: "description", type: { name: "String" @@ -1938,24 +2318,49 @@ export const Tag: msRest.CompositeMapper = { } }; -export const CustomVisionError: msRest.CompositeMapper = { - serializedName: "CustomVisionError", +export const TagFilter: msRest.CompositeMapper = { + serializedName: "TagFilter", type: { name: "Composite", - className: "CustomVisionError", + className: "TagFilter", modelProperties: { - code: { - required: true, - serializedName: "code", + tagIds: { + serializedName: "tagIds", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } } }, - message: { - required: true, - serializedName: "message", + threshold: { + nullable: false, + serializedName: "threshold", type: { - name: "String" + name: "Number" + } + } + } + } +}; + +export const TrainingParameters: msRest.CompositeMapper = { + serializedName: "TrainingParameters", + type: { + name: "Composite", + className: "TrainingParameters", + modelProperties: { + selectedTags: { + serializedName: "selectedTags", + type: { + name: "Sequence", + element: { + type: { + name: "Uuid" + } + } } } } diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/parameters.ts b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/parameters.ts index 0d0ccc1d1535..7b44813192d1 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/parameters.ts +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/models/parameters.ts @@ -10,13 +10,27 @@ import * as msRest from "@azure/ms-rest-js"; -export const apiKey: msRest.OperationParameter = { - parameterPath: "apiKey", +export const allImages: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "allImages" + ], mapper: { - required: true, - serializedName: "Training-Key", + serializedName: "allImages", type: { - name: "String" + name: "Boolean" + } + } +}; +export const allIterations: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "allIterations" + ], + mapper: { + serializedName: "allIterations", + type: { + name: "Boolean" } } }; @@ -144,26 +158,6 @@ export const imageId: msRest.OperationURLParameter = { } }; export const imageIds0: msRest.OperationQueryParameter = { - parameterPath: "imageIds", - mapper: { - required: true, - serializedName: "imageIds", - constraints: { - MaxItems: 64, - MinItems: 0 - }, - type: { - name: "Sequence", - element: { - type: { - name: "Uuid" - } - } - } - }, - collectionFormat: msRest.QueryCollectionFormat.Csv -}; -export const imageIds1: msRest.OperationQueryParameter = { parameterPath: [ "options", "imageIds" @@ -185,13 +179,13 @@ export const imageIds1: msRest.OperationQueryParameter = { }, collectionFormat: msRest.QueryCollectionFormat.Csv }; -export const imageIds2: msRest.OperationQueryParameter = { +export const imageIds1: msRest.OperationQueryParameter = { parameterPath: "imageIds", mapper: { required: true, serializedName: "imageIds", constraints: { - MaxItems: 256, + MaxItems: 64, MinItems: 0 }, type: { @@ -217,7 +211,7 @@ export const iterationId0: msRest.OperationQueryParameter = { } } }; -export const iterationId1: msRest.OperationURLParameter = { +export const iterationId1: msRest.OperationQueryParameter = { parameterPath: "iterationId", mapper: { required: true, @@ -359,6 +353,19 @@ export const skip: msRest.OperationQueryParameter = { } } }; +export const store: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "store" + ], + mapper: { + serializedName: "store", + defaultValue: true, + type: { + name: "Boolean" + } + } +}; export const tagId: msRest.OperationURLParameter = { parameterPath: "tagId", mapper: { @@ -376,6 +383,10 @@ export const tagIds0: msRest.OperationQueryParameter = { ], mapper: { serializedName: "tagIds", + constraints: { + MaxItems: 20, + MinItems: 0 + }, type: { name: "Sequence", element: { @@ -388,14 +399,12 @@ export const tagIds0: msRest.OperationQueryParameter = { collectionFormat: msRest.QueryCollectionFormat.Csv }; export const tagIds1: msRest.OperationQueryParameter = { - parameterPath: "tagIds", + parameterPath: [ + "options", + "tagIds" + ], mapper: { - required: true, serializedName: "tagIds", - constraints: { - MaxItems: 20, - MinItems: 0 - }, type: { name: "Sequence", element: { @@ -408,11 +417,9 @@ export const tagIds1: msRest.OperationQueryParameter = { collectionFormat: msRest.QueryCollectionFormat.Csv }; export const tagIds2: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "tagIds" - ], + parameterPath: "tagIds", mapper: { + required: true, serializedName: "tagIds", constraints: { MaxItems: 20, @@ -476,6 +483,16 @@ export const threshold: msRest.OperationQueryParameter = { } } }; +export const token: msRest.OperationQueryParameter = { + parameterPath: "token", + mapper: { + required: true, + serializedName: "token", + type: { + name: "String" + } + } +}; export const trainingType: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClient.ts b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClient.ts index 48c05b3a31d7..e088920ee5de 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClient.ts +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClient.ts @@ -17,12 +17,12 @@ import { TrainingAPIClientContext } from "./trainingAPIClientContext"; class TrainingAPIClient extends TrainingAPIClientContext { /** * Initializes a new instance of the TrainingAPIClient class. - * @param apiKey API key. * @param endpoint Supported Cognitive Services endpoints. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ - constructor(apiKey: string, endpoint: string, options?: msRest.ServiceClientOptions) { - super(apiKey, endpoint, options); + constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { + super(credentials, endpoint, options); } /** @@ -78,908 +78,744 @@ class TrainingAPIClient extends TrainingAPIClientContext { } /** - * 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 Gets the number of images tagged with the provided {tagIds}. - * @param projectId The project id. + * @summary Get your projects. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams): Promise; + getProjects(options?: msRest.RequestOptionsBase): Promise; /** - * @param projectId The project id. * @param callback The callback */ - getTaggedImageCount(projectId: string, callback: msRest.ServiceCallback): void; + getProjects(callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ - getTaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetTaggedImageCountOptionalParams, callback: msRest.ServiceCallback): void; - getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProjects(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getProjects(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { - projectId, options }, - getTaggedImageCountOperationSpec, - callback) as Promise; + getProjectsOperationSpec, + callback) as Promise; } /** - * 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. - * @summary Gets the number of untagged images. - * @param projectId The project id. + * @summary Create a project. + * @param name Name of the project. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams): Promise; + createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams): Promise; /** - * @param projectId The project id. + * @param name Name of the project. * @param callback The callback */ - getUntaggedImageCount(projectId: string, callback: msRest.ServiceCallback): void; + createProject(name: string, callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. + * @param name Name of the project. * @param options The optional parameters * @param callback The callback */ - getUntaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams, callback: msRest.ServiceCallback): void; - getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createProject(name: string, options: Models.TrainingAPIClientCreateProjectOptionalParams, callback: msRest.ServiceCallback): void; + createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { - projectId, + name, options }, - getUntaggedImageCountOperationSpec, - callback) as Promise; + createProjectOperationSpec, + callback) as Promise; } /** - * @summary Associate a set of images with a set of tags. - * @param projectId The project id. - * @param batch Batch of image tags. Limited to 128 tags per batch. + * @summary Get a specific project. + * @param projectId The id of the project to get. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase): Promise; + getProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param projectId The project id. - * @param batch Batch of image tags. Limited to 128 tags per batch. + * @param projectId The id of the project to get. * @param callback The callback */ - createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, callback: msRest.ServiceCallback): void; + getProject(projectId: string, callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. - * @param batch Batch of image tags. Limited to 128 tags per batch. + * @param projectId The id of the project to get. * @param options The optional parameters * @param callback The callback */ - createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProject(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - batch, options }, - createImageTagsOperationSpec, - callback) as Promise; + getProjectOperationSpec, + callback) as Promise; } /** - * @summary Remove a set of tags from a set of images. + * @summary Delete a specific project. * @param projectId The project id. - * @param imageIds Image ids. Limited to 64 images. - * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param [options] The optional parameters * @returns Promise */ - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase): Promise; + deleteProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param imageIds Image ids. Limited to 64 images. - * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param callback The callback */ - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: msRest.ServiceCallback): void; + deleteProject(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param imageIds Image ids. Limited to 64 images. - * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param options The optional parameters * @param callback The callback */ - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteProject(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageIds, - tagIds, options }, - deleteImageTagsOperationSpec, + deleteProjectOperationSpec, callback); } /** - * 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 Create a set of image regions. - * @param projectId The project id. - * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. + * @summary Update a specific project. + * @param projectId The id of the project to update. + * @param updatedProject The updated project model. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase): Promise; + updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase): Promise; /** - * @param projectId The project id. - * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. + * @param projectId The id of the project to update. + * @param updatedProject The updated project model. * @param callback The callback */ - createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, callback: msRest.ServiceCallback): void; + updateProject(projectId: string, updatedProject: Models.Project, callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. - * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. + * @param projectId The id of the project to update. + * @param updatedProject The updated project model. * @param options The optional parameters * @param callback The callback */ - createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + updateProject(projectId: string, updatedProject: Models.Project, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - batch, + updatedProject, options }, - createImageRegionsOperationSpec, - callback) as Promise; + updateProjectOperationSpec, + callback) as Promise; } /** - * @summary Delete a set of image regions. - * @param projectId The project id. - * @param regionIds Regions to delete. Limited to 64. + * @summary Exports a project. + * @param projectId The project id of the project to export. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase): Promise; + exportProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param projectId The project id. - * @param regionIds Regions to delete. Limited to 64. + * @param projectId The project id of the project to export. * @param callback The callback */ - deleteImageRegions(projectId: string, regionIds: string[], callback: msRest.ServiceCallback): void; + exportProject(projectId: string, callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. - * @param regionIds Regions to delete. Limited to 64. + * @param projectId The project id of the project to export. * @param options The optional parameters * @param callback The callback */ - deleteImageRegions(projectId: string, regionIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + exportProject(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + exportProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - regionIds, options }, - deleteImageRegionsOperationSpec, - callback); + exportProjectOperationSpec, + callback) as Promise; } /** - * 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 Get tagged images for a given project iteration. + * 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 Add the provided images to the set of training images. * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams): Promise; + createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams): Promise; /** * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. * @param callback The callback */ - getTaggedImages(projectId: string, callback: msRest.ServiceCallback): void; + createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. * @param options The optional parameters * @param callback The callback */ - getTaggedImages(projectId: string, options: Models.TrainingAPIClientGetTaggedImagesOptionalParams, callback: msRest.ServiceCallback): void; - getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options: Models.TrainingAPIClientCreateImagesFromDataOptionalParams, callback: msRest.ServiceCallback): void; + createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, + imageData, options }, - getTaggedImagesOperationSpec, - callback) as Promise; + createImagesFromDataOperationSpec, + callback) as Promise; } /** - * 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. - * @summary Get untagged images for a given project iteration. + * @summary Delete images from the set of training images. * @param projectId The project id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams): Promise; + deleteImages(projectId: string, options?: Models.TrainingAPIClientDeleteImagesOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ - getUntaggedImages(projectId: string, callback: msRest.ServiceCallback): void; + deleteImages(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ - getUntaggedImages(projectId: string, options: Models.TrainingAPIClientGetUntaggedImagesOptionalParams, callback: msRest.ServiceCallback): void; - getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteImages(projectId: string, options: Models.TrainingAPIClientDeleteImagesOptionalParams, callback: msRest.ServiceCallback): void; + deleteImages(projectId: string, options?: Models.TrainingAPIClientDeleteImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, options }, - getUntaggedImagesOperationSpec, - callback) as Promise; + deleteImagesOperationSpec, + callback); } /** - * 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. - * @summary Get images by id for a given project iteration. + * 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. + * @summary Get region proposals for an image. Returns empty array if no proposals are found. * @param projectId The project id. + * @param imageId The image id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams): Promise; + getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. + * @param imageId The image id. * @param callback The callback */ - getImagesByIds(projectId: string, callback: msRest.ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. + * @param imageId The image id. * @param options The optional parameters * @param callback The callback */ - getImagesByIds(projectId: string, options: Models.TrainingAPIClientGetImagesByIdsOptionalParams, callback: msRest.ServiceCallback): void; - getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getImageRegionProposals(projectId: string, imageId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, + imageId, options }, - getImagesByIdsOperationSpec, - callback) as Promise; + getImageRegionProposalsOperationSpec, + callback) as Promise; } /** - * 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 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. + * @summary Add the provided batch of images to the set of training images. * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. + * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams): Promise; + createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. + * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. * @param callback The callback */ - createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, callback: msRest.ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. + * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. * @param options The optional parameters * @param callback The callback */ - createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options: Models.TrainingAPIClientCreateImagesFromDataOptionalParams, callback: msRest.ServiceCallback): void; - createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageData, + batch, options }, - createImagesFromDataOperationSpec, - callback) as Promise; + createImagesFromFilesOperationSpec, + callback) as Promise; } /** - * @summary Delete images from the set of training images. + * 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. + * @summary Get images by id for a given project iteration. * @param projectId The project id. - * @param imageIds Ids of the images to be deleted. Limited to 256 images per batch. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteImages(projectId: string, imageIds: string[], options?: msRest.RequestOptionsBase): Promise; + getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams): Promise; /** * @param projectId The project id. - * @param imageIds Ids of the images to be deleted. Limited to 256 images per batch. * @param callback The callback */ - deleteImages(projectId: string, imageIds: string[], callback: msRest.ServiceCallback): void; + getImagesByIds(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param imageIds Ids of the images to be deleted. Limited to 256 images per batch. * @param options The optional parameters * @param callback The callback */ - deleteImages(projectId: string, imageIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteImages(projectId: string, imageIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getImagesByIds(projectId: string, options: Models.TrainingAPIClientGetImagesByIdsOptionalParams, callback: msRest.ServiceCallback): void; + getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageIds, options }, - deleteImagesOperationSpec, - callback); + getImagesByIdsOperationSpec, + callback) as Promise; } /** - * This API accepts a batch of files, and optionally tags, to create images. There is a limit of 64 + * This API creates a batch of images from predicted images specified. There is a limit of 64 * images and 20 tags. - * @summary Add the provided batch of images to the set of training images. + * @summary Add the specified predicted images to the set of training images. * @param projectId The project id. - * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. + * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase): Promise; + createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. + * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. * @param callback The callback */ - createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, callback: msRest.ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch. + * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. * @param options The optional parameters * @param callback The callback */ - createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, batch, options }, - createImagesFromFilesOperationSpec, - callback) as Promise; + createImagesFromPredictionsOperationSpec, + callback) as Promise; } /** - * This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64 - * images and 20 tags. - * @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. + * @summary Create a set of image regions. * @param projectId The project id. - * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. + * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase): Promise; + createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. + * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. * @param callback The callback */ - createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, callback: msRest.ServiceCallback): void; + createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. + * @param batch Batch of image regions which include a tag and bounding box. Limited to 64. * @param options The optional parameters * @param callback The callback */ - createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, batch, options }, - createImagesFromUrlsOperationSpec, - callback) as Promise; + createImageRegionsOperationSpec, + callback) as Promise; } /** - * This API creates a batch of images from predicted images specified. There is a limit of 64 - * images and 20 tags. - * @summary Add the specified predicted images to the set of training images. + * @summary Delete a set of image regions. * @param projectId The project id. - * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. + * @param regionIds Regions to delete. Limited to 64. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase): Promise; + deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. + * @param regionIds Regions to delete. Limited to 64. * @param callback The callback */ - createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, callback: msRest.ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch. + * @param regionIds Regions to delete. Limited to 64. * @param options The optional parameters * @param callback The callback */ - createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteImageRegions(projectId: string, regionIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - batch, + regionIds, options }, - createImagesFromPredictionsOperationSpec, - callback) as Promise; + deleteImageRegionsOperationSpec, + 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. - * @summary Get region proposals for an image. Returns empty array if no proposals are found. + * This API will fetch untagged images filtered by suggested tags Ids. It returns an empty array if + * no images are found. + * @summary Get untagged images whose suggested tags match given tags. Returns empty array if no + * images are found. * @param projectId The project id. - * @param imageId The image id. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Contains properties we need to query suggested images. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase): Promise; + querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param imageId The image id. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Contains properties we need to query suggested images. * @param callback The callback */ - getImageRegionProposals(projectId: string, imageId: string, callback: msRest.ServiceCallback): void; + querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param imageId The image id. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Contains properties we need to query suggested images. * @param options The optional parameters * @param callback The callback */ - getImageRegionProposals(projectId: string, imageId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageId, + iterationId, + query, options }, - getImageRegionProposalsOperationSpec, - callback) as Promise; + querySuggestedImagesOperationSpec, + callback) as Promise; } /** - * @summary Delete a set of predicted images and their associated prediction results. + * This API takes in tagIds to get count of untagged images per suggested tags for a given + * threshold. + * @summary Get count of images whose suggested tags match given tags and their probabilities are + * greater than or equal to the given threshold. Returns count as 0 if none found. * @param projectId The project id. - * @param ids The prediction ids. Limited to 64. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Model that contains tagIds, threshold and projectType to query by. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase): Promise; + querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param ids The prediction ids. Limited to 64. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Model that contains tagIds, threshold and projectType to query by. * @param callback The callback */ - deletePrediction(projectId: string, ids: string[], callback: msRest.ServiceCallback): void; + querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, callback: msRest.ServiceCallback<{ [propertyName: string]: number }>): void; /** * @param projectId The project id. - * @param ids The prediction ids. Limited to 64. + * @param iterationId IterationId to use for the suggested tags and regions. + * @param query Model that contains tagIds, threshold and projectType to query by. * @param options The optional parameters * @param callback The callback */ - deletePrediction(projectId: string, ids: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<{ [propertyName: string]: number }>): void; + querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<{ [propertyName: string]: number }>, callback?: msRest.ServiceCallback<{ [propertyName: string]: number }>): Promise { return this.sendOperationRequest( { projectId, - ids, + iterationId, + query, options }, - deletePredictionOperationSpec, - callback); + querySuggestedImageCountOperationSpec, + callback) as Promise; } /** - * @summary Quick test an image url. - * @param projectId The project to evaluate against. - * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * 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 Get tagged images for a given project iteration. + * @param projectId The project id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams): Promise; + getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams): Promise; /** - * @param projectId The project to evaluate against. - * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * @param projectId The project id. * @param callback The callback */ - quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, callback: msRest.ServiceCallback): void; + getTaggedImages(projectId: string, callback: msRest.ServiceCallback): void; /** - * @param projectId The project to evaluate against. - * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ - quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options: Models.TrainingAPIClientQuickTestImageUrlOptionalParams, callback: msRest.ServiceCallback): void; - quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getTaggedImages(projectId: string, options: Models.TrainingAPIClientGetTaggedImagesOptionalParams, callback: msRest.ServiceCallback): void; + getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageUrl, options }, - quickTestImageUrlOperationSpec, - callback) as Promise; + getTaggedImagesOperationSpec, + callback) as Promise; } /** - * @summary Quick test an image. + * 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 Gets the number of images tagged with the provided {tagIds}. * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams): Promise; + getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams): Promise; /** * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. * @param callback The callback */ - quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, callback: msRest.ServiceCallback): void; + getTaggedImageCount(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports - * images up to 6MB. * @param options The optional parameters * @param callback The callback */ - quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options: Models.TrainingAPIClientQuickTestImageOptionalParams, callback: msRest.ServiceCallback): void; - quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getTaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetTaggedImageCountOptionalParams, callback: msRest.ServiceCallback): void; + getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - imageData, options }, - quickTestImageOperationSpec, - callback) as Promise; + getTaggedImageCountOperationSpec, + callback) as Promise; } /** - * @summary Get images that were sent to your prediction endpoint. + * @summary Associate a set of images with a set of tags. * @param projectId The project id. - * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param batch Batch of image tags. Limited to 128 tags per batch. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase): Promise; + createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. - * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param batch Batch of image tags. Limited to 128 tags per batch. * @param callback The callback */ - queryPredictions(projectId: string, query: Models.PredictionQueryToken, callback: msRest.ServiceCallback): void; + createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param batch Batch of image tags. Limited to 128 tags per batch. * @param options The optional parameters * @param callback The callback */ - queryPredictions(projectId: string, query: Models.PredictionQueryToken, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - query, + batch, options }, - queryPredictionsOperationSpec, - callback) as Promise; + createImageTagsOperationSpec, + callback) as Promise; } /** - * @summary Get detailed performance information about an iteration. - * @param projectId The id of the project the iteration belongs to. - * @param iterationId The id of the iteration to get. + * @summary Remove a set of tags from a set of images. + * @param projectId The project id. + * @param imageIds Image ids. Limited to 64 images. + * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams): Promise; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase): Promise; /** - * @param projectId The id of the project the iteration belongs to. - * @param iterationId The id of the iteration to get. + * @param projectId The project id. + * @param imageIds Image ids. Limited to 64 images. + * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param callback The callback */ - getIterationPerformance(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], callback: msRest.ServiceCallback): void; /** - * @param projectId The id of the project the iteration belongs to. - * @param iterationId The id of the iteration to get. + * @param projectId The project id. + * @param imageIds Image ids. Limited to 64 images. + * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags. * @param options The optional parameters * @param callback The callback */ - getIterationPerformance(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetIterationPerformanceOptionalParams, callback: msRest.ServiceCallback): void; - getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - iterationId, + imageIds, + tagIds, options }, - getIterationPerformanceOperationSpec, - callback) as Promise; + deleteImageTagsOperationSpec, + callback); } /** * 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 Get image with its prediction for a given project iteration. + * @summary Get untagged images for a given project iteration. * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams): Promise; + getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams): Promise; /** * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. * @param callback The callback */ - getImagePerformances(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + getUntaggedImages(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. * @param options The optional parameters * @param callback The callback */ - getImagePerformances(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetImagePerformancesOptionalParams, callback: msRest.ServiceCallback): void; - getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getUntaggedImages(projectId: string, options: Models.TrainingAPIClientGetUntaggedImagesOptionalParams, callback: msRest.ServiceCallback): void; + getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - iterationId, options }, - getImagePerformancesOperationSpec, - callback) as Promise; + getUntaggedImagesOperationSpec, + callback) as Promise; } /** - * 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 Gets the number of images tagged with the provided {tagIds} that have prediction - * results from - * training for the provided iteration {iterationId}. - * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. - * @param [options] The optional parameters - * @returns Promise - */ - getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams): Promise; - /** - * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. - * @param callback The callback - */ - getImagePerformanceCount(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; - /** - * @param projectId The project id. - * @param iterationId The iteration id. Defaults to workspace. - * @param options The optional parameters - * @param callback The callback - */ - getImagePerformanceCount(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams, callback: msRest.ServiceCallback): void; - getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - projectId, - iterationId, - options - }, - getImagePerformanceCountOperationSpec, - callback) as Promise; - } - - /** - * @summary Get your projects. - * @param [options] The optional parameters - * @returns Promise - */ - getProjects(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - getProjects(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - getProjects(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getProjects(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - options - }, - getProjectsOperationSpec, - callback) as Promise; - } - - /** - * @summary Create a project. - * @param name Name of the project. - * @param [options] The optional parameters - * @returns Promise - */ - createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams): Promise; - /** - * @param name Name of the project. - * @param callback The callback - */ - createProject(name: string, callback: msRest.ServiceCallback): void; - /** - * @param name Name of the project. - * @param options The optional parameters - * @param callback The callback - */ - createProject(name: string, options: Models.TrainingAPIClientCreateProjectOptionalParams, callback: msRest.ServiceCallback): void; - createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - name, - options - }, - createProjectOperationSpec, - callback) as Promise; - } - - /** - * @summary Get a specific project. - * @param projectId The id of the project to get. - * @param [options] The optional parameters - * @returns Promise - */ - getProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param projectId The id of the project to get. - * @param callback The callback - */ - getProject(projectId: string, callback: msRest.ServiceCallback): void; - /** - * @param projectId The id of the project to get. - * @param options The optional parameters - * @param callback The callback - */ - getProject(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - projectId, - options - }, - getProjectOperationSpec, - callback) as Promise; - } - - /** - * @summary Delete a specific project. + * 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. + * @summary Gets the number of untagged images. * @param projectId The project id. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; + getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ - deleteProject(projectId: string, callback: msRest.ServiceCallback): void; + getUntaggedImageCount(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ - deleteProject(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - projectId, - options - }, - deleteProjectOperationSpec, - callback); - } - - /** - * @summary Update a specific project. - * @param projectId The id of the project to update. - * @param updatedProject The updated project model. - * @param [options] The optional parameters - * @returns Promise - */ - updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase): Promise; - /** - * @param projectId The id of the project to update. - * @param updatedProject The updated project model. - * @param callback The callback - */ - updateProject(projectId: string, updatedProject: Models.Project, callback: msRest.ServiceCallback): void; - /** - * @param projectId The id of the project to update. - * @param updatedProject The updated project model. - * @param options The optional parameters - * @param callback The callback - */ - updateProject(projectId: string, updatedProject: Models.Project, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getUntaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams, callback: msRest.ServiceCallback): void; + getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - updatedProject, options }, - updateProjectOperationSpec, - callback) as Promise; + getUntaggedImageCountOperationSpec, + callback) as Promise; } /** - * @summary Queues project for training. + * This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64 + * images and 20 tags. + * @summary Add the provided images urls to the set of training images. * @param projectId The project id. + * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams): Promise; + createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. + * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. * @param callback The callback */ - trainProject(projectId: string, callback: msRest.ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. + * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch. * @param options The optional parameters * @param callback The callback */ - trainProject(projectId: string, options: Models.TrainingAPIClientTrainProjectOptionalParams, callback: msRest.ServiceCallback): void; - trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, + batch, options }, - trainProjectOperationSpec, - callback) as Promise; + createImagesFromUrlsOperationSpec, + callback) as Promise; } /** @@ -1111,146 +947,444 @@ class TrainingAPIClient extends TrainingAPIClientContext { } /** - * @summary Publish a specific iteration. + * @summary Get the list of exports for a specific iteration. * @param projectId The project id. * @param iterationId The iteration id. - * @param publishName The name to give the published iteration. - * @param predictionId The id of the prediction resource to publish to. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: msRest.RequestOptionsBase): Promise; + getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param iterationId The iteration id. - * @param publishName The name to give the published iteration. - * @param predictionId The id of the prediction resource to publish to. * @param callback The callback */ - publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, callback: msRest.ServiceCallback): void; + getExports(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param iterationId The iteration id. - * @param publishName The name to give the published iteration. - * @param predictionId The id of the prediction resource to publish to. * @param options The optional parameters * @param callback The callback */ - publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getExports(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, - publishName, - predictionId, options }, - publishIterationOperationSpec, - callback) as Promise; + getExportsOperationSpec, + callback) as Promise; } /** - * @summary Unpublish a specific iteration. + * @summary Export a trained iteration. * @param projectId The project id. * @param iterationId The iteration id. + * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', + * 'DockerFile', 'ONNX', 'VAIDK' * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; + exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams): Promise; /** * @param projectId The project id. * @param iterationId The iteration id. + * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', + * 'DockerFile', 'ONNX', 'VAIDK' * @param callback The callback */ - unpublishIteration(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + exportIteration(projectId: string, iterationId: string, platform: Models.Platform, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param iterationId The iteration id. + * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', + * 'DockerFile', 'ONNX', 'VAIDK' * @param options The optional parameters * @param callback The callback */ - unpublishIteration(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options: Models.TrainingAPIClientExportIterationOptionalParams, callback: msRest.ServiceCallback): void; + exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, + platform, options }, - unpublishIterationOperationSpec, - callback); + exportIterationOperationSpec, + callback) as Promise; } /** - * @summary Get the list of exports for a specific iteration. - * @param projectId The project id. - * @param iterationId The iteration id. + * @summary Get detailed performance information about an iteration. + * @param projectId The id of the project the iteration belongs to. + * @param iterationId The id of the iteration to get. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; + getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams): Promise; /** - * @param projectId The project id. - * @param iterationId The iteration id. + * @param projectId The id of the project the iteration belongs to. + * @param iterationId The id of the iteration to get. * @param callback The callback */ - getExports(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; /** - * @param projectId The project id. - * @param iterationId The iteration id. + * @param projectId The id of the project the iteration belongs to. + * @param iterationId The id of the iteration to get. * @param options The optional parameters * @param callback The callback */ - getExports(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getIterationPerformance(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetIterationPerformanceOptionalParams, callback: msRest.ServiceCallback): void; + getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, options }, - getExportsOperationSpec, - callback) as Promise; + getIterationPerformanceOperationSpec, + callback) as Promise; } /** - * @summary Export a trained 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 Get image with its prediction for a given project iteration. + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param [options] The optional parameters + * @returns Promise + */ + getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams): Promise; + /** + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param callback The callback + */ + getImagePerformances(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param options The optional parameters + * @param callback The callback + */ + getImagePerformances(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetImagePerformancesOptionalParams, callback: msRest.ServiceCallback): void; + getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + iterationId, + options + }, + getImagePerformancesOperationSpec, + callback) as Promise; + } + + /** + * 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 Gets the number of images tagged with the provided {tagIds} that have prediction + * results from + * training for the provided iteration {iterationId}. + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param [options] The optional parameters + * @returns Promise + */ + getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams): Promise; + /** + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param callback The callback + */ + getImagePerformanceCount(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param iterationId The iteration id. Defaults to workspace. + * @param options The optional parameters + * @param callback The callback + */ + getImagePerformanceCount(projectId: string, iterationId: string, options: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams, callback: msRest.ServiceCallback): void; + getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + iterationId, + options + }, + getImagePerformanceCountOperationSpec, + callback) as Promise; + } + + /** + * @summary Publish a specific iteration. * @param projectId The project id. * @param iterationId The iteration id. - * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', - * 'DockerFile', 'ONNX', 'VAIDK' + * @param publishName The name to give the published iteration. + * @param predictionId The id of the prediction resource to publish to. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams): Promise; + publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param iterationId The iteration id. - * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', - * 'DockerFile', 'ONNX', 'VAIDK' + * @param publishName The name to give the published iteration. + * @param predictionId The id of the prediction resource to publish to. * @param callback The callback */ - exportIteration(projectId: string, iterationId: string, platform: Models.Platform, callback: msRest.ServiceCallback): void; + publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param iterationId The iteration id. - * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', - * 'DockerFile', 'ONNX', 'VAIDK' + * @param publishName The name to give the published iteration. + * @param predictionId The id of the prediction resource to publish to. * @param options The optional parameters * @param callback The callback */ - exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options: Models.TrainingAPIClientExportIterationOptionalParams, callback: msRest.ServiceCallback): void; - exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, - platform, + publishName, + predictionId, options }, - exportIterationOperationSpec, - callback) as Promise; + publishIterationOperationSpec, + callback) as Promise; + } + + /** + * @summary Unpublish a specific iteration. + * @param projectId The project id. + * @param iterationId The iteration id. + * @param [options] The optional parameters + * @returns Promise + */ + unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param projectId The project id. + * @param iterationId The iteration id. + * @param callback The callback + */ + unpublishIteration(projectId: string, iterationId: string, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param iterationId The iteration id. + * @param options The optional parameters + * @param callback The callback + */ + unpublishIteration(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + iterationId, + options + }, + unpublishIterationOperationSpec, + callback); + } + + /** + * @summary Delete a set of predicted images and their associated prediction results. + * @param projectId The project id. + * @param ids The prediction ids. Limited to 64. + * @param [options] The optional parameters + * @returns Promise + */ + deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param projectId The project id. + * @param ids The prediction ids. Limited to 64. + * @param callback The callback + */ + deletePrediction(projectId: string, ids: string[], callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param ids The prediction ids. Limited to 64. + * @param options The optional parameters + * @param callback The callback + */ + deletePrediction(projectId: string, ids: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + ids, + options + }, + deletePredictionOperationSpec, + callback); + } + + /** + * @summary Get images that were sent to your prediction endpoint. + * @param projectId The project id. + * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param [options] The optional parameters + * @returns Promise + */ + queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase): Promise; + /** + * @param projectId The project id. + * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param callback The callback + */ + queryPredictions(projectId: string, query: Models.PredictionQueryToken, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param query Parameters used to query the predictions. Limited to combining 2 tags. + * @param options The optional parameters + * @param callback The callback + */ + queryPredictions(projectId: string, query: Models.PredictionQueryToken, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + query, + options + }, + queryPredictionsOperationSpec, + callback) as Promise; + } + + /** + * @summary Quick test an image. + * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. + * @param [options] The optional parameters + * @returns Promise + */ + quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams): Promise; + /** + * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. + * @param callback The callback + */ + quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports + * images up to 6MB. + * @param options The optional parameters + * @param callback The callback + */ + quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options: Models.TrainingAPIClientQuickTestImageOptionalParams, callback: msRest.ServiceCallback): void; + quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + imageData, + options + }, + quickTestImageOperationSpec, + callback) as Promise; + } + + /** + * @summary Quick test an image url. + * @param projectId The project to evaluate against. + * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * @param [options] The optional parameters + * @returns Promise + */ + quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams): Promise; + /** + * @param projectId The project to evaluate against. + * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * @param callback The callback + */ + quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project to evaluate against. + * @param imageUrl An ImageUrl that contains the url of the image to be evaluated. + * @param options The optional parameters + * @param callback The callback + */ + quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options: Models.TrainingAPIClientQuickTestImageUrlOptionalParams, callback: msRest.ServiceCallback): void; + quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + imageUrl, + options + }, + quickTestImageUrlOperationSpec, + callback) as Promise; + } + + /** + * @summary Get the tags for a given project and iteration. + * @param projectId The project id. + * @param [options] The optional parameters + * @returns Promise + */ + getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams): Promise; + /** + * @param projectId The project id. + * @param callback The callback + */ + getTags(projectId: string, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param options The optional parameters + * @param callback The callback + */ + getTags(projectId: string, options: Models.TrainingAPIClientGetTagsOptionalParams, callback: msRest.ServiceCallback): void; + getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + options + }, + getTagsOperationSpec, + callback) as Promise; + } + + /** + * @summary Create a tag for the project. + * @param projectId The project id. + * @param name The tag name. + * @param [options] The optional parameters + * @returns Promise + */ + createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams): Promise; + /** + * @param projectId The project id. + * @param name The tag name. + * @param callback The callback + */ + createTag(projectId: string, name: string, callback: msRest.ServiceCallback): void; + /** + * @param projectId The project id. + * @param name The tag name. + * @param options The optional parameters + * @param callback The callback + */ + createTag(projectId: string, name: string, options: Models.TrainingAPIClientCreateTagOptionalParams, callback: msRest.ServiceCallback): void; + createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + projectId, + name, + options + }, + createTagOperationSpec, + callback) as Promise; } /** @@ -1354,63 +1488,102 @@ class TrainingAPIClient extends TrainingAPIClientContext { } /** - * @summary Get the tags for a given project and iteration. + * This API will get suggested tags and regions for an array/batch of untagged images along with + * confidences for the tags. It returns an empty array if no tags are found. + * There is a limit of 64 images in the batch. + * @summary Suggest tags and regions for an array/batch of untagged images. Returns empty array if + * no tags are found. * @param projectId The project id. + * @param iterationId IterationId to use for tag and region suggestion. + * @param imageIds Array of image ids tag suggestion are needed for. Use GetUntaggedImages API to + * get imageIds. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams): Promise; + suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. + * @param iterationId IterationId to use for tag and region suggestion. + * @param imageIds Array of image ids tag suggestion are needed for. Use GetUntaggedImages API to + * get imageIds. * @param callback The callback */ - getTags(projectId: string, callback: msRest.ServiceCallback): void; + suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], callback: msRest.ServiceCallback): void; /** * @param projectId The project id. + * @param iterationId IterationId to use for tag and region suggestion. + * @param imageIds Array of image ids tag suggestion are needed for. Use GetUntaggedImages API to + * get imageIds. * @param options The optional parameters * @param callback The callback */ - getTags(projectId: string, options: Models.TrainingAPIClientGetTagsOptionalParams, callback: msRest.ServiceCallback): void; - getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, + iterationId, + imageIds, options }, - getTagsOperationSpec, - callback) as Promise; + suggestTagsAndRegionsOperationSpec, + callback) as Promise; } /** - * @summary Create a tag for the project. + * @summary Queues project for training. * @param projectId The project id. - * @param name The tag name. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams): Promise; + trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams): Promise; /** * @param projectId The project id. - * @param name The tag name. * @param callback The callback */ - createTag(projectId: string, name: string, callback: msRest.ServiceCallback): void; + trainProject(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. - * @param name The tag name. * @param options The optional parameters * @param callback The callback */ - createTag(projectId: string, name: string, options: Models.TrainingAPIClientCreateTagOptionalParams, callback: msRest.ServiceCallback): void; - createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + trainProject(projectId: string, options: Models.TrainingAPIClientTrainProjectOptionalParams, callback: msRest.ServiceCallback): void; + trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, - name, options }, - createTagOperationSpec, - callback) as Promise; + trainProjectOperationSpec, + callback) as Promise; + } + + /** + * @summary Imports a project. + * @param token Token generated from the export project call. + * @param [options] The optional parameters + * @returns Promise + */ + importProject(token: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param token Token generated from the export project call. + * @param callback The callback + */ + importProject(token: string, callback: msRest.ServiceCallback): void; + /** + * @param token Token generated from the export project call. + * @param options The optional parameters + * @param callback The callback + */ + importProject(token: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + importProject(token: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + token, + options + }, + importProjectOperationSpec, + callback) as Promise; } } @@ -1422,9 +1595,6 @@ const getDomainsOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.endpoint ], - headerParameters: [ - Parameters.apiKey - ], responses: { 200: { bodyMapper: { @@ -1432,91 +1602,11 @@ const getDomainsOperationSpec: msRest.OperationSpec = { type: { name: "Sequence", element: { - type: { - name: "Composite", - className: "Domain" - } - } - } - } - }, - default: { - bodyMapper: Mappers.CustomVisionError - } - }, - serializer -}; - -const getDomainOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "domains/{domainId}", - urlParameters: [ - Parameters.endpoint, - Parameters.domainId0 - ], - headerParameters: [ - Parameters.apiKey - ], - responses: { - 200: { - bodyMapper: Mappers.Domain - }, - default: { - bodyMapper: Mappers.CustomVisionError - } - }, - serializer -}; - -const getTaggedImageCountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/images/tagged/count", - urlParameters: [ - Parameters.endpoint, - Parameters.projectId - ], - queryParameters: [ - Parameters.iterationId0, - Parameters.tagIds0 - ], - headerParameters: [ - Parameters.apiKey - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Number" - } - } - }, - default: { - bodyMapper: Mappers.CustomVisionError - } - }, - serializer -}; - -const getUntaggedImageCountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/images/untagged/count", - urlParameters: [ - Parameters.endpoint, - Parameters.projectId - ], - queryParameters: [ - Parameters.iterationId0 - ], - headerParameters: [ - Parameters.apiKey - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Number" + type: { + name: "Composite", + className: "Domain" + } + } } } }, @@ -1527,26 +1617,16 @@ const getUntaggedImageCountOperationSpec: msRest.OperationSpec = { serializer }; -const createImageTagsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "projects/{projectId}/images/tags", +const getDomainOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "domains/{domainId}", urlParameters: [ Parameters.endpoint, - Parameters.projectId - ], - headerParameters: [ - Parameters.apiKey + Parameters.domainId0 ], - requestBody: { - parameterPath: "batch", - mapper: { - ...Mappers.ImageTagCreateBatch, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ImageTagCreateSummary + bodyMapper: Mappers.Domain }, default: { bodyMapper: Mappers.CustomVisionError @@ -1555,22 +1635,27 @@ const createImageTagsOperationSpec: msRest.OperationSpec = { serializer }; -const deleteImageTagsOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "projects/{projectId}/images/tags", +const getProjectsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects", urlParameters: [ - Parameters.endpoint, - Parameters.projectId - ], - queryParameters: [ - Parameters.imageIds0, - Parameters.tagIds1 - ], - headerParameters: [ - Parameters.apiKey + Parameters.endpoint ], responses: { - 204: {}, + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Project" + } + } + } + } + }, default: { bodyMapper: Mappers.CustomVisionError } @@ -1578,26 +1663,22 @@ const deleteImageTagsOperationSpec: msRest.OperationSpec = { serializer }; -const createImageRegionsOperationSpec: msRest.OperationSpec = { +const createProjectOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/images/regions", + path: "projects", urlParameters: [ - Parameters.endpoint, - Parameters.projectId + Parameters.endpoint ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.name, + Parameters.description, + Parameters.domainId1, + Parameters.classificationType, + Parameters.targetExportPlatforms ], - requestBody: { - parameterPath: "batch", - mapper: { - ...Mappers.ImageRegionCreateBatch, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ImageRegionCreateSummary + bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError @@ -1606,21 +1687,17 @@ const createImageRegionsOperationSpec: msRest.OperationSpec = { serializer }; -const deleteImageRegionsOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "projects/{projectId}/images/regions", +const getProjectOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - queryParameters: [ - Parameters.regionIds - ], - headerParameters: [ - Parameters.apiKey - ], responses: { - 204: {}, + 200: { + bodyMapper: Mappers.Project + }, default: { bodyMapper: Mappers.CustomVisionError } @@ -1628,38 +1705,15 @@ const deleteImageRegionsOperationSpec: msRest.OperationSpec = { serializer }; -const getTaggedImagesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/images/tagged", +const deleteProjectOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - queryParameters: [ - Parameters.iterationId0, - Parameters.tagIds2, - Parameters.orderBy, - Parameters.take, - Parameters.skip - ], - headerParameters: [ - Parameters.apiKey - ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Image" - } - } - } - } - }, + 204: {}, default: { bodyMapper: Mappers.CustomVisionError } @@ -1667,36 +1721,23 @@ const getTaggedImagesOperationSpec: msRest.OperationSpec = { serializer }; -const getUntaggedImagesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/images/untagged", +const updateProjectOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - queryParameters: [ - Parameters.iterationId0, - Parameters.orderBy, - Parameters.take, - Parameters.skip - ], - headerParameters: [ - Parameters.apiKey - ], + requestBody: { + parameterPath: "updatedProject", + mapper: { + ...Mappers.Project, + required: true + } + }, responses: { 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Image" - } - } - } - } + bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError @@ -1705,34 +1746,16 @@ const getUntaggedImagesOperationSpec: msRest.OperationSpec = { serializer }; -const getImagesByIdsOperationSpec: msRest.OperationSpec = { +const exportProjectOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "projects/{projectId}/images/id", + path: "projects/{projectId}/export", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - queryParameters: [ - Parameters.imageIds1, - Parameters.iterationId0 - ], - headerParameters: [ - Parameters.apiKey - ], responses: { 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Image" - } - } - } - } + bodyMapper: Mappers.ProjectExport }, default: { bodyMapper: Mappers.CustomVisionError @@ -1749,10 +1772,7 @@ const createImagesFromDataOperationSpec: msRest.OperationSpec = { Parameters.projectId ], queryParameters: [ - Parameters.tagIds2 - ], - headerParameters: [ - Parameters.apiKey + Parameters.tagIds0 ], formDataParameters: [ Parameters.imageData @@ -1777,12 +1797,12 @@ const deleteImagesOperationSpec: msRest.OperationSpec = { Parameters.projectId ], queryParameters: [ - Parameters.imageIds2 - ], - headerParameters: [ - Parameters.apiKey + Parameters.imageIds0, + Parameters.allImages, + Parameters.allIterations ], responses: { + 202: {}, 204: {}, default: { bodyMapper: Mappers.CustomVisionError @@ -1791,6 +1811,25 @@ const deleteImagesOperationSpec: msRest.OperationSpec = { serializer }; +const getImageRegionProposalsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/images/{imageId}/regionproposals", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId, + Parameters.imageId + ], + responses: { + 200: { + bodyMapper: Mappers.ImageRegionProposal + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + const createImagesFromFilesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/files", @@ -1798,9 +1837,6 @@ const createImagesFromFilesOperationSpec: msRest.OperationSpec = { Parameters.endpoint, Parameters.projectId ], - headerParameters: [ - Parameters.apiKey - ], requestBody: { parameterPath: "batch", mapper: { @@ -1819,26 +1855,31 @@ const createImagesFromFilesOperationSpec: msRest.OperationSpec = { serializer }; -const createImagesFromUrlsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "projects/{projectId}/images/urls", +const getImagesByIdsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/images/id", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.imageIds0, + Parameters.iterationId0 ], - requestBody: { - parameterPath: "batch", - mapper: { - ...Mappers.ImageUrlCreateBatch, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.ImageCreateSummary + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Image" + } + } + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -1854,9 +1895,6 @@ const createImagesFromPredictionsOperationSpec: msRest.OperationSpec = { Parameters.endpoint, Parameters.projectId ], - headerParameters: [ - Parameters.apiKey - ], requestBody: { parameterPath: "batch", mapper: { @@ -1875,20 +1913,23 @@ const createImagesFromPredictionsOperationSpec: msRest.OperationSpec = { serializer }; -const getImageRegionProposalsOperationSpec: msRest.OperationSpec = { +const createImageRegionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/images/{imageId}/regionproposals", + path: "projects/{projectId}/images/regions", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.imageId - ], - headerParameters: [ - Parameters.apiKey + Parameters.projectId ], + requestBody: { + parameterPath: "batch", + mapper: { + ...Mappers.ImageRegionCreateBatch, + required: true + } + }, responses: { 200: { - bodyMapper: Mappers.ImageRegionProposal + bodyMapper: Mappers.ImageRegionCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError @@ -1897,21 +1938,46 @@ const getImageRegionProposalsOperationSpec: msRest.OperationSpec = { serializer }; -const deletePredictionOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "projects/{projectId}/predictions", +const deleteImageRegionsOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "projects/{projectId}/images/regions", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId + ], + queryParameters: [ + Parameters.regionIds + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const querySuggestedImagesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/images/suggested", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ - Parameters.ids - ], - headerParameters: [ - Parameters.apiKey + Parameters.iterationId1 ], + requestBody: { + parameterPath: "query", + mapper: { + ...Mappers.SuggestedTagAndRegionQueryToken, + required: true + } + }, responses: { - 204: {}, + 200: { + bodyMapper: Mappers.SuggestedTagAndRegionQuery + }, default: { bodyMapper: Mappers.CustomVisionError } @@ -1919,29 +1985,36 @@ const deletePredictionOperationSpec: msRest.OperationSpec = { serializer }; -const quickTestImageUrlOperationSpec: msRest.OperationSpec = { +const querySuggestedImageCountOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/quicktest/url", + path: "projects/{projectId}/images/suggested/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ - Parameters.iterationId0 - ], - headerParameters: [ - Parameters.apiKey + Parameters.iterationId1 ], requestBody: { - parameterPath: "imageUrl", + parameterPath: "query", mapper: { - ...Mappers.ImageUrl, + ...Mappers.TagFilter, required: true } }, responses: { 200: { - bodyMapper: Mappers.ImagePrediction + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Dictionary", + value: { + type: { + name: "Number" + } + } + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -1950,26 +2023,61 @@ const quickTestImageUrlOperationSpec: msRest.OperationSpec = { serializer }; -const quickTestImageOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "projects/{projectId}/quicktest/image", +const getTaggedImagesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/images/tagged", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ - Parameters.iterationId0 + Parameters.iterationId0, + Parameters.tagIds0, + Parameters.orderBy, + Parameters.take, + Parameters.skip ], - headerParameters: [ - Parameters.apiKey + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Image" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const getTaggedImageCountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/images/tagged/count", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId ], - formDataParameters: [ - Parameters.imageData + queryParameters: [ + Parameters.iterationId0, + Parameters.tagIds1 ], - contentType: "multipart/form-data", responses: { 200: { - bodyMapper: Mappers.ImagePrediction + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Number" + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -1978,26 +2086,23 @@ const quickTestImageOperationSpec: msRest.OperationSpec = { serializer }; -const queryPredictionsOperationSpec: msRest.OperationSpec = { +const createImageTagsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/predictions/query", + path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], - headerParameters: [ - Parameters.apiKey - ], requestBody: { - parameterPath: "query", + parameterPath: "batch", mapper: { - ...Mappers.PredictionQueryToken, + ...Mappers.ImageTagCreateBatch, required: true } }, responses: { 200: { - bodyMapper: Mappers.PredictionQueryResult + bodyMapper: Mappers.ImageTagCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError @@ -2006,25 +2111,19 @@ const queryPredictionsOperationSpec: msRest.OperationSpec = { serializer }; -const getIterationPerformanceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/iterations/{iterationId}/performance", +const deleteImageTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], queryParameters: [ - Parameters.threshold, - Parameters.overlapThreshold - ], - headerParameters: [ - Parameters.apiKey + Parameters.imageIds1, + Parameters.tagIds2 ], responses: { - 200: { - bodyMapper: Mappers.IterationPerformance - }, + 204: {}, default: { bodyMapper: Mappers.CustomVisionError } @@ -2032,23 +2131,19 @@ const getIterationPerformanceOperationSpec: msRest.OperationSpec = { serializer }; -const getImagePerformancesOperationSpec: msRest.OperationSpec = { +const getUntaggedImagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "projects/{projectId}/iterations/{iterationId}/performance/images", + path: "projects/{projectId}/images/untagged", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], queryParameters: [ - Parameters.tagIds2, + Parameters.iterationId0, Parameters.orderBy, Parameters.take, Parameters.skip ], - headerParameters: [ - Parameters.apiKey - ], responses: { 200: { bodyMapper: { @@ -2058,7 +2153,7 @@ const getImagePerformancesOperationSpec: msRest.OperationSpec = { element: { type: { name: "Composite", - className: "ImagePerformance" + className: "Image" } } } @@ -2071,19 +2166,15 @@ const getImagePerformancesOperationSpec: msRest.OperationSpec = { serializer }; -const getImagePerformanceCountOperationSpec: msRest.OperationSpec = { +const getUntaggedImageCountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "projects/{projectId}/iterations/{iterationId}/performance/images/count", + path: "projects/{projectId}/images/untagged/count", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], queryParameters: [ - Parameters.tagIds0 - ], - headerParameters: [ - Parameters.apiKey + Parameters.iterationId0 ], responses: { 200: { @@ -2101,14 +2192,37 @@ const getImagePerformanceCountOperationSpec: msRest.OperationSpec = { serializer }; -const getProjectsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects", +const createImagesFromUrlsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/images/urls", urlParameters: [ - Parameters.endpoint + Parameters.endpoint, + Parameters.projectId ], - headerParameters: [ - Parameters.apiKey + requestBody: { + parameterPath: "batch", + mapper: { + ...Mappers.ImageUrlCreateBatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ImageCreateSummary + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const getIterationsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId ], responses: { 200: { @@ -2119,7 +2233,7 @@ const getProjectsOperationSpec: msRest.OperationSpec = { element: { type: { name: "Composite", - className: "Project" + className: "Iteration" } } } @@ -2132,25 +2246,90 @@ const getProjectsOperationSpec: msRest.OperationSpec = { serializer }; -const createProjectOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "projects", +const getIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations/{iterationId}", urlParameters: [ - Parameters.endpoint + Parameters.endpoint, + Parameters.projectId, + Parameters.iterationId1 ], - queryParameters: [ - Parameters.name, - Parameters.description, - Parameters.domainId1, - Parameters.classificationType, - Parameters.targetExportPlatforms + responses: { + 200: { + bodyMapper: Mappers.Iteration + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const deleteIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "projects/{projectId}/iterations/{iterationId}", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId, + Parameters.iterationId1 + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const updateIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "projects/{projectId}/iterations/{iterationId}", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId, + Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey + requestBody: { + parameterPath: "updatedIteration", + mapper: { + ...Mappers.Iteration, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Iteration + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const getExportsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations/{iterationId}/export", + urlParameters: [ + Parameters.endpoint, + Parameters.projectId, + Parameters.iterationId1 ], responses: { 200: { - bodyMapper: Mappers.Project + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportModel" + } + } + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -2159,19 +2338,21 @@ const createProjectOperationSpec: msRest.OperationSpec = { serializer }; -const getProjectOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}", +const exportIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/iterations/{iterationId}/export", urlParameters: [ Parameters.endpoint, - Parameters.projectId + Parameters.projectId, + Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.platform, + Parameters.flavor ], responses: { 200: { - bodyMapper: Mappers.Project + bodyMapper: Mappers.ExportModel }, default: { bodyMapper: Mappers.CustomVisionError @@ -2180,18 +2361,22 @@ const getProjectOperationSpec: msRest.OperationSpec = { serializer }; -const deleteProjectOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "projects/{projectId}", +const getIterationPerformanceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations/{iterationId}/performance", urlParameters: [ Parameters.endpoint, - Parameters.projectId + Parameters.projectId, + Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.threshold, + Parameters.overlapThreshold ], responses: { - 204: {}, + 200: { + bodyMapper: Mappers.IterationPerformance + }, default: { bodyMapper: Mappers.CustomVisionError } @@ -2199,26 +2384,34 @@ const deleteProjectOperationSpec: msRest.OperationSpec = { serializer }; -const updateProjectOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "projects/{projectId}", +const getImagePerformancesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations/{iterationId}/performance/images", urlParameters: [ Parameters.endpoint, - Parameters.projectId + Parameters.projectId, + Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.tagIds0, + Parameters.orderBy, + Parameters.take, + Parameters.skip ], - requestBody: { - parameterPath: "updatedProject", - mapper: { - ...Mappers.Project, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.Project + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImagePerformance" + } + } + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -2227,25 +2420,25 @@ const updateProjectOperationSpec: msRest.OperationSpec = { serializer }; -const trainProjectOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "projects/{projectId}/train", +const getImagePerformanceCountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "projects/{projectId}/iterations/{iterationId}/performance/images/count", urlParameters: [ Parameters.endpoint, - Parameters.projectId + Parameters.projectId, + Parameters.iterationId1 ], queryParameters: [ - Parameters.trainingType, - Parameters.reservedBudgetInHours, - Parameters.forceTrain, - Parameters.notificationEmailAddress - ], - headerParameters: [ - Parameters.apiKey + Parameters.tagIds1 ], responses: { 200: { - bodyMapper: Mappers.Iteration + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Number" + } + } }, default: { bodyMapper: Mappers.CustomVisionError @@ -2254,28 +2447,24 @@ const trainProjectOperationSpec: msRest.OperationSpec = { serializer }; -const getIterationsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/iterations", +const publishIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/iterations/{iterationId}/publish", urlParameters: [ Parameters.endpoint, - Parameters.projectId + Parameters.projectId, + Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.publishName, + Parameters.predictionId ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Iteration" - } - } + name: "Boolean" } } }, @@ -2286,21 +2475,16 @@ const getIterationsOperationSpec: msRest.OperationSpec = { serializer }; -const getIterationOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/iterations/{iterationId}", +const unpublishIterationOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "projects/{projectId}/iterations/{iterationId}/publish", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], - headerParameters: [ - Parameters.apiKey - ], responses: { - 200: { - bodyMapper: Mappers.Iteration - }, + 204: {}, default: { bodyMapper: Mappers.CustomVisionError } @@ -2308,16 +2492,15 @@ const getIterationOperationSpec: msRest.OperationSpec = { serializer }; -const deleteIterationOperationSpec: msRest.OperationSpec = { +const deletePredictionOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "projects/{projectId}/iterations/{iterationId}", + path: "projects/{projectId}/predictions", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.ids ], responses: { 204: {}, @@ -2328,27 +2511,23 @@ const deleteIterationOperationSpec: msRest.OperationSpec = { serializer }; -const updateIterationOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "projects/{projectId}/iterations/{iterationId}", +const queryPredictionsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/predictions/query", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 - ], - headerParameters: [ - Parameters.apiKey + Parameters.projectId ], requestBody: { - parameterPath: "updatedIteration", + parameterPath: "query", mapper: { - ...Mappers.Iteration, + ...Mappers.PredictionQueryToken, required: true } }, responses: { 200: { - bodyMapper: Mappers.Iteration + bodyMapper: Mappers.PredictionQueryResult }, default: { bodyMapper: Mappers.CustomVisionError @@ -2357,29 +2536,24 @@ const updateIterationOperationSpec: msRest.OperationSpec = { serializer }; -const publishIterationOperationSpec: msRest.OperationSpec = { +const quickTestImageOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/iterations/{iterationId}/publish", + path: "projects/{projectId}/quicktest/image", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], queryParameters: [ - Parameters.publishName, - Parameters.predictionId + Parameters.iterationId0, + Parameters.store ], - headerParameters: [ - Parameters.apiKey + formDataParameters: [ + Parameters.imageData ], + contentType: "multipart/form-data", responses: { 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Boolean" - } - } + bodyMapper: Mappers.ImagePrediction }, default: { bodyMapper: Mappers.CustomVisionError @@ -2388,19 +2562,28 @@ const publishIterationOperationSpec: msRest.OperationSpec = { serializer }; -const unpublishIterationOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "projects/{projectId}/iterations/{iterationId}/publish", +const quickTestImageUrlOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/quicktest/url", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.iterationId0, + Parameters.store ], + requestBody: { + parameterPath: "imageUrl", + mapper: { + ...Mappers.ImageUrl, + required: true + } + }, responses: { - 204: {}, + 200: { + bodyMapper: Mappers.ImagePrediction + }, default: { bodyMapper: Mappers.CustomVisionError } @@ -2408,16 +2591,15 @@ const unpublishIterationOperationSpec: msRest.OperationSpec = { serializer }; -const getExportsOperationSpec: msRest.OperationSpec = { +const getTagsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "projects/{projectId}/iterations/{iterationId}/export", + path: "projects/{projectId}/tags", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.iterationId0 ], responses: { 200: { @@ -2428,7 +2610,7 @@ const getExportsOperationSpec: msRest.OperationSpec = { element: { type: { name: "Composite", - className: "ExportModel" + className: "Tag" } } } @@ -2441,24 +2623,21 @@ const getExportsOperationSpec: msRest.OperationSpec = { serializer }; -const exportIterationOperationSpec: msRest.OperationSpec = { +const createTagOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/iterations/{iterationId}/export", + path: "projects/{projectId}/tags", urlParameters: [ Parameters.endpoint, - Parameters.projectId, - Parameters.iterationId1 + Parameters.projectId ], queryParameters: [ - Parameters.platform, - Parameters.flavor - ], - headerParameters: [ - Parameters.apiKey + Parameters.name, + Parameters.description, + Parameters.type ], responses: { 200: { - bodyMapper: Mappers.ExportModel + bodyMapper: Mappers.Tag }, default: { bodyMapper: Mappers.CustomVisionError @@ -2478,9 +2657,6 @@ const getTagOperationSpec: msRest.OperationSpec = { queryParameters: [ Parameters.iterationId0 ], - headerParameters: [ - Parameters.apiKey - ], responses: { 200: { bodyMapper: Mappers.Tag @@ -2500,9 +2676,6 @@ const deleteTagOperationSpec: msRest.OperationSpec = { Parameters.projectId, Parameters.tagId ], - headerParameters: [ - Parameters.apiKey - ], responses: { 204: {}, default: { @@ -2520,9 +2693,6 @@ const updateTagOperationSpec: msRest.OperationSpec = { Parameters.projectId, Parameters.tagId ], - headerParameters: [ - Parameters.apiKey - ], requestBody: { parameterPath: "updatedTag", mapper: { @@ -2541,18 +2711,16 @@ const updateTagOperationSpec: msRest.OperationSpec = { serializer }; -const getTagsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "projects/{projectId}/tags", +const suggestTagsAndRegionsOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/{projectId}/tagsandregions/suggestions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ - Parameters.iterationId0 - ], - headerParameters: [ - Parameters.apiKey + Parameters.iterationId1, + Parameters.imageIds1 ], responses: { 200: { @@ -2563,7 +2731,7 @@ const getTagsOperationSpec: msRest.OperationSpec = { element: { type: { name: "Composite", - className: "Tag" + className: "SuggestedTagAndRegion" } } } @@ -2576,24 +2744,49 @@ const getTagsOperationSpec: msRest.OperationSpec = { serializer }; -const createTagOperationSpec: msRest.OperationSpec = { +const trainProjectOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "projects/{projectId}/tags", + path: "projects/{projectId}/train", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ - Parameters.name, - Parameters.description, - Parameters.type + Parameters.trainingType, + Parameters.reservedBudgetInHours, + Parameters.forceTrain, + Parameters.notificationEmailAddress + ], + requestBody: { + parameterPath: [ + "options", + "trainingParameters" + ], + mapper: Mappers.TrainingParameters + }, + responses: { + 200: { + bodyMapper: Mappers.Iteration + }, + default: { + bodyMapper: Mappers.CustomVisionError + } + }, + serializer +}; + +const importProjectOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "projects/import", + urlParameters: [ + Parameters.endpoint ], - headerParameters: [ - Parameters.apiKey + queryParameters: [ + Parameters.token ], responses: { 200: { - bodyMapper: Mappers.Tag + bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError diff --git a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClientContext.ts b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClientContext.ts index 81b137ae2906..b674cb1c78f7 100644 --- a/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClientContext.ts +++ b/sdk/cognitiveservices/cognitiveservices-customvision-training/src/trainingAPIClientContext.ts @@ -14,22 +14,22 @@ const packageName = "@azure/cognitiveservices-customvision-training"; const packageVersion = "4.0.0"; export class TrainingAPIClientContext extends msRest.ServiceClient { - apiKey: string; endpoint: string; + credentials: msRest.ServiceClientCredentials; /** * Initializes a new instance of the TrainingAPIClientContext class. - * @param apiKey API key. * @param endpoint Supported Cognitive Services endpoints. + * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ - constructor(apiKey: string, endpoint: string, options?: msRest.ServiceClientOptions) { - if (apiKey == undefined) { - throw new Error("'apiKey' cannot be null."); - } + constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); } + if (credentials == undefined) { + throw new Error("'credentials' cannot be null."); + } if (!options) { options = {}; @@ -40,11 +40,11 @@ export class TrainingAPIClientContext extends msRest.ServiceClient { options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } - super(undefined, options); + super(credentials, options); - this.baseUri = "{Endpoint}/customvision/v3.0/training"; + this.baseUri = "{Endpoint}/customvision/v3.2/training"; this.requestContentType = "application/json; charset=utf-8"; - this.apiKey = apiKey; this.endpoint = endpoint; + this.credentials = credentials; } }