/* * 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 * 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"; class TrainingAPIClient extends TrainingAPIClientContext { /** * 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 */ constructor(credentials: msRest.ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions) { super(credentials, endpoint, options); } /** * @summary Get a list of the available domains. * @param [options] The optional parameters * @returns Promise */ getDomains(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ getDomains(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ getDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { options }, getDomainsOperationSpec, callback) as Promise; } /** * @summary Get information about a specific domain. * @param domainId The id of the domain to get information about. * @param [options] The optional parameters * @returns Promise */ getDomain(domainId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param domainId The id of the domain to get information about. * @param callback The callback */ getDomain(domainId: string, callback: msRest.ServiceCallback): void; /** * @param domainId The id of the domain to get information about. * @param options The optional parameters * @param callback The callback */ getDomain(domainId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getDomain(domainId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { domainId, options }, getDomainOperationSpec, 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. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ deleteProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param callback The callback */ deleteProject(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 { return this.sendOperationRequest( { projectId, updatedProject, options }, updateProjectOperationSpec, callback) as Promise; } /** * @summary Get artifact content from blob storage, based on artifact relative path in the blob. * @param projectId The project id. * @param path The relative path for artifact. * @param [options] The optional parameters * @returns Promise */ getArtifact(projectId: string, path: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param path The relative path for artifact. * @param callback The callback */ getArtifact(projectId: string, path: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param path The relative path for artifact. * @param options The optional parameters * @param callback The callback */ getArtifact(projectId: string, path: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getArtifact(projectId: string, path: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, path, options }, getArtifactOperationSpec, callback) as Promise; } /** * @summary Exports a project. * @param projectId The project id of the project to export. * @param [options] The optional parameters * @returns Promise */ exportProject(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id of the project to export. * @param callback The callback */ exportProject(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id of the project to export. * @param options The optional parameters * @param callback The callback */ 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, options }, 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 images for a given project iteration or workspace. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getImages(projectId: string, options?: Models.TrainingAPIClientGetImagesOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getImages(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ getImages(projectId: string, options: Models.TrainingAPIClientGetImagesOptionalParams, callback: msRest.ServiceCallback): void; getImages(projectId: string, options?: Models.TrainingAPIClientGetImagesOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, options }, getImagesOperationSpec, 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. * If all images are successful created, 200(OK) status code will be returned. * Otherwise, 207 (Multi-Status) status code will be returned and detail status for each image will * be listed in the response payload. * @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 */ 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 */ 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 */ 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 }, createImagesFromDataOperationSpec, callback) as Promise; } /** * @summary Delete images from the set of training images. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ deleteImages(projectId: string, options?: Models.TrainingAPIClientDeleteImagesOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ deleteImages(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ 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 }, deleteImagesOperationSpec, 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. * @param projectId The project id. * @param imageId The image id. * @param [options] The optional parameters * @returns Promise */ getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param imageId The image id. * @param callback The callback */ 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 */ 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 }, getImageRegionProposalsOperationSpec, 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 Get the number of images. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getImageCount(projectId: string, options?: Models.TrainingAPIClientGetImageCountOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getImageCount(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ getImageCount(projectId: string, options: Models.TrainingAPIClientGetImageCountOptionalParams, callback: msRest.ServiceCallback): void; getImageCount(projectId: string, options?: Models.TrainingAPIClientGetImageCountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, options }, getImageCountOperationSpec, callback) as Promise; } /** * This API accepts a batch of files, and optionally tags, to create images. There is a limit of 64 * images and 20 tags. * If all images are successful created, 200(OK) status code will be returned. * Otherwise, 207 (Multi-Status) status code will be returned and detail status for each image will * be listed in the response payload. * @summary Add the provided batch of 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 [options] The optional parameters * @returns Promise */ createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, 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 callback The callback */ createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, 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 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 { return this.sendOperationRequest( { projectId, batch, options }, createImagesFromFilesOperationSpec, callback) as Promise; } /** * 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 [options] The optional parameters * @returns Promise */ getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getImagesByIds(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project 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 { return this.sendOperationRequest( { projectId, options }, getImagesByIdsOperationSpec, callback) as Promise; } /** * This API accepts a batch of image Ids, and metadata, to update images. There is a limit of 64 * images. * @summary Update metadata of images. * @param projectId The project id. * @param imageIds The list of image ids to update. Limited to 64. * @param metadata The metadata to be updated to the specified images. Limited to 10 key-value * pairs per image. The length of key is limited to 128. The length of value is limited to 256. * @param [options] The optional parameters * @returns Promise */ updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param imageIds The list of image ids to update. Limited to 64. * @param metadata The metadata to be updated to the specified images. Limited to 10 key-value * pairs per image. The length of key is limited to 128. The length of value is limited to 256. * @param callback The callback */ updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param imageIds The list of image ids to update. Limited to 64. * @param metadata The metadata to be updated to the specified images. Limited to 10 key-value * pairs per image. The length of key is limited to 128. The length of value is limited to 256. * @param options The optional parameters * @param callback The callback */ updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, imageIds, metadata, options }, updateImageMetadataOperationSpec, callback) as Promise; } /** * This API creates a batch of images from predicted images specified. There is a limit of 64 * images and 20 tags. * If all images are successful created, 200(OK) status code will be returned. * Otherwise, 207 (Multi-Status) status code will be returned and detail status for each image will * be listed in the response payload. * @summary Add the specified predicted images to the set of training images. * @param projectId The project id. * @param batch Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @param [options] The optional parameters * @returns Promise */ createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param batch Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @param callback The callback */ createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param batch Image, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @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 { return this.sendOperationRequest( { projectId, batch, options }, createImagesFromPredictionsOperationSpec, callback) as Promise; } /** * 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. * If all regions are successful created, 200(OK) status code will be returned. * Otherwise, 207 (Multi-Status) status code will be returned and detail status for each region * will be listed in the response payload. * @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. * @param [options] The optional parameters * @returns Promise */ createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, 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 callback The callback */ createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, 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 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 { return this.sendOperationRequest( { projectId, batch, options }, createImageRegionsOperationSpec, callback) as Promise; } /** * @summary Delete a set of image regions. * @param projectId The project id. * @param regionIds Regions to delete. Limited to 64. * @param [options] The optional parameters * @returns Promise */ deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param regionIds Regions to delete. Limited to 64. * @param callback The callback */ deleteImageRegions(projectId: string, regionIds: string[], callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param regionIds Regions to delete. Limited to 64. * @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 { return this.sendOperationRequest( { projectId, regionIds, options }, deleteImageRegionsOperationSpec, callback); } /** * 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 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 */ querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project 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 */ querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, callback: msRest.ServiceCallback): void; /** * @param projectId The project 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 */ 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, iterationId, query, options }, querySuggestedImagesOperationSpec, callback) as Promise; } /** * 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 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 */ querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @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 */ querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, callback: msRest.ServiceCallback<{ [propertyName: string]: number }>): void; /** * @param projectId The project id. * @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 */ 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, iterationId, query, options }, querySuggestedImageCountOperationSpec, 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. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getTaggedImages(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @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 { return this.sendOperationRequest( { projectId, options }, getTaggedImagesOperationSpec, 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}. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getTaggedImageCount(projectId: string, 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 { return this.sendOperationRequest( { projectId, options }, getTaggedImageCountOperationSpec, 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. * @param [options] The optional parameters * @returns Promise */ createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param batch Batch of image tags. Limited to 128 tags per batch. * @param callback The callback */ createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param batch Batch of image tags. Limited to 128 tags per batch. * @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 { return this.sendOperationRequest( { projectId, batch, options }, createImageTagsOperationSpec, callback) as Promise; } /** * @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 */ deleteImageTags(projectId: string, imageIds: string[], tagIds: 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; /** * @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 { return this.sendOperationRequest( { projectId, imageIds, tagIds, options }, 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. * @summary Get untagged images for a given project iteration. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getUntaggedImages(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 { return this.sendOperationRequest( { projectId, options }, getUntaggedImagesOperationSpec, 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. * @param [options] The optional parameters * @returns Promise */ getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ getUntaggedImageCount(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @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 { return this.sendOperationRequest( { projectId, options }, getUntaggedImageCountOperationSpec, 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. * If all images are successful created, 200(OK) status code will be returned. * Otherwise, 207 (Multi-Status) status code will be returned and detail status for each image will * be listed in the response payload. * @summary Add the provided images urls to the set of training images. * @param projectId The project id. * @param batch Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @param [options] The optional parameters * @returns Promise */ createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param batch Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @param callback The callback */ createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param batch Image urls, tag ids, and metadata. Limited to 64 images and 20 tags per batch. * @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 { return this.sendOperationRequest( { projectId, batch, options }, createImagesFromUrlsOperationSpec, callback) as Promise; } /** * @summary Get iterations for the project. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ getIterations(projectId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param callback The callback */ getIterations(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param options The optional parameters * @param callback The callback */ getIterations(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getIterations(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, options }, getIterationsOperationSpec, callback) as Promise; } /** * @summary Get a specific 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 */ getIteration(projectId: string, iterationId: 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 callback The callback */ getIteration(projectId: string, iterationId: 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 options The optional parameters * @param callback The callback */ getIteration(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; getIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, options }, getIterationOperationSpec, callback) as Promise; } /** * @summary Delete a specific iteration of a project. * @param projectId The project id. * @param iterationId The iteration id. * @param [options] The optional parameters * @returns Promise */ deleteIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param iterationId The iteration id. * @param callback The callback */ deleteIteration(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 */ deleteIteration(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; deleteIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, options }, deleteIterationOperationSpec, callback); } /** * @summary Update a specific iteration. * @param projectId Project id. * @param iterationId Iteration id. * @param updatedIteration The updated iteration model. * @param [options] The optional parameters * @returns Promise */ updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId Project id. * @param iterationId Iteration id. * @param updatedIteration The updated iteration model. * @param callback The callback */ updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, callback: msRest.ServiceCallback): void; /** * @param projectId Project id. * @param iterationId Iteration id. * @param updatedIteration The updated iteration model. * @param options The optional parameters * @param callback The callback */ updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, updatedIteration, options }, updateIterationOperationSpec, callback) as Promise; } /** * @summary Get the list of exports for a specific iteration. * @param projectId The project id. * @param iterationId The iteration id. * @param [options] The optional parameters * @returns Promise */ getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param iterationId The iteration id. * @param callback The callback */ getExports(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 */ 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, options }, getExportsOperationSpec, callback) as Promise; } /** * @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', 'OpenVino' * @param [options] The optional parameters * @returns 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', 'OpenVino' * @param callback The callback */ 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', 'OpenVino' * @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 { return this.sendOperationRequest( { projectId, iterationId, platform, options }, exportIterationOperationSpec, 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. * @param [options] The optional parameters * @returns Promise */ getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams): Promise; /** * @param projectId The id of the project the iteration belongs to. * @param iterationId The id of the iteration to get. * @param callback The callback */ getIterationPerformance(projectId: string, iterationId: 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 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 { return this.sendOperationRequest( { projectId, iterationId, options }, getIterationPerformanceOperationSpec, 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 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 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 */ publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: Models.TrainingAPIClientPublishIterationOptionalParams): 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; /** * @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: Models.TrainingAPIClientPublishIterationOptionalParams, callback: msRest.ServiceCallback): void; publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: Models.TrainingAPIClientPublishIterationOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, iterationId, publishName, predictionId, options }, 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; } /** * @summary Get information about a specific tag. * @param projectId The project this tag belongs to. * @param tagId The tag id. * @param [options] The optional parameters * @returns Promise */ getTag(projectId: string, tagId: string, options?: Models.TrainingAPIClientGetTagOptionalParams): Promise; /** * @param projectId The project this tag belongs to. * @param tagId The tag id. * @param callback The callback */ getTag(projectId: string, tagId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project this tag belongs to. * @param tagId The tag id. * @param options The optional parameters * @param callback The callback */ getTag(projectId: string, tagId: string, options: Models.TrainingAPIClientGetTagOptionalParams, callback: msRest.ServiceCallback): void; getTag(projectId: string, tagId: string, options?: Models.TrainingAPIClientGetTagOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, tagId, options }, getTagOperationSpec, callback) as Promise; } /** * @summary Delete a tag from the project. * @param projectId The project id. * @param tagId Id of the tag to be deleted. * @param [options] The optional parameters * @returns Promise */ deleteTag(projectId: string, tagId: string, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param tagId Id of the tag to be deleted. * @param callback The callback */ deleteTag(projectId: string, tagId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param tagId Id of the tag to be deleted. * @param options The optional parameters * @param callback The callback */ deleteTag(projectId: string, tagId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; deleteTag(projectId: string, tagId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, tagId, options }, deleteTagOperationSpec, callback); } /** * @summary Update a tag. * @param projectId The project id. * @param tagId The id of the target tag. * @param updatedTag The updated tag model. * @param [options] The optional parameters * @returns Promise */ updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, options?: msRest.RequestOptionsBase): Promise; /** * @param projectId The project id. * @param tagId The id of the target tag. * @param updatedTag The updated tag model. * @param callback The callback */ updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @param tagId The id of the target tag. * @param updatedTag The updated tag model. * @param options The optional parameters * @param callback The callback */ updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { projectId, tagId, updatedTag, options }, updateTagOperationSpec, callback) as Promise; } /** * 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 */ 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 */ 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 */ 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 }, suggestTagsAndRegionsOperationSpec, callback) as Promise; } /** * @summary Queues project for training. * @param projectId The project id. * @param [options] The optional parameters * @returns Promise */ trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams): Promise; /** * @param projectId The project id. * @param callback The callback */ trainProject(projectId: string, callback: msRest.ServiceCallback): void; /** * @param projectId The project id. * @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 { return this.sendOperationRequest( { projectId, options }, 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?: Models.TrainingAPIClientImportProjectOptionalParams): 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: Models.TrainingAPIClientImportProjectOptionalParams, callback: msRest.ServiceCallback): void; importProject(token: string, options?: Models.TrainingAPIClientImportProjectOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.sendOperationRequest( { token, options }, importProjectOperationSpec, callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const getDomainsOperationSpec: msRest.OperationSpec = { 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 }; const getDomainOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "domains/{domainId}", urlParameters: [ Parameters.endpoint, Parameters.domainId0 ], responses: { 200: { bodyMapper: Mappers.Domain }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getProjectsOperationSpec: msRest.OperationSpec = { 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 }; const createProjectOperationSpec: msRest.OperationSpec = { 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 }; const getProjectOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const deleteProjectOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const updateProjectOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "projects/{projectId}", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "updatedProject", mapper: { ...Mappers.Project, required: true } }, responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getArtifactOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "projects/{projectId}/artifacts", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.path ], responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Stream" } } }, default: {} }, serializer }; const exportProjectOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "projects/{projectId}/export", urlParameters: [ Parameters.endpoint, Parameters.projectId ], responses: { 200: { bodyMapper: Mappers.ProjectExport }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getImagesOperationSpec: msRest.OperationSpec = { 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 }; const createImagesFromDataOperationSpec: msRest.OperationSpec = { 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 }; const deleteImagesOperationSpec: msRest.OperationSpec = { 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 }; 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 getImageCountOperationSpec: msRest.OperationSpec = { 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 }; const createImagesFromFilesOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/files", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: { ...Mappers.ImageFileCreateBatch, required: true } }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getImagesByIdsOperationSpec: msRest.OperationSpec = { 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 }; const updateImageMetadataOperationSpec: msRest.OperationSpec = { 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 }; const createImagesFromPredictionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/predictions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: { ...Mappers.ImageIdCreateBatch, required: true } }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { bodyMapper: Mappers.ImageCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const createImageRegionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/regions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: { ...Mappers.ImageRegionCreateBatch, required: true } }, responses: { 200: { bodyMapper: Mappers.ImageRegionCreateSummary }, 207: { bodyMapper: Mappers.ImageRegionCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; 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.iterationId1 ], requestBody: { parameterPath: "query", mapper: { ...Mappers.SuggestedTagAndRegionQueryToken, required: true } }, responses: { 200: { bodyMapper: Mappers.SuggestedTagAndRegionQuery }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const querySuggestedImageCountOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/suggested/count", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId1 ], requestBody: { parameterPath: "query", mapper: { ...Mappers.TagFilter, required: true } }, responses: { 200: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Dictionary", value: { type: { name: "Number" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getTaggedImagesOperationSpec: msRest.OperationSpec = { 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 }; const getTaggedImageCountOperationSpec: msRest.OperationSpec = { 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 }; const createImageTagsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: { ...Mappers.ImageTagCreateBatch, required: true } }, responses: { 200: { bodyMapper: Mappers.ImageTagCreateSummary }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const deleteImageTagsOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/images/tags", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.imageIds2, Parameters.tagIds2 ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getUntaggedImagesOperationSpec: msRest.OperationSpec = { 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 }; const getUntaggedImageCountOperationSpec: msRest.OperationSpec = { 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 }; const createImagesFromUrlsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/images/urls", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "batch", mapper: { ...Mappers.ImageUrlCreateBatch, required: true } }, responses: { 200: { bodyMapper: Mappers.ImageCreateSummary }, 207: { 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: { bodyMapper: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "Iteration" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getIterationOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "projects/{projectId}/iterations/{iterationId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], 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 ], 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: { serializedName: "parsedResponse", type: { name: "Sequence", element: { type: { name: "Composite", className: "ExportModel" } } } } }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const exportIterationOperationSpec: msRest.OperationSpec = { 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 }; const getIterationPerformanceOperationSpec: msRest.OperationSpec = { 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 }; const getImagePerformancesOperationSpec: msRest.OperationSpec = { 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 }; const getImagePerformanceCountOperationSpec: msRest.OperationSpec = { 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 }; const publishIterationOperationSpec: msRest.OperationSpec = { 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 }; const unpublishIterationOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/iterations/{iterationId}/publish", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.iterationId1 ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const deletePredictionOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/predictions", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.ids ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const queryPredictionsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/predictions/query", urlParameters: [ Parameters.endpoint, Parameters.projectId ], requestBody: { parameterPath: "query", mapper: { ...Mappers.PredictionQueryToken, required: true } }, responses: { 200: { bodyMapper: Mappers.PredictionQueryResult }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const quickTestImageOperationSpec: msRest.OperationSpec = { 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 }; const quickTestImageUrlOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/{projectId}/quicktest/url", urlParameters: [ Parameters.endpoint, Parameters.projectId ], queryParameters: [ Parameters.iterationId0, Parameters.store ], requestBody: { parameterPath: "imageUrl", mapper: { ...Mappers.ImageUrl, required: true } }, responses: { 200: { bodyMapper: Mappers.ImagePrediction }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const getTagsOperationSpec: msRest.OperationSpec = { 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 }; const createTagOperationSpec: msRest.OperationSpec = { 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 }; const getTagOperationSpec: msRest.OperationSpec = { 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 }; const deleteTagOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "projects/{projectId}/tags/{tagId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.tagId ], responses: { 204: {}, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const updateTagOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", path: "projects/{projectId}/tags/{tagId}", urlParameters: [ Parameters.endpoint, Parameters.projectId, Parameters.tagId ], requestBody: { parameterPath: "updatedTag", mapper: { ...Mappers.Tag, required: true } }, responses: { 200: { bodyMapper: Mappers.Tag }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; const suggestTagsAndRegionsOperationSpec: msRest.OperationSpec = { 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 }; const trainProjectOperationSpec: msRest.OperationSpec = { 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 }; const importProjectOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "projects/import", urlParameters: [ Parameters.endpoint ], queryParameters: [ Parameters.token, Parameters.name1 ], responses: { 200: { bodyMapper: Mappers.Project }, default: { bodyMapper: Mappers.CustomVisionError } }, serializer }; export { TrainingAPIClient, TrainingAPIClientContext, Models as TrainingAPIModels, Mappers as TrainingAPIMappers };