@azure/cognitiveservices-customvision-training
Version:
TrainingAPIClient Library with typescript type definitions for node.js and browser.
1,050 lines (1,016 loc) • 110 kB
text/typescript
/*
* 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<Models.GetDomainsResponse>
*/
getDomains(options?: msRest.RequestOptionsBase): Promise<Models.GetDomainsResponse>;
/**
* @param callback The callback
*/
getDomains(callback: msRest.ServiceCallback<Models.Domain[]>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
getDomains(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Domain[]>): void;
getDomains(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Domain[]>, callback?: msRest.ServiceCallback<Models.Domain[]>): Promise<Models.GetDomainsResponse> {
return this.sendOperationRequest(
{
options
},
getDomainsOperationSpec,
callback) as Promise<Models.GetDomainsResponse>;
}
/**
* @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<Models.GetDomainResponse>
*/
getDomain(domainId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetDomainResponse>;
/**
* @param domainId The id of the domain to get information about.
* @param callback The callback
*/
getDomain(domainId: string, callback: msRest.ServiceCallback<Models.Domain>): 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<Models.Domain>): void;
getDomain(domainId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Domain>, callback?: msRest.ServiceCallback<Models.Domain>): Promise<Models.GetDomainResponse> {
return this.sendOperationRequest(
{
domainId,
options
},
getDomainOperationSpec,
callback) as Promise<Models.GetDomainResponse>;
}
/**
* @summary Get your projects.
* @param [options] The optional parameters
* @returns Promise<Models.GetProjectsResponse>
*/
getProjects(options?: msRest.RequestOptionsBase): Promise<Models.GetProjectsResponse>;
/**
* @param callback The callback
*/
getProjects(callback: msRest.ServiceCallback<Models.Project[]>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
getProjects(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Project[]>): void;
getProjects(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Project[]>, callback?: msRest.ServiceCallback<Models.Project[]>): Promise<Models.GetProjectsResponse> {
return this.sendOperationRequest(
{
options
},
getProjectsOperationSpec,
callback) as Promise<Models.GetProjectsResponse>;
}
/**
* @summary Create a project.
* @param name Name of the project.
* @param [options] The optional parameters
* @returns Promise<Models.CreateProjectResponse>
*/
createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams): Promise<Models.CreateProjectResponse>;
/**
* @param name Name of the project.
* @param callback The callback
*/
createProject(name: string, callback: msRest.ServiceCallback<Models.Project>): 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<Models.Project>): void;
createProject(name: string, options?: Models.TrainingAPIClientCreateProjectOptionalParams | msRest.ServiceCallback<Models.Project>, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.CreateProjectResponse> {
return this.sendOperationRequest(
{
name,
options
},
createProjectOperationSpec,
callback) as Promise<Models.CreateProjectResponse>;
}
/**
* @summary Get a specific project.
* @param projectId The id of the project to get.
* @param [options] The optional parameters
* @returns Promise<Models.GetProjectResponse>
*/
getProject(projectId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetProjectResponse>;
/**
* @param projectId The id of the project to get.
* @param callback The callback
*/
getProject(projectId: string, callback: msRest.ServiceCallback<Models.Project>): 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<Models.Project>): void;
getProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Project>, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.GetProjectResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getProjectOperationSpec,
callback) as Promise<Models.GetProjectResponse>;
}
/**
* @summary Delete a specific project.
* @param projectId The project id.
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
deleteProject(projectId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
deleteProject(projectId: string, callback: msRest.ServiceCallback<void>): 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>): void;
deleteProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
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<Models.UpdateProjectResponse>
*/
updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase): Promise<Models.UpdateProjectResponse>;
/**
* @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<Models.Project>): 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<Models.Project>): void;
updateProject(projectId: string, updatedProject: Models.Project, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Project>, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.UpdateProjectResponse> {
return this.sendOperationRequest(
{
projectId,
updatedProject,
options
},
updateProjectOperationSpec,
callback) as Promise<Models.UpdateProjectResponse>;
}
/**
* @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<Models.GetArtifactResponse>
*/
getArtifact(projectId: string, path: string, options?: msRest.RequestOptionsBase): Promise<Models.GetArtifactResponse>;
/**
* @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>): 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>): void;
getArtifact(projectId: string, path: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<Models.GetArtifactResponse> {
return this.sendOperationRequest(
{
projectId,
path,
options
},
getArtifactOperationSpec,
callback) as Promise<Models.GetArtifactResponse>;
}
/**
* @summary Exports a project.
* @param projectId The project id of the project to export.
* @param [options] The optional parameters
* @returns Promise<Models.ExportProjectResponse>
*/
exportProject(projectId: string, options?: msRest.RequestOptionsBase): Promise<Models.ExportProjectResponse>;
/**
* @param projectId The project id of the project to export.
* @param callback The callback
*/
exportProject(projectId: string, callback: msRest.ServiceCallback<Models.ProjectExport>): 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<Models.ProjectExport>): void;
exportProject(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ProjectExport>, callback?: msRest.ServiceCallback<Models.ProjectExport>): Promise<Models.ExportProjectResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
exportProjectOperationSpec,
callback) as Promise<Models.ExportProjectResponse>;
}
/**
* 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<Models.GetImagesResponse>
*/
getImages(projectId: string, options?: Models.TrainingAPIClientGetImagesOptionalParams): Promise<Models.GetImagesResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getImages(projectId: string, callback: msRest.ServiceCallback<Models.Image[]>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getImages(projectId: string, options: Models.TrainingAPIClientGetImagesOptionalParams, callback: msRest.ServiceCallback<Models.Image[]>): void;
getImages(projectId: string, options?: Models.TrainingAPIClientGetImagesOptionalParams | msRest.ServiceCallback<Models.Image[]>, callback?: msRest.ServiceCallback<Models.Image[]>): Promise<Models.GetImagesResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getImagesOperationSpec,
callback) as Promise<Models.GetImagesResponse>;
}
/**
* 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<Models.CreateImagesFromDataResponse>
*/
createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams): Promise<Models.CreateImagesFromDataResponse>;
/**
* @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<Models.ImageCreateSummary>): 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<Models.ImageCreateSummary>): void;
createImagesFromData(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientCreateImagesFromDataOptionalParams | msRest.ServiceCallback<Models.ImageCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageCreateSummary>): Promise<Models.CreateImagesFromDataResponse> {
return this.sendOperationRequest(
{
projectId,
imageData,
options
},
createImagesFromDataOperationSpec,
callback) as Promise<Models.CreateImagesFromDataResponse>;
}
/**
* @summary Delete images from the set of training images.
* @param projectId The project id.
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
deleteImages(projectId: string, options?: Models.TrainingAPIClientDeleteImagesOptionalParams): Promise<msRest.RestResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
deleteImages(projectId: string, callback: msRest.ServiceCallback<void>): 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>): void;
deleteImages(projectId: string, options?: Models.TrainingAPIClientDeleteImagesOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
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<Models.GetImageRegionProposalsResponse>
*/
getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetImageRegionProposalsResponse>;
/**
* @param projectId The project id.
* @param imageId The image id.
* @param callback The callback
*/
getImageRegionProposals(projectId: string, imageId: string, callback: msRest.ServiceCallback<Models.ImageRegionProposal>): 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<Models.ImageRegionProposal>): void;
getImageRegionProposals(projectId: string, imageId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageRegionProposal>, callback?: msRest.ServiceCallback<Models.ImageRegionProposal>): Promise<Models.GetImageRegionProposalsResponse> {
return this.sendOperationRequest(
{
projectId,
imageId,
options
},
getImageRegionProposalsOperationSpec,
callback) as Promise<Models.GetImageRegionProposalsResponse>;
}
/**
* 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<Models.GetImageCountResponse>
*/
getImageCount(projectId: string, options?: Models.TrainingAPIClientGetImageCountOptionalParams): Promise<Models.GetImageCountResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getImageCount(projectId: string, callback: msRest.ServiceCallback<number>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getImageCount(projectId: string, options: Models.TrainingAPIClientGetImageCountOptionalParams, callback: msRest.ServiceCallback<number>): void;
getImageCount(projectId: string, options?: Models.TrainingAPIClientGetImageCountOptionalParams | msRest.ServiceCallback<number>, callback?: msRest.ServiceCallback<number>): Promise<Models.GetImageCountResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getImageCountOperationSpec,
callback) as Promise<Models.GetImageCountResponse>;
}
/**
* 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<Models.CreateImagesFromFilesResponse>
*/
createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase): Promise<Models.CreateImagesFromFilesResponse>;
/**
* @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<Models.ImageCreateSummary>): 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<Models.ImageCreateSummary>): void;
createImagesFromFiles(projectId: string, batch: Models.ImageFileCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageCreateSummary>): Promise<Models.CreateImagesFromFilesResponse> {
return this.sendOperationRequest(
{
projectId,
batch,
options
},
createImagesFromFilesOperationSpec,
callback) as Promise<Models.CreateImagesFromFilesResponse>;
}
/**
* 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<Models.GetImagesByIdsResponse>
*/
getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams): Promise<Models.GetImagesByIdsResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getImagesByIds(projectId: string, callback: msRest.ServiceCallback<Models.Image[]>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getImagesByIds(projectId: string, options: Models.TrainingAPIClientGetImagesByIdsOptionalParams, callback: msRest.ServiceCallback<Models.Image[]>): void;
getImagesByIds(projectId: string, options?: Models.TrainingAPIClientGetImagesByIdsOptionalParams | msRest.ServiceCallback<Models.Image[]>, callback?: msRest.ServiceCallback<Models.Image[]>): Promise<Models.GetImagesByIdsResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getImagesByIdsOperationSpec,
callback) as Promise<Models.GetImagesByIdsResponse>;
}
/**
* 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<Models.UpdateImageMetadataResponse>
*/
updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, options?: msRest.RequestOptionsBase): Promise<Models.UpdateImageMetadataResponse>;
/**
* @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<Models.ImageMetadataUpdateSummary>): 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<Models.ImageMetadataUpdateSummary>): void;
updateImageMetadata(projectId: string, imageIds: string[], metadata: { [propertyName: string]: string }, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageMetadataUpdateSummary>, callback?: msRest.ServiceCallback<Models.ImageMetadataUpdateSummary>): Promise<Models.UpdateImageMetadataResponse> {
return this.sendOperationRequest(
{
projectId,
imageIds,
metadata,
options
},
updateImageMetadataOperationSpec,
callback) as Promise<Models.UpdateImageMetadataResponse>;
}
/**
* 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<Models.CreateImagesFromPredictionsResponse>
*/
createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase): Promise<Models.CreateImagesFromPredictionsResponse>;
/**
* @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<Models.ImageCreateSummary>): 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<Models.ImageCreateSummary>): void;
createImagesFromPredictions(projectId: string, batch: Models.ImageIdCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageCreateSummary>): Promise<Models.CreateImagesFromPredictionsResponse> {
return this.sendOperationRequest(
{
projectId,
batch,
options
},
createImagesFromPredictionsOperationSpec,
callback) as Promise<Models.CreateImagesFromPredictionsResponse>;
}
/**
* 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<Models.CreateImageRegionsResponse>
*/
createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase): Promise<Models.CreateImageRegionsResponse>;
/**
* @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<Models.ImageRegionCreateSummary>): 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<Models.ImageRegionCreateSummary>): void;
createImageRegions(projectId: string, batch: Models.ImageRegionCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageRegionCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageRegionCreateSummary>): Promise<Models.CreateImageRegionsResponse> {
return this.sendOperationRequest(
{
projectId,
batch,
options
},
createImageRegionsOperationSpec,
callback) as Promise<Models.CreateImageRegionsResponse>;
}
/**
* @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<msRest.RestResponse>
*/
deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
/**
* @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>): 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>): void;
deleteImageRegions(projectId: string, regionIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
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<Models.QuerySuggestedImagesResponse>
*/
querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options?: msRest.RequestOptionsBase): Promise<Models.QuerySuggestedImagesResponse>;
/**
* @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<Models.SuggestedTagAndRegionQuery>): 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<Models.SuggestedTagAndRegionQuery>): void;
querySuggestedImages(projectId: string, iterationId: string, query: Models.SuggestedTagAndRegionQueryToken, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SuggestedTagAndRegionQuery>, callback?: msRest.ServiceCallback<Models.SuggestedTagAndRegionQuery>): Promise<Models.QuerySuggestedImagesResponse> {
return this.sendOperationRequest(
{
projectId,
iterationId,
query,
options
},
querySuggestedImagesOperationSpec,
callback) as Promise<Models.QuerySuggestedImagesResponse>;
}
/**
* 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<Models.QuerySuggestedImageCountResponse>
*/
querySuggestedImageCount(projectId: string, iterationId: string, query: Models.TagFilter, options?: msRest.RequestOptionsBase): Promise<Models.QuerySuggestedImageCountResponse>;
/**
* @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<Models.QuerySuggestedImageCountResponse> {
return this.sendOperationRequest(
{
projectId,
iterationId,
query,
options
},
querySuggestedImageCountOperationSpec,
callback) as Promise<Models.QuerySuggestedImageCountResponse>;
}
/**
* 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<Models.GetTaggedImagesResponse>
*/
getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams): Promise<Models.GetTaggedImagesResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getTaggedImages(projectId: string, callback: msRest.ServiceCallback<Models.Image[]>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getTaggedImages(projectId: string, options: Models.TrainingAPIClientGetTaggedImagesOptionalParams, callback: msRest.ServiceCallback<Models.Image[]>): void;
getTaggedImages(projectId: string, options?: Models.TrainingAPIClientGetTaggedImagesOptionalParams | msRest.ServiceCallback<Models.Image[]>, callback?: msRest.ServiceCallback<Models.Image[]>): Promise<Models.GetTaggedImagesResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getTaggedImagesOperationSpec,
callback) as Promise<Models.GetTaggedImagesResponse>;
}
/**
* 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<Models.GetTaggedImageCountResponse>
*/
getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams): Promise<Models.GetTaggedImageCountResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getTaggedImageCount(projectId: string, callback: msRest.ServiceCallback<number>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getTaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetTaggedImageCountOptionalParams, callback: msRest.ServiceCallback<number>): void;
getTaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetTaggedImageCountOptionalParams | msRest.ServiceCallback<number>, callback?: msRest.ServiceCallback<number>): Promise<Models.GetTaggedImageCountResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getTaggedImageCountOperationSpec,
callback) as Promise<Models.GetTaggedImageCountResponse>;
}
/**
* @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<Models.CreateImageTagsResponse>
*/
createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase): Promise<Models.CreateImageTagsResponse>;
/**
* @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<Models.ImageTagCreateSummary>): 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<Models.ImageTagCreateSummary>): void;
createImageTags(projectId: string, batch: Models.ImageTagCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageTagCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageTagCreateSummary>): Promise<Models.CreateImageTagsResponse> {
return this.sendOperationRequest(
{
projectId,
batch,
options
},
createImageTagsOperationSpec,
callback) as Promise<Models.CreateImageTagsResponse>;
}
/**
* @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<msRest.RestResponse>
*/
deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
/**
* @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>): 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>): void;
deleteImageTags(projectId: string, imageIds: string[], tagIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
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<Models.GetUntaggedImagesResponse>
*/
getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams): Promise<Models.GetUntaggedImagesResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getUntaggedImages(projectId: string, callback: msRest.ServiceCallback<Models.Image[]>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getUntaggedImages(projectId: string, options: Models.TrainingAPIClientGetUntaggedImagesOptionalParams, callback: msRest.ServiceCallback<Models.Image[]>): void;
getUntaggedImages(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImagesOptionalParams | msRest.ServiceCallback<Models.Image[]>, callback?: msRest.ServiceCallback<Models.Image[]>): Promise<Models.GetUntaggedImagesResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getUntaggedImagesOperationSpec,
callback) as Promise<Models.GetUntaggedImagesResponse>;
}
/**
* 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<Models.GetUntaggedImageCountResponse>
*/
getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams): Promise<Models.GetUntaggedImageCountResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getUntaggedImageCount(projectId: string, callback: msRest.ServiceCallback<number>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getUntaggedImageCount(projectId: string, options: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams, callback: msRest.ServiceCallback<number>): void;
getUntaggedImageCount(projectId: string, options?: Models.TrainingAPIClientGetUntaggedImageCountOptionalParams | msRest.ServiceCallback<number>, callback?: msRest.ServiceCallback<number>): Promise<Models.GetUntaggedImageCountResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getUntaggedImageCountOperationSpec,
callback) as Promise<Models.GetUntaggedImageCountResponse>;
}
/**
* 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<Models.CreateImagesFromUrlsResponse>
*/
createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase): Promise<Models.CreateImagesFromUrlsResponse>;
/**
* @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<Models.ImageCreateSummary>): 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<Models.ImageCreateSummary>): void;
createImagesFromUrls(projectId: string, batch: Models.ImageUrlCreateBatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ImageCreateSummary>, callback?: msRest.ServiceCallback<Models.ImageCreateSummary>): Promise<Models.CreateImagesFromUrlsResponse> {
return this.sendOperationRequest(
{
projectId,
batch,
options
},
createImagesFromUrlsOperationSpec,
callback) as Promise<Models.CreateImagesFromUrlsResponse>;
}
/**
* @summary Get iterations for the project.
* @param projectId The project id.
* @param [options] The optional parameters
* @returns Promise<Models.GetIterationsResponse>
*/
getIterations(projectId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetIterationsResponse>;
/**
* @param projectId The project id.
* @param callback The callback
*/
getIterations(projectId: string, callback: msRest.ServiceCallback<Models.Iteration[]>): void;
/**
* @param projectId The project id.
* @param options The optional parameters
* @param callback The callback
*/
getIterations(projectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Iteration[]>): void;
getIterations(projectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Iteration[]>, callback?: msRest.ServiceCallback<Models.Iteration[]>): Promise<Models.GetIterationsResponse> {
return this.sendOperationRequest(
{
projectId,
options
},
getIterationsOperationSpec,
callback) as Promise<Models.GetIterationsResponse>;
}
/**
* @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<Models.GetIterationResponse>
*/
getIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetIterationResponse>;
/**
* @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<Models.Iteration>): 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<Models.Iteration>): void;
getIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Iteration>, callback?: msRest.ServiceCallback<Models.Iteration>): Promise<Models.GetIterationResponse> {
return this.sendOperationRequest(
{
projectId,
iterationId,
options
},
getIterationOperationSpec,
callback) as Promise<Models.GetIterationResponse>;
}
/**
* @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<msRest.RestResponse>
*/
deleteIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
/**
* @param projectId The project id.
* @param iterationId The iteration id.
* @param callback The callback
*/
deleteIteration(projectId: string, iterationId: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param projectId The project id.
* @param iterationId The iteration id.
* @param options The optional