|
| 1 | +# coding=utf-8 |
| 2 | +# -------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the MIT License. See License.txt in the project root for |
| 5 | +# license information. |
| 6 | +# |
| 7 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 8 | +# Changes may cause incorrect behavior and will be lost if the code is |
| 9 | +# regenerated. |
| 10 | +# -------------------------------------------------------------------------- |
| 11 | + |
| 12 | +from msrest.serialization import Model |
| 13 | +from msrest.exceptions import HttpOperationError |
| 14 | + |
| 15 | + |
| 16 | +class CustomVisionError(Model): |
| 17 | + """CustomVisionError. |
| 18 | +
|
| 19 | + All required parameters must be populated in order to send to Azure. |
| 20 | +
|
| 21 | + :param code: Required. The error code. Possible values include: 'NoError', |
| 22 | + 'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported', |
| 23 | + 'BadRequestInvalidIds', 'BadRequestProjectName', |
| 24 | + 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', |
| 25 | + 'BadRequestProjectUnknownDomain', |
| 26 | + 'BadRequestProjectUnknownClassification', |
| 27 | + 'BadRequestProjectUnsupportedDomainTypeChange', |
| 28 | + 'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName', |
| 29 | + 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', |
| 30 | + 'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified', |
| 31 | + 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', |
| 32 | + 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', |
| 33 | + 'BadRequestTagType', 'BadRequestMultipleNegativeTag', |
| 34 | + 'BadRequestImageTags', 'BadRequestImageRegions', |
| 35 | + 'BadRequestNegativeAndRegularTagOnSameImage', |
| 36 | + 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished', |
| 37 | + 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget', |
| 38 | + 'BadRequestUnpublishFailed', 'BadRequestSubscriptionApi', |
| 39 | + 'BadRequestExceedProjectLimit', |
| 40 | + 'BadRequestExceedIterationPerProjectLimit', |
| 41 | + 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', |
| 42 | + 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', |
| 43 | + 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', |
| 44 | + 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat', |
| 45 | + 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount', |
| 46 | + 'BadRequestTrainingNotNeeded', |
| 47 | + 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', |
| 48 | + 'BadRequestTrainingValidationFailed', |
| 49 | + 'BadRequestClassificationTrainingValidationFailed', |
| 50 | + 'BadRequestMultiClassClassificationTrainingValidationFailed', |
| 51 | + 'BadRequestMultiLabelClassificationTrainingValidationFailed', |
| 52 | + 'BadRequestDetectionTrainingValidationFailed', |
| 53 | + 'BadRequestTrainingAlreadyInProgress', |
| 54 | + 'BadRequestDetectionTrainingNotAllowNegativeTag', |
| 55 | + 'BadRequestInvalidEmailAddress', |
| 56 | + 'BadRequestDomainNotSupportedForAdvancedTraining', |
| 57 | + 'BadRequestExportPlatformNotSupportedForAdvancedTraining', |
| 58 | + 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', |
| 59 | + 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', |
| 60 | + 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', |
| 61 | + 'BadRequestPredictionTagsExceededCount', |
| 62 | + 'BadRequestPredictionResultsExceededCount', |
| 63 | + 'BadRequestPredictionInvalidApplicationName', |
| 64 | + 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid', |
| 65 | + 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', |
| 66 | + 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', |
| 67 | + 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist', |
| 68 | + 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', |
| 69 | + 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound', |
| 70 | + 'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration', |
| 71 | + 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', |
| 72 | + 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', |
| 73 | + 'Conflict', 'ConflictInvalid', 'ErrorUnknown', |
| 74 | + 'ErrorProjectInvalidWorkspace', |
| 75 | + 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', |
| 76 | + 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed', |
| 77 | + 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout', |
| 78 | + 'ErrorFeaturizationInvalidFeaturizer', |
| 79 | + 'ErrorFeaturizationAugmentationUnavailable', |
| 80 | + 'ErrorFeaturizationUnrecognizedJob', |
| 81 | + 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', |
| 82 | + 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', |
| 83 | + 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', |
| 84 | + 'ErrorPredictionModelNotCached', 'ErrorPrediction', |
| 85 | + 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid' |
| 86 | + :type code: str or |
| 87 | + ~azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorCodes |
| 88 | + :param message: Required. A message explaining the error reported by the |
| 89 | + service. |
| 90 | + :type message: str |
| 91 | + """ |
| 92 | + |
| 93 | + _validation = { |
| 94 | + 'code': {'required': True}, |
| 95 | + 'message': {'required': True}, |
| 96 | + } |
| 97 | + |
| 98 | + _attribute_map = { |
| 99 | + 'code': {'key': 'code', 'type': 'str'}, |
| 100 | + 'message': {'key': 'message', 'type': 'str'}, |
| 101 | + } |
| 102 | + |
| 103 | + def __init__(self, **kwargs): |
| 104 | + super(CustomVisionError, self).__init__(**kwargs) |
| 105 | + self.code = kwargs.get('code', None) |
| 106 | + self.message = kwargs.get('message', None) |
| 107 | + |
| 108 | + |
| 109 | +class CustomVisionErrorException(HttpOperationError): |
| 110 | + """Server responsed with exception of type: 'CustomVisionError'. |
| 111 | +
|
| 112 | + :param deserialize: A deserializer |
| 113 | + :param response: Server response to be deserialized. |
| 114 | + """ |
| 115 | + |
| 116 | + def __init__(self, deserialize, response, *args): |
| 117 | + |
| 118 | + super(CustomVisionErrorException, self).__init__(deserialize, response, 'CustomVisionError', *args) |
0 commit comments