| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Linq; |
| | 16 | |
|
| | 17 | | public partial class CustomVisionError |
| | 18 | | { |
| | 19 | | /// <summary> |
| | 20 | | /// Initializes a new instance of the CustomVisionError class. |
| | 21 | | /// </summary> |
| 0 | 22 | | public CustomVisionError() |
| | 23 | | { |
| | 24 | | CustomInit(); |
| 0 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the CustomVisionError class. |
| | 29 | | /// </summary> |
| | 30 | | /// <param name="code">The error code. Possible values include: |
| | 31 | | /// 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', |
| | 32 | | /// 'BadRequestNotSupported', 'BadRequestInvalidIds', |
| | 33 | | /// 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', |
| | 34 | | /// 'BadRequestProjectDescription', 'BadRequestProjectUnknownDomain', |
| | 35 | | /// 'BadRequestProjectUnknownClassification', |
| | 36 | | /// 'BadRequestProjectUnsupportedDomainTypeChange', |
| | 37 | | /// 'BadRequestProjectUnsupportedExportPlatform', |
| | 38 | | /// 'BadRequestProjectImagePreprocessingSettings', |
| | 39 | | /// 'BadRequestProjectDuplicated', 'BadRequestIterationName', |
| | 40 | | /// 'BadRequestIterationNameNotUnique', |
| | 41 | | /// 'BadRequestIterationDescription', |
| | 42 | | /// 'BadRequestIterationIsNotTrained', |
| | 43 | | /// 'BadRequestIterationValidationFailed', |
| | 44 | | /// 'BadRequestWorkspaceCannotBeModified', |
| | 45 | | /// 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', |
| | 46 | | /// 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', |
| | 47 | | /// 'BadRequestTagType', 'BadRequestMultipleNegativeTag', |
| | 48 | | /// 'BadRequestMultipleGeneralProductTag', 'BadRequestImageTags', |
| | 49 | | /// 'BadRequestImageRegions', |
| | 50 | | /// 'BadRequestNegativeAndRegularTagOnSameImage', |
| | 51 | | /// 'BadRequestUnsupportedDomain', 'BadRequestRequiredParamIsNull', |
| | 52 | | /// 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', |
| | 53 | | /// 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', |
| | 54 | | /// 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', |
| | 55 | | /// 'BadRequestExceedProjectLimit', |
| | 56 | | /// 'BadRequestExceedIterationPerProjectLimit', |
| | 57 | | /// 'BadRequestExceedTagPerProjectLimit', |
| | 58 | | /// 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', |
| | 59 | | /// 'BadRequestCannotMigrateProjectWithName', |
| | 60 | | /// 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', |
| | 61 | | /// 'BadRequestImageStream', 'BadRequestImageUrl', |
| | 62 | | /// 'BadRequestImageFormat', 'BadRequestImageSizeBytes', |
| | 63 | | /// 'BadRequestImageDimensions', 'BadRequestImageExceededCount', |
| | 64 | | /// 'BadRequestTrainingNotNeeded', |
| | 65 | | /// 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', |
| | 66 | | /// 'BadRequestTrainingValidationFailed', |
| | 67 | | /// 'BadRequestClassificationTrainingValidationFailed', |
| | 68 | | /// 'BadRequestMultiClassClassificationTrainingValidationFailed', |
| | 69 | | /// 'BadRequestMultiLabelClassificationTrainingValidationFailed', |
| | 70 | | /// 'BadRequestDetectionTrainingValidationFailed', |
| | 71 | | /// 'BadRequestTrainingAlreadyInProgress', |
| | 72 | | /// 'BadRequestDetectionTrainingNotAllowNegativeTag', |
| | 73 | | /// 'BadRequestInvalidEmailAddress', |
| | 74 | | /// 'BadRequestDomainNotSupportedForAdvancedTraining', |
| | 75 | | /// 'BadRequestExportPlatformNotSupportedForAdvancedTraining', |
| | 76 | | /// 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', |
| | 77 | | /// 'BadRequestExportValidationFailed', |
| | 78 | | /// 'BadRequestExportAlreadyInProgress', |
| | 79 | | /// 'BadRequestPredictionIdsMissing', |
| | 80 | | /// 'BadRequestPredictionIdsExceededCount', |
| | 81 | | /// 'BadRequestPredictionTagsExceededCount', |
| | 82 | | /// 'BadRequestPredictionResultsExceededCount', |
| | 83 | | /// 'BadRequestPredictionInvalidApplicationName', |
| | 84 | | /// 'BadRequestPredictionInvalidQueryParameters', |
| | 85 | | /// 'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining', |
| | 86 | | /// 'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue', |
| | 87 | | /// 'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactUri', |
| | 88 | | /// 'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalid', |
| | 89 | | /// 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', |
| | 90 | | /// 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', |
| | 91 | | /// 'ForbiddenUserSignupAllowanceExceeded', |
| | 92 | | /// 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', |
| | 93 | | /// 'ForbiddenUserInsufficientCapability', 'ForbiddenDRModeEnabled', |
| | 94 | | /// 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', |
| | 95 | | /// 'NotFoundProjectDefaultIteration', 'NotFoundIteration', |
| | 96 | | /// 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', |
| | 97 | | /// 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', |
| | 98 | | /// 'Conflict', 'ConflictInvalid', 'ErrorUnknown', |
| | 99 | | /// 'ErrorIterationCopyFailed', |
| | 100 | | /// 'ErrorPreparePerformanceMigrationFailed', |
| | 101 | | /// 'ErrorProjectInvalidWorkspace', |
| | 102 | | /// 'ErrorProjectInvalidPipelineConfiguration', |
| | 103 | | /// 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', |
| | 104 | | /// 'ErrorProjectImportRequestFailed', |
| | 105 | | /// 'ErrorProjectExportRequestFailed', |
| | 106 | | /// 'ErrorFeaturizationServiceUnavailable', |
| | 107 | | /// 'ErrorFeaturizationQueueTimeout', |
| | 108 | | /// 'ErrorFeaturizationInvalidFeaturizer', |
| | 109 | | /// 'ErrorFeaturizationAugmentationUnavailable', |
| | 110 | | /// 'ErrorFeaturizationUnrecognizedJob', |
| | 111 | | /// 'ErrorFeaturizationAugmentationError', |
| | 112 | | /// 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', |
| | 113 | | /// 'ErrorExporterInvalidClassifier', |
| | 114 | | /// 'ErrorPredictionServiceUnavailable', |
| | 115 | | /// 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', |
| | 116 | | /// 'ErrorPrediction', 'ErrorPredictionStorage', 'ErrorRegionProposal', |
| | 117 | | /// 'ErrorUnknownBaseModel', 'ErrorInvalid'</param> |
| | 118 | | /// <param name="message">A message explaining the error reported by |
| | 119 | | /// the service.</param> |
| 0 | 120 | | public CustomVisionError(string code, string message) |
| | 121 | | { |
| 0 | 122 | | Code = code; |
| 0 | 123 | | Message = message; |
| | 124 | | CustomInit(); |
| 0 | 125 | | } |
| | 126 | |
|
| | 127 | | /// <summary> |
| | 128 | | /// An initialization method that performs custom operations like setting defaults |
| | 129 | | /// </summary> |
| | 130 | | partial void CustomInit(); |
| | 131 | |
|
| | 132 | | /// <summary> |
| | 133 | | /// Gets or sets the error code. Possible values include: 'NoError', |
| | 134 | | /// 'BadRequest', 'BadRequestExceededBatchSize', |
| | 135 | | /// 'BadRequestNotSupported', 'BadRequestInvalidIds', |
| | 136 | | /// 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', |
| | 137 | | /// 'BadRequestProjectDescription', 'BadRequestProjectUnknownDomain', |
| | 138 | | /// 'BadRequestProjectUnknownClassification', |
| | 139 | | /// 'BadRequestProjectUnsupportedDomainTypeChange', |
| | 140 | | /// 'BadRequestProjectUnsupportedExportPlatform', |
| | 141 | | /// 'BadRequestProjectImagePreprocessingSettings', |
| | 142 | | /// 'BadRequestProjectDuplicated', 'BadRequestIterationName', |
| | 143 | | /// 'BadRequestIterationNameNotUnique', |
| | 144 | | /// 'BadRequestIterationDescription', |
| | 145 | | /// 'BadRequestIterationIsNotTrained', |
| | 146 | | /// 'BadRequestIterationValidationFailed', |
| | 147 | | /// 'BadRequestWorkspaceCannotBeModified', |
| | 148 | | /// 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', |
| | 149 | | /// 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', |
| | 150 | | /// 'BadRequestTagType', 'BadRequestMultipleNegativeTag', |
| | 151 | | /// 'BadRequestMultipleGeneralProductTag', 'BadRequestImageTags', |
| | 152 | | /// 'BadRequestImageRegions', |
| | 153 | | /// 'BadRequestNegativeAndRegularTagOnSameImage', |
| | 154 | | /// 'BadRequestUnsupportedDomain', 'BadRequestRequiredParamIsNull', |
| | 155 | | /// 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', |
| | 156 | | /// 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', |
| | 157 | | /// 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', |
| | 158 | | /// 'BadRequestExceedProjectLimit', |
| | 159 | | /// 'BadRequestExceedIterationPerProjectLimit', |
| | 160 | | /// 'BadRequestExceedTagPerProjectLimit', |
| | 161 | | /// 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', |
| | 162 | | /// 'BadRequestCannotMigrateProjectWithName', |
| | 163 | | /// 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', |
| | 164 | | /// 'BadRequestImageStream', 'BadRequestImageUrl', |
| | 165 | | /// 'BadRequestImageFormat', 'BadRequestImageSizeBytes', |
| | 166 | | /// 'BadRequestImageDimensions', 'BadRequestImageExceededCount', |
| | 167 | | /// 'BadRequestTrainingNotNeeded', |
| | 168 | | /// 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', |
| | 169 | | /// 'BadRequestTrainingValidationFailed', |
| | 170 | | /// 'BadRequestClassificationTrainingValidationFailed', |
| | 171 | | /// 'BadRequestMultiClassClassificationTrainingValidationFailed', |
| | 172 | | /// 'BadRequestMultiLabelClassificationTrainingValidationFailed', |
| | 173 | | /// 'BadRequestDetectionTrainingValidationFailed', |
| | 174 | | /// 'BadRequestTrainingAlreadyInProgress', |
| | 175 | | /// 'BadRequestDetectionTrainingNotAllowNegativeTag', |
| | 176 | | /// 'BadRequestInvalidEmailAddress', |
| | 177 | | /// 'BadRequestDomainNotSupportedForAdvancedTraining', |
| | 178 | | /// 'BadRequestExportPlatformNotSupportedForAdvancedTraining', |
| | 179 | | /// 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', |
| | 180 | | /// 'BadRequestExportValidationFailed', |
| | 181 | | /// 'BadRequestExportAlreadyInProgress', |
| | 182 | | /// 'BadRequestPredictionIdsMissing', |
| | 183 | | /// 'BadRequestPredictionIdsExceededCount', |
| | 184 | | /// 'BadRequestPredictionTagsExceededCount', |
| | 185 | | /// 'BadRequestPredictionResultsExceededCount', |
| | 186 | | /// 'BadRequestPredictionInvalidApplicationName', |
| | 187 | | /// 'BadRequestPredictionInvalidQueryParameters', |
| | 188 | | /// 'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining', |
| | 189 | | /// 'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue', |
| | 190 | | /// 'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactUri', |
| | 191 | | /// 'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalid', |
| | 192 | | /// 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', |
| | 193 | | /// 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', |
| | 194 | | /// 'ForbiddenUserSignupAllowanceExceeded', |
| | 195 | | /// 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', |
| | 196 | | /// 'ForbiddenUserInsufficientCapability', 'ForbiddenDRModeEnabled', |
| | 197 | | /// 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', |
| | 198 | | /// 'NotFoundProjectDefaultIteration', 'NotFoundIteration', |
| | 199 | | /// 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', |
| | 200 | | /// 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', |
| | 201 | | /// 'Conflict', 'ConflictInvalid', 'ErrorUnknown', |
| | 202 | | /// 'ErrorIterationCopyFailed', |
| | 203 | | /// 'ErrorPreparePerformanceMigrationFailed', |
| | 204 | | /// 'ErrorProjectInvalidWorkspace', |
| | 205 | | /// 'ErrorProjectInvalidPipelineConfiguration', |
| | 206 | | /// 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', |
| | 207 | | /// 'ErrorProjectImportRequestFailed', |
| | 208 | | /// 'ErrorProjectExportRequestFailed', |
| | 209 | | /// 'ErrorFeaturizationServiceUnavailable', |
| | 210 | | /// 'ErrorFeaturizationQueueTimeout', |
| | 211 | | /// 'ErrorFeaturizationInvalidFeaturizer', |
| | 212 | | /// 'ErrorFeaturizationAugmentationUnavailable', |
| | 213 | | /// 'ErrorFeaturizationUnrecognizedJob', |
| | 214 | | /// 'ErrorFeaturizationAugmentationError', |
| | 215 | | /// 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', |
| | 216 | | /// 'ErrorExporterInvalidClassifier', |
| | 217 | | /// 'ErrorPredictionServiceUnavailable', |
| | 218 | | /// 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', |
| | 219 | | /// 'ErrorPrediction', 'ErrorPredictionStorage', 'ErrorRegionProposal', |
| | 220 | | /// 'ErrorUnknownBaseModel', 'ErrorInvalid' |
| | 221 | | /// </summary> |
| | 222 | | [JsonProperty(PropertyName = "code")] |
| 0 | 223 | | public string Code { get; set; } |
| | 224 | |
|
| | 225 | | /// <summary> |
| | 226 | | /// Gets or sets a message explaining the error reported by the |
| | 227 | | /// service. |
| | 228 | | /// </summary> |
| | 229 | | [JsonProperty(PropertyName = "message")] |
| 0 | 230 | | public string Message { get; set; } |
| | 231 | |
|
| | 232 | | /// <summary> |
| | 233 | | /// Validate the object. |
| | 234 | | /// </summary> |
| | 235 | | /// <exception cref="ValidationException"> |
| | 236 | | /// Thrown if validation fails |
| | 237 | | /// </exception> |
| | 238 | | public virtual void Validate() |
| | 239 | | { |
| 0 | 240 | | if (Code == null) |
| | 241 | | { |
| 0 | 242 | | throw new ValidationException(ValidationRules.CannotBeNull, "Code"); |
| | 243 | | } |
| 0 | 244 | | if (Message == null) |
| | 245 | | { |
| 0 | 246 | | throw new ValidationException(ValidationRules.CannotBeNull, "Message"); |
| | 247 | | } |
| 0 | 248 | | } |
| | 249 | | } |
| | 250 | | } |