/*
 * 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 parameters
   * @param callback The callback
   */
  deleteIteration(projectId: string, iterationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
  deleteIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
    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<Models.UpdateIterationResponse>
   */
  updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, options?: msRest.RequestOptionsBase): Promise<Models.UpdateIterationResponse>;
  /**
   * @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<Models.Iteration>): 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<Models.Iteration>): void;
  updateIteration(projectId: string, iterationId: string, updatedIteration: Models.Iteration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Iteration>, callback?: msRest.ServiceCallback<Models.Iteration>): Promise<Models.UpdateIterationResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        updatedIteration,
        options
      },
      updateIterationOperationSpec,
      callback) as Promise<Models.UpdateIterationResponse>;
  }

  /**
   * @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<Models.GetExportsResponse>
   */
  getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise<Models.GetExportsResponse>;
  /**
   * @param projectId The project id.
   * @param iterationId The iteration id.
   * @param callback The callback
   */
  getExports(projectId: string, iterationId: string, callback: msRest.ServiceCallback<Models.ExportModel[]>): 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<Models.ExportModel[]>): void;
  getExports(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ExportModel[]>, callback?: msRest.ServiceCallback<Models.ExportModel[]>): Promise<Models.GetExportsResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        options
      },
      getExportsOperationSpec,
      callback) as Promise<Models.GetExportsResponse>;
  }

  /**
   * @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<Models.ExportIterationResponse>
   */
  exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams): Promise<Models.ExportIterationResponse>;
  /**
   * @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<Models.ExportModel>): 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<Models.ExportModel>): void;
  exportIteration(projectId: string, iterationId: string, platform: Models.Platform, options?: Models.TrainingAPIClientExportIterationOptionalParams | msRest.ServiceCallback<Models.ExportModel>, callback?: msRest.ServiceCallback<Models.ExportModel>): Promise<Models.ExportIterationResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        platform,
        options
      },
      exportIterationOperationSpec,
      callback) as Promise<Models.ExportIterationResponse>;
  }

  /**
   * @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<Models.GetIterationPerformanceResponse>
   */
  getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams): Promise<Models.GetIterationPerformanceResponse>;
  /**
   * @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<Models.IterationPerformance>): 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<Models.IterationPerformance>): void;
  getIterationPerformance(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetIterationPerformanceOptionalParams | msRest.ServiceCallback<Models.IterationPerformance>, callback?: msRest.ServiceCallback<Models.IterationPerformance>): Promise<Models.GetIterationPerformanceResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        options
      },
      getIterationPerformanceOperationSpec,
      callback) as Promise<Models.GetIterationPerformanceResponse>;
  }

  /**
   * 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<Models.GetImagePerformancesResponse>
   */
  getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams): Promise<Models.GetImagePerformancesResponse>;
  /**
   * @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<Models.ImagePerformance[]>): 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<Models.ImagePerformance[]>): void;
  getImagePerformances(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformancesOptionalParams | msRest.ServiceCallback<Models.ImagePerformance[]>, callback?: msRest.ServiceCallback<Models.ImagePerformance[]>): Promise<Models.GetImagePerformancesResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        options
      },
      getImagePerformancesOperationSpec,
      callback) as Promise<Models.GetImagePerformancesResponse>;
  }

  /**
   * 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<Models.GetImagePerformanceCountResponse>
   */
  getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams): Promise<Models.GetImagePerformanceCountResponse>;
  /**
   * @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<number>): 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<number>): void;
  getImagePerformanceCount(projectId: string, iterationId: string, options?: Models.TrainingAPIClientGetImagePerformanceCountOptionalParams | msRest.ServiceCallback<number>, callback?: msRest.ServiceCallback<number>): Promise<Models.GetImagePerformanceCountResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        options
      },
      getImagePerformanceCountOperationSpec,
      callback) as Promise<Models.GetImagePerformanceCountResponse>;
  }

  /**
   * @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<Models.PublishIterationResponse>
   */
  publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: Models.TrainingAPIClientPublishIterationOptionalParams): Promise<Models.PublishIterationResponse>;
  /**
   * @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<boolean>): 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<boolean>): void;
  publishIteration(projectId: string, iterationId: string, publishName: string, predictionId: string, options?: Models.TrainingAPIClientPublishIterationOptionalParams | msRest.ServiceCallback<boolean>, callback?: msRest.ServiceCallback<boolean>): Promise<Models.PublishIterationResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        publishName,
        predictionId,
        options
      },
      publishIterationOperationSpec,
      callback) as Promise<Models.PublishIterationResponse>;
  }

  /**
   * @summary Unpublish a specific iteration.
   * @param projectId The project id.
   * @param iterationId The iteration id.
   * @param [options] The optional parameters
   * @returns Promise<msRest.RestResponse>
   */
  unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
  /**
   * @param projectId The project id.
   * @param iterationId The iteration id.
   * @param callback The callback
   */
  unpublishIteration(projectId: string, iterationId: string, callback: msRest.ServiceCallback<void>): 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>): void;
  unpublishIteration(projectId: string, iterationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
    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<msRest.RestResponse>
   */
  deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
  /**
   * @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>): 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>): void;
  deletePrediction(projectId: string, ids: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
    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<Models.QueryPredictionsResponse>
   */
  queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase): Promise<Models.QueryPredictionsResponse>;
  /**
   * @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<Models.PredictionQueryResult>): 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<Models.PredictionQueryResult>): void;
  queryPredictions(projectId: string, query: Models.PredictionQueryToken, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PredictionQueryResult>, callback?: msRest.ServiceCallback<Models.PredictionQueryResult>): Promise<Models.QueryPredictionsResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        query,
        options
      },
      queryPredictionsOperationSpec,
      callback) as Promise<Models.QueryPredictionsResponse>;
  }

  /**
   * @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<Models.QuickTestImageResponse>
   */
  quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams): Promise<Models.QuickTestImageResponse>;
  /**
   * @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<Models.ImagePrediction>): 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<Models.ImagePrediction>): void;
  quickTestImage(projectId: string, imageData: msRest.HttpRequestBody, options?: Models.TrainingAPIClientQuickTestImageOptionalParams | msRest.ServiceCallback<Models.ImagePrediction>, callback?: msRest.ServiceCallback<Models.ImagePrediction>): Promise<Models.QuickTestImageResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        imageData,
        options
      },
      quickTestImageOperationSpec,
      callback) as Promise<Models.QuickTestImageResponse>;
  }

  /**
   * @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<Models.QuickTestImageUrlResponse>
   */
  quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams): Promise<Models.QuickTestImageUrlResponse>;
  /**
   * @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<Models.ImagePrediction>): 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<Models.ImagePrediction>): void;
  quickTestImageUrl(projectId: string, imageUrl: Models.ImageUrl, options?: Models.TrainingAPIClientQuickTestImageUrlOptionalParams | msRest.ServiceCallback<Models.ImagePrediction>, callback?: msRest.ServiceCallback<Models.ImagePrediction>): Promise<Models.QuickTestImageUrlResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        imageUrl,
        options
      },
      quickTestImageUrlOperationSpec,
      callback) as Promise<Models.QuickTestImageUrlResponse>;
  }

  /**
   * @summary Get the tags for a given project and iteration.
   * @param projectId The project id.
   * @param [options] The optional parameters
   * @returns Promise<Models.GetTagsResponse>
   */
  getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams): Promise<Models.GetTagsResponse>;
  /**
   * @param projectId The project id.
   * @param callback The callback
   */
  getTags(projectId: string, callback: msRest.ServiceCallback<Models.Tag[]>): void;
  /**
   * @param projectId The project id.
   * @param options The optional parameters
   * @param callback The callback
   */
  getTags(projectId: string, options: Models.TrainingAPIClientGetTagsOptionalParams, callback: msRest.ServiceCallback<Models.Tag[]>): void;
  getTags(projectId: string, options?: Models.TrainingAPIClientGetTagsOptionalParams | msRest.ServiceCallback<Models.Tag[]>, callback?: msRest.ServiceCallback<Models.Tag[]>): Promise<Models.GetTagsResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        options
      },
      getTagsOperationSpec,
      callback) as Promise<Models.GetTagsResponse>;
  }

  /**
   * @summary Create a tag for the project.
   * @param projectId The project id.
   * @param name The tag name.
   * @param [options] The optional parameters
   * @returns Promise<Models.CreateTagResponse>
   */
  createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams): Promise<Models.CreateTagResponse>;
  /**
   * @param projectId The project id.
   * @param name The tag name.
   * @param callback The callback
   */
  createTag(projectId: string, name: string, callback: msRest.ServiceCallback<Models.Tag>): 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<Models.Tag>): void;
  createTag(projectId: string, name: string, options?: Models.TrainingAPIClientCreateTagOptionalParams | msRest.ServiceCallback<Models.Tag>, callback?: msRest.ServiceCallback<Models.Tag>): Promise<Models.CreateTagResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        name,
        options
      },
      createTagOperationSpec,
      callback) as Promise<Models.CreateTagResponse>;
  }

  /**
   * @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<Models.GetTagResponse>
   */
  getTag(projectId: string, tagId: string, options?: Models.TrainingAPIClientGetTagOptionalParams): Promise<Models.GetTagResponse>;
  /**
   * @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<Models.Tag>): 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<Models.Tag>): void;
  getTag(projectId: string, tagId: string, options?: Models.TrainingAPIClientGetTagOptionalParams | msRest.ServiceCallback<Models.Tag>, callback?: msRest.ServiceCallback<Models.Tag>): Promise<Models.GetTagResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        tagId,
        options
      },
      getTagOperationSpec,
      callback) as Promise<Models.GetTagResponse>;
  }

  /**
   * @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<msRest.RestResponse>
   */
  deleteTag(projectId: string, tagId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
  /**
   * @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>): 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>): void;
  deleteTag(projectId: string, tagId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
    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<Models.UpdateTagResponse>
   */
  updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, options?: msRest.RequestOptionsBase): Promise<Models.UpdateTagResponse>;
  /**
   * @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<Models.Tag>): 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<Models.Tag>): void;
  updateTag(projectId: string, tagId: string, updatedTag: Models.Tag, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Tag>, callback?: msRest.ServiceCallback<Models.Tag>): Promise<Models.UpdateTagResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        tagId,
        updatedTag,
        options
      },
      updateTagOperationSpec,
      callback) as Promise<Models.UpdateTagResponse>;
  }

  /**
   * 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<Models.SuggestTagsAndRegionsResponse>
   */
  suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], options?: msRest.RequestOptionsBase): Promise<Models.SuggestTagsAndRegionsResponse>;
  /**
   * @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<Models.SuggestedTagAndRegion[]>): 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<Models.SuggestedTagAndRegion[]>): void;
  suggestTagsAndRegions(projectId: string, iterationId: string, imageIds: string[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SuggestedTagAndRegion[]>, callback?: msRest.ServiceCallback<Models.SuggestedTagAndRegion[]>): Promise<Models.SuggestTagsAndRegionsResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        iterationId,
        imageIds,
        options
      },
      suggestTagsAndRegionsOperationSpec,
      callback) as Promise<Models.SuggestTagsAndRegionsResponse>;
  }

  /**
   * @summary Queues project for training.
   * @param projectId The project id.
   * @param [options] The optional parameters
   * @returns Promise<Models.TrainProjectResponse>
   */
  trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams): Promise<Models.TrainProjectResponse>;
  /**
   * @param projectId The project id.
   * @param callback The callback
   */
  trainProject(projectId: string, callback: msRest.ServiceCallback<Models.Iteration>): void;
  /**
   * @param projectId The project id.
   * @param options The optional parameters
   * @param callback The callback
   */
  trainProject(projectId: string, options: Models.TrainingAPIClientTrainProjectOptionalParams, callback: msRest.ServiceCallback<Models.Iteration>): void;
  trainProject(projectId: string, options?: Models.TrainingAPIClientTrainProjectOptionalParams | msRest.ServiceCallback<Models.Iteration>, callback?: msRest.ServiceCallback<Models.Iteration>): Promise<Models.TrainProjectResponse> {
    return this.sendOperationRequest(
      {
        projectId,
        options
      },
      trainProjectOperationSpec,
      callback) as Promise<Models.TrainProjectResponse>;
  }

  /**
   * @summary Imports a project.
   * @param token Token generated from the export project call.
   * @param [options] The optional parameters
   * @returns Promise<Models.ImportProjectResponse>
   */
  importProject(token: string, options?: Models.TrainingAPIClientImportProjectOptionalParams): Promise<Models.ImportProjectResponse>;
  /**
   * @param token Token generated from the export project call.
   * @param callback The callback
   */
  importProject(token: string, callback: msRest.ServiceCallback<Models.Project>): 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<Models.Project>): void;
  importProject(token: string, options?: Models.TrainingAPIClientImportProjectOptionalParams | msRest.ServiceCallback<Models.Project>, callback?: msRest.ServiceCallback<Models.Project>): Promise<Models.ImportProjectResponse> {
    return this.sendOperationRequest(
      {
        token,
        options
      },
      importProjectOperationSpec,
      callback) as Promise<Models.ImportProjectResponse>;
  }
}

// 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
};
