/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Class representing a CustomVisionError.
 */
class CustomVisionError {
  /**
   * Create a CustomVisionError.
   * @property {string} code The error code. Possible values include:
   * 'NoError', 'BadRequest', 'BadRequestExceededBatchSize',
   * 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName',
   * 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription',
   * 'BadRequestProjectUnknownDomain',
   * 'BadRequestProjectUnknownClassification',
   * 'BadRequestProjectUnsupportedDomainTypeChange',
   * 'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName',
   * 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription',
   * 'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified',
   * 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
   * 'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
   * 'BadRequestTagType', 'BadRequestMultipleNegativeTag',
   * 'BadRequestImageTags', 'BadRequestImageRegions',
   * 'BadRequestNegativeAndRegularTagOnSameImage',
   * 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished',
   * 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget',
   * 'BadRequestUnpublishFailed', 'BadRequestIterationNotPublished',
   * 'BadRequestSubscriptionApi', 'BadRequestExceedProjectLimit',
   * 'BadRequestExceedIterationPerProjectLimit',
   * 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit',
   * 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName',
   * 'BadRequestNotLimitedTrial', 'BadRequestImageBatch',
   * 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat',
   * 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount',
   * 'BadRequestTrainingNotNeeded',
   * 'BadRequestTrainingNotNeededButTrainingPipelineUpdated',
   * 'BadRequestTrainingValidationFailed',
   * 'BadRequestClassificationTrainingValidationFailed',
   * 'BadRequestMultiClassClassificationTrainingValidationFailed',
   * 'BadRequestMultiLabelClassificationTrainingValidationFailed',
   * 'BadRequestDetectionTrainingValidationFailed',
   * 'BadRequestTrainingAlreadyInProgress',
   * 'BadRequestDetectionTrainingNotAllowNegativeTag',
   * 'BadRequestInvalidEmailAddress',
   * 'BadRequestDomainNotSupportedForAdvancedTraining',
   * 'BadRequestExportPlatformNotSupportedForAdvancedTraining',
   * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining',
   * 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress',
   * 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount',
   * 'BadRequestPredictionTagsExceededCount',
   * 'BadRequestPredictionResultsExceededCount',
   * 'BadRequestPredictionInvalidApplicationName',
   * 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
   * 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
   * 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
   * 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
   * 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability',
   * 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound',
   * 'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
   * 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
   * 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
   * 'Conflict', 'ConflictInvalid', 'ErrorUnknown',
   * 'ErrorProjectInvalidWorkspace',
   * 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
   * 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
   * 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout',
   * 'ErrorFeaturizationInvalidFeaturizer',
   * 'ErrorFeaturizationAugmentationUnavailable',
   * 'ErrorFeaturizationUnrecognizedJob',
   * 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
   * 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
   * 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
   * 'ErrorPredictionModelNotCached', 'ErrorPrediction',
   * 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'
   * @property {string} message A message explaining the error reported by the
   * service.
   */
  constructor() {
  }

  /**
   * Defines the metadata of CustomVisionError
   *
   * @returns {object} metadata of CustomVisionError
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CustomVisionError',
      type: {
        name: 'Composite',
        className: 'CustomVisionError',
        modelProperties: {
          code: {
            required: true,
            serializedName: 'code',
            type: {
              name: 'String'
            }
          },
          message: {
            required: true,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CustomVisionError;
