UNPKG

@azure/cognitiveservices-customvision-training

Version:
1,656 lines 47.9 kB
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ import { __assign, __extends } from "tslib"; import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as Parameters from "./models/parameters"; import { TrainingAPIClientContext } from "./trainingAPIClientContext"; var TrainingAPIClient = /** @class */ (function (_super) { __extends(TrainingAPIClient, _super); /** * Initializes a new instance of the TrainingAPIClient class. * @param endpoint Supported Cognitive Services endpoints. * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ function TrainingAPIClient(credentials, endpoint, options) { return _super.call(this, credentials, endpoint, options) || this; } TrainingAPIClient.prototype.getDomains = function (options, callback) { return this.sendOperationRequest({ options: options }, getDomainsOperationSpec, callback); }; TrainingAPIClient.prototype.getDomain = function (domainId, options, callback) { return this.sendOperationRequest({ domainId: domainId, options: options }, getDomainOperationSpec, callback); }; TrainingAPIClient.prototype.getProjects = function (options, callback) { return this.sendOperationRequest({ options: options }, getProjectsOperationSpec, callback); }; TrainingAPIClient.prototype.createProject = function (name, options, callback) { return this.sendOperationRequest({ name: name, options: options }, createProjectOperationSpec, callback); }; TrainingAPIClient.prototype.getProject = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getProjectOperationSpec, callback); }; TrainingAPIClient.prototype.deleteProject = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, deleteProjectOperationSpec, callback); }; TrainingAPIClient.prototype.updateProject = function (projectId, updatedProject, options, callback) { return this.sendOperationRequest({ projectId: projectId, updatedProject: updatedProject, options: options }, updateProjectOperationSpec, callback); }; TrainingAPIClient.prototype.getArtifact = function (projectId, path, options, callback) { return this.sendOperationRequest({ projectId: projectId, path: path, options: options }, getArtifactOperationSpec, callback); }; TrainingAPIClient.prototype.exportProject = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, exportProjectOperationSpec, callback); }; TrainingAPIClient.prototype.getImages = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getImagesOperationSpec, callback); }; TrainingAPIClient.prototype.createImagesFromData = function (projectId, imageData, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageData: imageData, options: options }, createImagesFromDataOperationSpec, callback); }; TrainingAPIClient.prototype.deleteImages = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, deleteImagesOperationSpec, callback); }; TrainingAPIClient.prototype.getImageRegionProposals = function (projectId, imageId, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageId: imageId, options: options }, getImageRegionProposalsOperationSpec, callback); }; TrainingAPIClient.prototype.getImageCount = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getImageCountOperationSpec, callback); }; TrainingAPIClient.prototype.createImagesFromFiles = function (projectId, batch, options, callback) { return this.sendOperationRequest({ projectId: projectId, batch: batch, options: options }, createImagesFromFilesOperationSpec, callback); }; TrainingAPIClient.prototype.getImagesByIds = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getImagesByIdsOperationSpec, callback); }; TrainingAPIClient.prototype.updateImageMetadata = function (projectId, imageIds, metadata, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageIds: imageIds, metadata: metadata, options: options }, updateImageMetadataOperationSpec, callback); }; TrainingAPIClient.prototype.createImagesFromPredictions = function (projectId, batch, options, callback) { return this.sendOperationRequest({ projectId: projectId, batch: batch, options: options }, createImagesFromPredictionsOperationSpec, callback); }; TrainingAPIClient.prototype.createImageRegions = function (projectId, batch, options, callback) { return this.sendOperationRequest({ projectId: projectId, batch: batch, options: options }, createImageRegionsOperationSpec, callback); }; TrainingAPIClient.prototype.deleteImageRegions = function (projectId, regionIds, options, callback) { return this.sendOperationRequest({ projectId: projectId, regionIds: regionIds, options: options }, deleteImageRegionsOperationSpec, callback); }; TrainingAPIClient.prototype.querySuggestedImages = function (projectId, iterationId, query, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, query: query, options: options }, querySuggestedImagesOperationSpec, callback); }; TrainingAPIClient.prototype.querySuggestedImageCount = function (projectId, iterationId, query, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, query: query, options: options }, querySuggestedImageCountOperationSpec, callback); }; TrainingAPIClient.prototype.getTaggedImages = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getTaggedImagesOperationSpec, callback); }; TrainingAPIClient.prototype.getTaggedImageCount = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getTaggedImageCountOperationSpec, callback); }; TrainingAPIClient.prototype.createImageTags = function (projectId, batch, options, callback) { return this.sendOperationRequest({ projectId: projectId, batch: batch, options: options }, createImageTagsOperationSpec, callback); }; TrainingAPIClient.prototype.deleteImageTags = function (projectId, imageIds, tagIds, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageIds: imageIds, tagIds: tagIds, options: options }, deleteImageTagsOperationSpec, callback); }; TrainingAPIClient.prototype.getUntaggedImages = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getUntaggedImagesOperationSpec, callback); }; TrainingAPIClient.prototype.getUntaggedImageCount = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getUntaggedImageCountOperationSpec, callback); }; TrainingAPIClient.prototype.createImagesFromUrls = function (projectId, batch, options, callback) { return this.sendOperationRequest({ projectId: projectId, batch: batch, options: options }, createImagesFromUrlsOperationSpec, callback); }; TrainingAPIClient.prototype.getIterations = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getIterationsOperationSpec, callback); }; TrainingAPIClient.prototype.getIteration = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, getIterationOperationSpec, callback); }; TrainingAPIClient.prototype.deleteIteration = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, deleteIterationOperationSpec, callback); }; TrainingAPIClient.prototype.updateIteration = function (projectId, iterationId, updatedIteration, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, updatedIteration: updatedIteration, options: options }, updateIterationOperationSpec, callback); }; TrainingAPIClient.prototype.getExports = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, getExportsOperationSpec, callback); }; TrainingAPIClient.prototype.exportIteration = function (projectId, iterationId, platform, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, platform: platform, options: options }, exportIterationOperationSpec, callback); }; TrainingAPIClient.prototype.getIterationPerformance = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, getIterationPerformanceOperationSpec, callback); }; TrainingAPIClient.prototype.getImagePerformances = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, getImagePerformancesOperationSpec, callback); }; TrainingAPIClient.prototype.getImagePerformanceCount = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, getImagePerformanceCountOperationSpec, callback); }; TrainingAPIClient.prototype.publishIteration = function (projectId, iterationId, publishName, predictionId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, publishName: publishName, predictionId: predictionId, options: options }, publishIterationOperationSpec, callback); }; TrainingAPIClient.prototype.unpublishIteration = function (projectId, iterationId, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, options: options }, unpublishIterationOperationSpec, callback); }; TrainingAPIClient.prototype.deletePrediction = function (projectId, ids, options, callback) { return this.sendOperationRequest({ projectId: projectId, ids: ids, options: options }, deletePredictionOperationSpec, callback); }; TrainingAPIClient.prototype.queryPredictions = function (projectId, query, options, callback) { return this.sendOperationRequest({ projectId: projectId, query: query, options: options }, queryPredictionsOperationSpec, callback); }; TrainingAPIClient.prototype.quickTestImage = function (projectId, imageData, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageData: imageData, options: options }, quickTestImageOperationSpec, callback); }; TrainingAPIClient.prototype.quickTestImageUrl = function (projectId, imageUrl, options, callback) { return this.sendOperationRequest({ projectId: projectId, imageUrl: imageUrl, options: options }, quickTestImageUrlOperationSpec, callback); }; TrainingAPIClient.prototype.getTags = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, getTagsOperationSpec, callback); }; TrainingAPIClient.prototype.createTag = function (projectId, name, options, callback) { return this.sendOperationRequest({ projectId: projectId, name: name, options: options }, createTagOperationSpec, callback); }; TrainingAPIClient.prototype.getTag = function (projectId, tagId, options, callback) { return this.sendOperationRequest({ projectId: projectId, tagId: tagId, options: options }, getTagOperationSpec, callback); }; TrainingAPIClient.prototype.deleteTag = function (projectId, tagId, options, callback) { return this.sendOperationRequest({ projectId: projectId, tagId: tagId, options: options }, deleteTagOperationSpec, callback); }; TrainingAPIClient.prototype.updateTag = function (projectId, tagId, updatedTag, options, callback) { return this.sendOperationRequest({ projectId: projectId, tagId: tagId, updatedTag: updatedTag, options: options }, updateTagOperationSpec, callback); }; TrainingAPIClient.prototype.suggestTagsAndRegions = function (projectId, iterationId, imageIds, options, callback) { return this.sendOperationRequest({ projectId: projectId, iterationId: iterationId, imageIds: imageIds, options: options }, suggestTagsAndRegionsOperationSpec, callback); }; TrainingAPIClient.prototype.trainProject = function (projectId, options, callback) { return this.sendOperationRequest({ projectId: projectId, options: options }, trainProjectOperationSpec, callback); }; TrainingAPIClient.prototype.importProject = function (token, options, callback) { return this.sendOperationRequest({ token: token, options: options }, importProjectOperationSpec, callback); }; return TrainingAPIClient; }(TrainingAPIClientContext)); // Operation Specifications var serializer = new msRest.Serializer(Mappers); var getDomainsOperationSpec = { httpMethod: "GET", path: "domains", urlParameters: [ Parameters.endpoint ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Domain" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getDomainOperationSpec = { httpMethod: "GET", path: "domains/{domainId}", urlParameters: [ Parameters.endpoint, Parameters.domainId0 ], responses: { 200: { bodyMapper: Mappers.Domain }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getProjectsOperationSpec = { httpMethod: "GET", path: "projects", urlParameters: [ Parameters.endpoint ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Project" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createProjectOperationSpec = { httpMethod: "POST", path: "projects", urlParameters: [ Parameters.endpoint ], queryParameters: [ Parameters.name0, Parameters.description, Parameters.domainId1, Parameters.classificationType, Parameters.targetExportPlatforms ], requestBody: { parameterPath: [ "options", "options" ], mapper: Mappers.CreateProjectOptions }, responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getProjectOperationSpec = { httpMethod: "GET", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteProjectOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var updateProjectOperationSpec = { httpMethod: "PATCH", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "updatedProject", mapper: __assign(__assign({}, Mappers.Project), { required: true }) }, responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getArtifactOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/artifacts", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.path ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Stream" } } }, default: {} }, serializer: serializer }; var exportProjectOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/export", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 200: { bodyMapper: Mappers.ProjectExport }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getImagesOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.tagIds0, Parameters.taggingStatus, Parameters.filter, Parameters.orderBy, Parameters.take, Parameters.skip ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Image" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImagesFromDataOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.tagIds0 ], formDataParameters: [ Parameters.imageData ], contentType: "multipart/form-data", responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteImagesOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/images", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.imageIds0, Parameters.allImages, Parameters.allIterations ], responses: { 202: {}, 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getImageRegionProposalsOperationSpec = { 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: serializer }; var getImageCountOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.taggingStatus, Parameters.filter, Parameters.tagIds1 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Number" } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImagesFromFilesOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/files", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: __assign(__assign({}, Mappers.ImageFileCreateBatch), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getImagesByIdsOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/id", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.imageIds0, Parameters.iterationId0 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Image" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var updateImageMetadataOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/metadata", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.imageIds1 ], requestBody: { parameterPath: "metadata", mapper: { required: true, serializedName: "metadata", type: { name: "Dictionary", value: { type: { name: "String" } } } } }, responses: { 200: { bodyMapper: Mappers.ImageMetadataUpdateSummary }, 207: { bodyMapper: Mappers.ImageMetadataUpdateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImagesFromPredictionsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/predictions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: __assign(__assign({}, Mappers.ImageIdCreateBatch), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImageRegionsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/regions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: __assign(__assign({}, Mappers.ImageRegionCreateBatch), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImageRegionCreateSummary }, 207: { bodyMapper: Mappers.ImageRegionCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteImageRegionsOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/images/regions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.regionIds ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var querySuggestedImagesOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/suggested", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId1 ], requestBody: { parameterPath: "query", mapper: __assign(__assign({}, Mappers.SuggestedTagAndRegionQueryToken), { required: true }) }, responses: { 200: { bodyMapper: Mappers.SuggestedTagAndRegionQuery }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var querySuggestedImageCountOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/suggested/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId1 ], requestBody: { parameterPath: "query", mapper: __assign(__assign({}, Mappers.TagFilter), { required: true }) }, responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Dictionary", value: { type: { name: "Number" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getTaggedImagesOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/tagged", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.tagIds0, Parameters.orderBy, Parameters.take, Parameters.skip ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Image" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getTaggedImageCountOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/tagged/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.tagIds1 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Number" } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImageTagsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: __assign(__assign({}, Mappers.ImageTagCreateBatch), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImageTagCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteImageTagsOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.imageIds2, Parameters.tagIds2 ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getUntaggedImagesOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/untagged", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.orderBy, Parameters.take, Parameters.skip ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Image" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getUntaggedImageCountOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/images/untagged/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Number" } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createImagesFromUrlsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/urls", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: __assign(__assign({}, Mappers.ImageUrlCreateBatch), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getIterationsOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Iteration" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getIterationOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], responses: { 200: { bodyMapper: Mappers.Iteration }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteIterationOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/iterations/{iterationId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var updateIterationOperationSpec = { httpMethod: "PATCH", path: "projects/{projectId}/iterations/{iterationId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], requestBody: { parameterPath: "updatedIteration", mapper: __assign(__assign({}, Mappers.Iteration), { required: true }) }, responses: { 200: { bodyMapper: Mappers.Iteration }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getExportsOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}/export", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "ExportModel" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var exportIterationOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/iterations/{iterationId}/export", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], queryParameters: [ Parameters.platform, Parameters.flavor ], responses: { 200: { bodyMapper: Mappers.ExportModel }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getIterationPerformanceOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}/performance", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], queryParameters: [ Parameters.threshold, Parameters.overlapThreshold ], responses: { 200: { bodyMapper: Mappers.IterationPerformance }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getImagePerformancesOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}/performance/images", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], queryParameters: [ Parameters.tagIds0, Parameters.orderBy, Parameters.take, Parameters.skip ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "ImagePerformance" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getImagePerformanceCountOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}/performance/images/count", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], queryParameters: [ Parameters.tagIds1 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Number" } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var publishIterationOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/iterations/{iterationId}/publish", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], queryParameters: [ Parameters.publishName, Parameters.predictionId, Parameters.overwrite ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Boolean" } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var unpublishIterationOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/iterations/{iterationId}/publish", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deletePredictionOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/predictions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.ids ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var queryPredictionsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/predictions/query", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "query", mapper: __assign(__assign({}, Mappers.PredictionQueryToken), { required: true }) }, responses: { 200: { bodyMapper: Mappers.PredictionQueryResult }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var quickTestImageOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/quicktest/image", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.store ], formDataParameters: [ Parameters.imageData ], contentType: "multipart/form-data", responses: { 200: { bodyMapper: Mappers.ImagePrediction }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var quickTestImageUrlOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/quicktest/url", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.store ], requestBody: { parameterPath: "imageUrl", mapper: __assign(__assign({}, Mappers.ImageUrl), { required: true }) }, responses: { 200: { bodyMapper: Mappers.ImagePrediction }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getTagsOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Tag" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var createTagOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.name0, Parameters.description, Parameters.type ], responses: { 200: { bodyMapper: Mappers.Tag }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var getTagOperationSpec = { httpMethod: "GET", path: "projects/{projectId}/tags/{tagId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.tagId ], queryParameters: [ Parameters.iterationId0 ], responses: { 200: { bodyMapper: Mappers.Tag }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var deleteTagOperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/tags/{tagId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.tagId ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var updateTagOperationSpec = { httpMethod: "PATCH", path: "projects/{projectId}/tags/{tagId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.tagId ], requestBody: { parameterPath: "updatedTag", mapper: __assign(__assign({}, Mappers.Tag), { required: true }) }, responses: { 200: { bodyMapper: Mappers.Tag }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var suggestTagsAndRegionsOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/tagsandregions/suggestions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId1, Parameters.imageIds2 ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "SuggestedTagAndRegion" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; var trainProjectOperationSpec = { httpMethod: "POST", path: "projects/{projectId}/train", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ 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: serializer }; var importProjectOperationSpec = { httpMethod: "POST", path: "projects/import", urlParameters: [ Parameters.endpoint ], queryParameters: [ Parameters.token, Parameters.name1 ], responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer: serializer }; export { TrainingAPIClient, TrainingAPIClientContext, Models as TrainingAPIModels, Mappers as TrainingAPIMappers }; //# sourceMappingURL=trainingAPIClient.js.map