1 package training 2 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // Licensed under the MIT License. See License.txt in the project root for 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 regenerated. 8 9 import ( 10 "encoding/json" 11 "github.com/Azure/go-autorest/autorest" 12 "github.com/Azure/go-autorest/autorest/date" 13 "github.com/gofrs/uuid" 14 "io" 15 ) 16 17 // The package's fully qualified name. 18 const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/cognitiveservices/v3.4-preview/customvision/training" 19 20 // Bool ... 21 type Bool struct { 22 autorest.Response `json:"-"` 23 Value *bool `json:"value,omitempty"` 24 } 25 26 // BoundingBox bounding box that defines a region of an image. 27 type BoundingBox struct { 28 // Left - Coordinate of the left boundary. 29 Left *float64 `json:"left,omitempty"` 30 // Top - Coordinate of the top boundary. 31 Top *float64 `json:"top,omitempty"` 32 // Width - Width. 33 Width *float64 `json:"width,omitempty"` 34 // Height - Height. 35 Height *float64 `json:"height,omitempty"` 36 } 37 38 // CreateProjectOptions options used for createProject. 39 type CreateProjectOptions struct { 40 // ExportModelContainerURI - The uri to the Azure Storage container that will be used to store exported models. 41 ExportModelContainerURI *string `json:"exportModelContainerUri,omitempty"` 42 // NotificationQueueURI - The uri to the Azure Storage queue that will be used to send project-related notifications. See <a href="https://go.microsoft.com/fwlink/?linkid=2144149">Storage notifications</a> documentation for setup and message format. 43 NotificationQueueURI *string `json:"notificationQueueUri,omitempty"` 44 } 45 46 // CustomBaseModelInfo ... 47 type CustomBaseModelInfo struct { 48 // ProjectID - Project Id of the previously trained project to be used for current iteration's training. 49 ProjectID *uuid.UUID `json:"projectId,omitempty"` 50 // IterationID - Iteration Id of the previously trained project to be used for current iteration's training. 51 IterationID *uuid.UUID `json:"iterationId,omitempty"` 52 } 53 54 // CustomVisionError ... 55 type CustomVisionError struct { 56 // Code - The error code. Possible values include: 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', 'BadRequestProjectImagePreprocessingSettings', 'BadRequestProjectDuplicated', 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', 'BadRequestIterationValidationFailed', 'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', 'BadRequestMultipleGeneralProductTag', 'BadRequestImageTags', 'BadRequestImageRegions', 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestUnsupportedDomain', 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', 'BadRequestIterationNotPublished', 'BadRequestSubscriptionAPI', 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', 'BadRequestImageURL', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', 'BadRequestImageDimensions', 'BadRequestImageAspectRatio', 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', 'BadRequestTrainingValidationFailed', 'BadRequestClassificationTrainingValidationFailed', 'BadRequestMultiClassClassificationTrainingValidationFailed', 'BadRequestMultiLabelClassificationTrainingValidationFailed', 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', 'BadRequestRetiredDomainNotSupportedForTraining', 'BadRequestDomainNotSupportedForAdvancedTraining', 'BadRequestExportPlatformNotSupportedForAdvancedTraining', 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', 'BadRequestCustomBaseModelIterationStatusNotCompleted', 'BadRequestCustomBaseModelDomainNotCompatible', 'BadRequestCustomBaseModelArchitectureRetired', 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining', 'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue', 'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactURI', 'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalidURI', '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', 'ErrorIterationCopyFailed', 'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace', 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed', 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorUnknownBaseModel', 'ErrorServerTimeOut', 'ErrorInvalid' 57 Code CustomVisionErrorCodes `json:"code,omitempty"` 58 // Message - A message explaining the error reported by the service. 59 Message *string `json:"message,omitempty"` 60 } 61 62 // Domain domains are used as the starting point for your project. Each domain is optimized for specific 63 // types of images. Domains with compact in their name can be exported. For more information visit the <a 64 // href="https://go.microsoft.com/fwlink/?linkid=2117014">domain documentation</a>. 65 type Domain struct { 66 autorest.Response `json:"-"` 67 // ID - READ-ONLY; Domain id. 68 ID *uuid.UUID `json:"id,omitempty"` 69 // Name - READ-ONLY; Name of the domain, describing the types of images used to train it. 70 Name *string `json:"name,omitempty"` 71 // Type - READ-ONLY; Domain type: Classification or ObjectDetection. Possible values include: 'Classification', 'ObjectDetection' 72 Type DomainType `json:"type,omitempty"` 73 // Exportable - READ-ONLY; Indicating if the domain is exportable. 74 Exportable *bool `json:"exportable,omitempty"` 75 // Enabled - READ-ONLY; Indicating if the domain is enabled. 76 Enabled *bool `json:"enabled,omitempty"` 77 // ExportablePlatforms - READ-ONLY; Platforms that the domain can be exported to. 78 ExportablePlatforms *[]string `json:"exportablePlatforms,omitempty"` 79 // ModelInformation - READ-ONLY; Model information. 80 ModelInformation *ModelInformation `json:"modelInformation,omitempty"` 81 } 82 83 // MarshalJSON is the custom marshaler for Domain. 84 func (d Domain) MarshalJSON() ([]byte, error) { 85 objectMap := make(map[string]interface{}) 86 return json.Marshal(objectMap) 87 } 88 89 // Export ... 90 type Export struct { 91 autorest.Response `json:"-"` 92 // Platform - READ-ONLY; Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK', 'OpenVino' 93 Platform ExportPlatform `json:"platform,omitempty"` 94 // Status - READ-ONLY; Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' 95 Status ExportStatus `json:"status,omitempty"` 96 // DownloadURI - READ-ONLY; URI used to download the model. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 97 DownloadURI *string `json:"downloadUri,omitempty"` 98 // Flavor - READ-ONLY; Flavor of the export. These are specializations of the export platform. 99 // Docker platform has valid flavors: Linux, Windows, ARM. 100 // Tensorflow platform has valid flavors: TensorFlowNormal, TensorFlowLite. 101 // ONNX platform has valid flavors: ONNX10, ONNX12. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' 102 Flavor ExportFlavor `json:"flavor,omitempty"` 103 // NewerVersionAvailable - READ-ONLY; Indicates an updated version of the export package is available and should be re-exported for the latest changes. 104 NewerVersionAvailable *bool `json:"newerVersionAvailable,omitempty"` 105 } 106 107 // MarshalJSON is the custom marshaler for Export. 108 func (e Export) MarshalJSON() ([]byte, error) { 109 objectMap := make(map[string]interface{}) 110 return json.Marshal(objectMap) 111 } 112 113 // Image image model to be sent as JSON. 114 type Image struct { 115 // ID - READ-ONLY; Id of the image. 116 ID *uuid.UUID `json:"id,omitempty"` 117 // Created - READ-ONLY; Date the image was created. 118 Created *date.Time `json:"created,omitempty"` 119 // Width - READ-ONLY; Width of the image. 120 Width *int32 `json:"width,omitempty"` 121 // Height - READ-ONLY; Height of the image. 122 Height *int32 `json:"height,omitempty"` 123 // ResizedImageURI - READ-ONLY; The URI to the (resized) image used for training. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 124 ResizedImageURI *string `json:"resizedImageUri,omitempty"` 125 // ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 126 ThumbnailURI *string `json:"thumbnailUri,omitempty"` 127 // OriginalImageURI - READ-ONLY; The URI to the original uploaded image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 128 OriginalImageURI *string `json:"originalImageUri,omitempty"` 129 // Tags - READ-ONLY; Tags associated with this image. 130 Tags *[]ImageTag `json:"tags,omitempty"` 131 // Regions - READ-ONLY; Regions associated with this image. 132 Regions *[]ImageRegion `json:"regions,omitempty"` 133 // Metadata - READ-ONLY; Metadata associated with this image. 134 Metadata map[string]*string `json:"metadata"` 135 } 136 137 // MarshalJSON is the custom marshaler for Image. 138 func (i Image) MarshalJSON() ([]byte, error) { 139 objectMap := make(map[string]interface{}) 140 return json.Marshal(objectMap) 141 } 142 143 // ImageCreateResult ... 144 type ImageCreateResult struct { 145 // SourceURL - READ-ONLY; Source URL of the image. 146 SourceURL *string `json:"sourceUrl,omitempty"` 147 // Status - READ-ONLY; Status of the image creation. Possible values include: 'ImageCreateStatusOK', 'ImageCreateStatusOKDuplicate', 'ImageCreateStatusErrorSource', 'ImageCreateStatusErrorImageFormat', 'ImageCreateStatusErrorImageSize', 'ImageCreateStatusErrorStorage', 'ImageCreateStatusErrorLimitExceed', 'ImageCreateStatusErrorTagLimitExceed', 'ImageCreateStatusErrorRegionLimitExceed', 'ImageCreateStatusErrorUnknown', 'ImageCreateStatusErrorNegativeAndRegularTagOnSameImage', 'ImageCreateStatusErrorImageDimensions', 'ImageCreateStatusErrorInvalidTag' 148 Status ImageCreateStatus `json:"status,omitempty"` 149 // Image - READ-ONLY; The image. 150 Image *Image `json:"image,omitempty"` 151 } 152 153 // MarshalJSON is the custom marshaler for ImageCreateResult. 154 func (icr ImageCreateResult) MarshalJSON() ([]byte, error) { 155 objectMap := make(map[string]interface{}) 156 return json.Marshal(objectMap) 157 } 158 159 // ImageCreateSummary ... 160 type ImageCreateSummary struct { 161 autorest.Response `json:"-"` 162 // IsBatchSuccessful - READ-ONLY; True if all of the images in the batch were created successfully, otherwise false. 163 IsBatchSuccessful *bool `json:"isBatchSuccessful,omitempty"` 164 // Images - READ-ONLY; List of the image creation results. 165 Images *[]ImageCreateResult `json:"images,omitempty"` 166 } 167 168 // MarshalJSON is the custom marshaler for ImageCreateSummary. 169 func (ics ImageCreateSummary) MarshalJSON() ([]byte, error) { 170 objectMap := make(map[string]interface{}) 171 return json.Marshal(objectMap) 172 } 173 174 // ImageFileCreateBatch ... 175 type ImageFileCreateBatch struct { 176 Images *[]ImageFileCreateEntry `json:"images,omitempty"` 177 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 178 // Metadata - The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited to 128. The length of value is limited to 256. 179 Metadata map[string]*string `json:"metadata"` 180 } 181 182 // MarshalJSON is the custom marshaler for ImageFileCreateBatch. 183 func (ifcb ImageFileCreateBatch) MarshalJSON() ([]byte, error) { 184 objectMap := make(map[string]interface{}) 185 if ifcb.Images != nil { 186 objectMap["images"] = ifcb.Images 187 } 188 if ifcb.TagIds != nil { 189 objectMap["tagIds"] = ifcb.TagIds 190 } 191 if ifcb.Metadata != nil { 192 objectMap["metadata"] = ifcb.Metadata 193 } 194 return json.Marshal(objectMap) 195 } 196 197 // ImageFileCreateEntry ... 198 type ImageFileCreateEntry struct { 199 Name *string `json:"name,omitempty"` 200 Contents *[]byte `json:"contents,omitempty"` 201 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 202 Regions *[]Region `json:"regions,omitempty"` 203 } 204 205 // ImageIDCreateBatch ... 206 type ImageIDCreateBatch struct { 207 Images *[]ImageIDCreateEntry `json:"images,omitempty"` 208 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 209 // Metadata - The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited to 128. The length of value is limited to 256. 210 Metadata map[string]*string `json:"metadata"` 211 } 212 213 // MarshalJSON is the custom marshaler for ImageIDCreateBatch. 214 func (iicb ImageIDCreateBatch) MarshalJSON() ([]byte, error) { 215 objectMap := make(map[string]interface{}) 216 if iicb.Images != nil { 217 objectMap["images"] = iicb.Images 218 } 219 if iicb.TagIds != nil { 220 objectMap["tagIds"] = iicb.TagIds 221 } 222 if iicb.Metadata != nil { 223 objectMap["metadata"] = iicb.Metadata 224 } 225 return json.Marshal(objectMap) 226 } 227 228 // ImageIDCreateEntry ... 229 type ImageIDCreateEntry struct { 230 // ID - Id of the image. 231 ID *uuid.UUID `json:"id,omitempty"` 232 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 233 Regions *[]Region `json:"regions,omitempty"` 234 } 235 236 // ImageMetadataUpdateEntry entry associating a metadata to an image. 237 type ImageMetadataUpdateEntry struct { 238 // ImageID - Id of the image. 239 ImageID *uuid.UUID `json:"imageId,omitempty"` 240 // Status - Status of the metadata update. Possible values include: 'ImageMetadataUpdateStatusOK', 'ImageMetadataUpdateStatusErrorImageNotFound', 'ImageMetadataUpdateStatusErrorLimitExceed', 'ImageMetadataUpdateStatusErrorUnknown' 241 Status ImageMetadataUpdateStatus `json:"status,omitempty"` 242 // Metadata - Metadata of the image. 243 Metadata map[string]*string `json:"metadata"` 244 } 245 246 // MarshalJSON is the custom marshaler for ImageMetadataUpdateEntry. 247 func (imue ImageMetadataUpdateEntry) MarshalJSON() ([]byte, error) { 248 objectMap := make(map[string]interface{}) 249 if imue.ImageID != nil { 250 objectMap["imageId"] = imue.ImageID 251 } 252 if imue.Status != "" { 253 objectMap["status"] = imue.Status 254 } 255 if imue.Metadata != nil { 256 objectMap["metadata"] = imue.Metadata 257 } 258 return json.Marshal(objectMap) 259 } 260 261 // ImageMetadataUpdateSummary ... 262 type ImageMetadataUpdateSummary struct { 263 autorest.Response `json:"-"` 264 // IsBatchSuccessful - READ-ONLY 265 IsBatchSuccessful *bool `json:"isBatchSuccessful,omitempty"` 266 // Images - READ-ONLY 267 Images *[]ImageMetadataUpdateEntry `json:"images,omitempty"` 268 } 269 270 // MarshalJSON is the custom marshaler for ImageMetadataUpdateSummary. 271 func (imus ImageMetadataUpdateSummary) MarshalJSON() ([]byte, error) { 272 objectMap := make(map[string]interface{}) 273 return json.Marshal(objectMap) 274 } 275 276 // ImagePerformance image performance model. 277 type ImagePerformance struct { 278 // Predictions - READ-ONLY 279 Predictions *[]Prediction `json:"predictions,omitempty"` 280 // ID - READ-ONLY; Id of the image. 281 ID *uuid.UUID `json:"id,omitempty"` 282 // Created - READ-ONLY; Date the image was created. 283 Created *date.Time `json:"created,omitempty"` 284 // Width - READ-ONLY; Width of the image. 285 Width *int32 `json:"width,omitempty"` 286 // Height - READ-ONLY; Height of the image. 287 Height *int32 `json:"height,omitempty"` 288 // ImageURI - READ-ONLY; The URI to the image used for training. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 289 ImageURI *string `json:"imageUri,omitempty"` 290 // ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 291 ThumbnailURI *string `json:"thumbnailUri,omitempty"` 292 // Tags - READ-ONLY; Tags associated with this image. 293 Tags *[]ImageTag `json:"tags,omitempty"` 294 // Regions - READ-ONLY; Regions associated with this image. 295 Regions *[]ImageRegion `json:"regions,omitempty"` 296 } 297 298 // MarshalJSON is the custom marshaler for ImagePerformance. 299 func (IP ImagePerformance) MarshalJSON() ([]byte, error) { 300 objectMap := make(map[string]interface{}) 301 return json.Marshal(objectMap) 302 } 303 304 // ImagePrediction result of an image prediction request. 305 type ImagePrediction struct { 306 autorest.Response `json:"-"` 307 // ID - READ-ONLY; Prediction Id. 308 ID *uuid.UUID `json:"id,omitempty"` 309 // Project - READ-ONLY; Project Id. 310 Project *uuid.UUID `json:"project,omitempty"` 311 // Iteration - READ-ONLY; Iteration Id. 312 Iteration *uuid.UUID `json:"iteration,omitempty"` 313 // Created - READ-ONLY; Date this prediction was created. 314 Created *date.Time `json:"created,omitempty"` 315 // Predictions - READ-ONLY; List of predictions. 316 Predictions *[]Prediction `json:"predictions,omitempty"` 317 } 318 319 // MarshalJSON is the custom marshaler for ImagePrediction. 320 func (IP ImagePrediction) MarshalJSON() ([]byte, error) { 321 objectMap := make(map[string]interface{}) 322 return json.Marshal(objectMap) 323 } 324 325 // ImageProcessingSettings represents image preprocessing settings used by image augmentation. 326 type ImageProcessingSettings struct { 327 // AugmentationMethods - Gets or sets enabled image transforms. The key corresponds to the transform name. If value is set to true, then correspondent transform is enabled. Otherwise this transform will not be used. 328 // Augmentation will be uniformly distributed among enabled transforms. 329 AugmentationMethods map[string]*bool `json:"augmentationMethods"` 330 } 331 332 // MarshalJSON is the custom marshaler for ImageProcessingSettings. 333 func (ips ImageProcessingSettings) MarshalJSON() ([]byte, error) { 334 objectMap := make(map[string]interface{}) 335 if ips.AugmentationMethods != nil { 336 objectMap["augmentationMethods"] = ips.AugmentationMethods 337 } 338 return json.Marshal(objectMap) 339 } 340 341 // ImageRegion ... 342 type ImageRegion struct { 343 // RegionID - READ-ONLY 344 RegionID *uuid.UUID `json:"regionId,omitempty"` 345 // TagName - READ-ONLY 346 TagName *string `json:"tagName,omitempty"` 347 // Created - READ-ONLY 348 Created *date.Time `json:"created,omitempty"` 349 // TagID - Id of the tag associated with this region. 350 TagID *uuid.UUID `json:"tagId,omitempty"` 351 // Left - Coordinate of the left boundary. 352 Left *float64 `json:"left,omitempty"` 353 // Top - Coordinate of the top boundary. 354 Top *float64 `json:"top,omitempty"` 355 // Width - Width. 356 Width *float64 `json:"width,omitempty"` 357 // Height - Height. 358 Height *float64 `json:"height,omitempty"` 359 } 360 361 // MarshalJSON is the custom marshaler for ImageRegion. 362 func (ir ImageRegion) MarshalJSON() ([]byte, error) { 363 objectMap := make(map[string]interface{}) 364 if ir.TagID != nil { 365 objectMap["tagId"] = ir.TagID 366 } 367 if ir.Left != nil { 368 objectMap["left"] = ir.Left 369 } 370 if ir.Top != nil { 371 objectMap["top"] = ir.Top 372 } 373 if ir.Width != nil { 374 objectMap["width"] = ir.Width 375 } 376 if ir.Height != nil { 377 objectMap["height"] = ir.Height 378 } 379 return json.Marshal(objectMap) 380 } 381 382 // ImageRegionCreateBatch batch of image region information to create. 383 type ImageRegionCreateBatch struct { 384 Regions *[]ImageRegionCreateEntry `json:"regions,omitempty"` 385 } 386 387 // ImageRegionCreateEntry entry associating a region to an image. 388 type ImageRegionCreateEntry struct { 389 // ImageID - Id of the image. 390 ImageID *uuid.UUID `json:"imageId,omitempty"` 391 // TagID - Id of the tag associated with this region. 392 TagID *uuid.UUID `json:"tagId,omitempty"` 393 // Left - Coordinate of the left boundary. 394 Left *float64 `json:"left,omitempty"` 395 // Top - Coordinate of the top boundary. 396 Top *float64 `json:"top,omitempty"` 397 // Width - Width. 398 Width *float64 `json:"width,omitempty"` 399 // Height - Height. 400 Height *float64 `json:"height,omitempty"` 401 } 402 403 // ImageRegionCreateResult ... 404 type ImageRegionCreateResult struct { 405 // ImageID - READ-ONLY 406 ImageID *uuid.UUID `json:"imageId,omitempty"` 407 // RegionID - READ-ONLY 408 RegionID *uuid.UUID `json:"regionId,omitempty"` 409 // TagName - READ-ONLY 410 TagName *string `json:"tagName,omitempty"` 411 // Created - READ-ONLY 412 Created *date.Time `json:"created,omitempty"` 413 // TagID - Id of the tag associated with this region. 414 TagID *uuid.UUID `json:"tagId,omitempty"` 415 // Left - Coordinate of the left boundary. 416 Left *float64 `json:"left,omitempty"` 417 // Top - Coordinate of the top boundary. 418 Top *float64 `json:"top,omitempty"` 419 // Width - Width. 420 Width *float64 `json:"width,omitempty"` 421 // Height - Height. 422 Height *float64 `json:"height,omitempty"` 423 } 424 425 // MarshalJSON is the custom marshaler for ImageRegionCreateResult. 426 func (ircr ImageRegionCreateResult) MarshalJSON() ([]byte, error) { 427 objectMap := make(map[string]interface{}) 428 if ircr.TagID != nil { 429 objectMap["tagId"] = ircr.TagID 430 } 431 if ircr.Left != nil { 432 objectMap["left"] = ircr.Left 433 } 434 if ircr.Top != nil { 435 objectMap["top"] = ircr.Top 436 } 437 if ircr.Width != nil { 438 objectMap["width"] = ircr.Width 439 } 440 if ircr.Height != nil { 441 objectMap["height"] = ircr.Height 442 } 443 return json.Marshal(objectMap) 444 } 445 446 // ImageRegionCreateSummary ... 447 type ImageRegionCreateSummary struct { 448 autorest.Response `json:"-"` 449 Created *[]ImageRegionCreateResult `json:"created,omitempty"` 450 Duplicated *[]ImageRegionCreateEntry `json:"duplicated,omitempty"` 451 Exceeded *[]ImageRegionCreateEntry `json:"exceeded,omitempty"` 452 } 453 454 // ImageRegionProposal ... 455 type ImageRegionProposal struct { 456 autorest.Response `json:"-"` 457 // ProjectID - READ-ONLY 458 ProjectID *uuid.UUID `json:"projectId,omitempty"` 459 // ImageID - READ-ONLY 460 ImageID *uuid.UUID `json:"imageId,omitempty"` 461 // Proposals - READ-ONLY 462 Proposals *[]RegionProposal `json:"proposals,omitempty"` 463 } 464 465 // MarshalJSON is the custom marshaler for ImageRegionProposal. 466 func (irp ImageRegionProposal) MarshalJSON() ([]byte, error) { 467 objectMap := make(map[string]interface{}) 468 return json.Marshal(objectMap) 469 } 470 471 // ImageTag ... 472 type ImageTag struct { 473 // TagID - READ-ONLY 474 TagID *uuid.UUID `json:"tagId,omitempty"` 475 // TagName - READ-ONLY 476 TagName *string `json:"tagName,omitempty"` 477 // Created - READ-ONLY 478 Created *date.Time `json:"created,omitempty"` 479 } 480 481 // MarshalJSON is the custom marshaler for ImageTag. 482 func (it ImageTag) MarshalJSON() ([]byte, error) { 483 objectMap := make(map[string]interface{}) 484 return json.Marshal(objectMap) 485 } 486 487 // ImageTagCreateBatch batch of image tags. 488 type ImageTagCreateBatch struct { 489 // Tags - Image Tag entries to include in this batch. 490 Tags *[]ImageTagCreateEntry `json:"tags,omitempty"` 491 } 492 493 // ImageTagCreateEntry entry associating a tag to an image. 494 type ImageTagCreateEntry struct { 495 // ImageID - Id of the image. 496 ImageID *uuid.UUID `json:"imageId,omitempty"` 497 // TagID - Id of the tag. 498 TagID *uuid.UUID `json:"tagId,omitempty"` 499 } 500 501 // ImageTagCreateSummary ... 502 type ImageTagCreateSummary struct { 503 autorest.Response `json:"-"` 504 Created *[]ImageTagCreateEntry `json:"created,omitempty"` 505 Duplicated *[]ImageTagCreateEntry `json:"duplicated,omitempty"` 506 Exceeded *[]ImageTagCreateEntry `json:"exceeded,omitempty"` 507 } 508 509 // ImageURL image url. 510 type ImageURL struct { 511 // URL - Url of the image. 512 URL *string `json:"url,omitempty"` 513 } 514 515 // ImageURLCreateBatch ... 516 type ImageURLCreateBatch struct { 517 Images *[]ImageURLCreateEntry `json:"images,omitempty"` 518 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 519 // Metadata - The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited to 128. The length of value is limited to 256. 520 Metadata map[string]*string `json:"metadata"` 521 } 522 523 // MarshalJSON is the custom marshaler for ImageURLCreateBatch. 524 func (iucb ImageURLCreateBatch) MarshalJSON() ([]byte, error) { 525 objectMap := make(map[string]interface{}) 526 if iucb.Images != nil { 527 objectMap["images"] = iucb.Images 528 } 529 if iucb.TagIds != nil { 530 objectMap["tagIds"] = iucb.TagIds 531 } 532 if iucb.Metadata != nil { 533 objectMap["metadata"] = iucb.Metadata 534 } 535 return json.Marshal(objectMap) 536 } 537 538 // ImageURLCreateEntry ... 539 type ImageURLCreateEntry struct { 540 // URL - Url of the image. 541 URL *string `json:"url,omitempty"` 542 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 543 Regions *[]Region `json:"regions,omitempty"` 544 } 545 546 // Int32 ... 547 type Int32 struct { 548 autorest.Response `json:"-"` 549 Value *int32 `json:"value,omitempty"` 550 } 551 552 // Iteration iteration model to be sent over JSON. 553 type Iteration struct { 554 autorest.Response `json:"-"` 555 // ID - READ-ONLY; Gets the id of the iteration. 556 ID *uuid.UUID `json:"id,omitempty"` 557 // Name - Gets or sets the name of the iteration. 558 Name *string `json:"name,omitempty"` 559 // Status - READ-ONLY; Gets the current iteration status. 560 Status *string `json:"status,omitempty"` 561 // Created - READ-ONLY; Gets the time this iteration was completed. 562 Created *date.Time `json:"created,omitempty"` 563 // LastModified - READ-ONLY; Gets the time this iteration was last modified. 564 LastModified *date.Time `json:"lastModified,omitempty"` 565 // TrainedAt - READ-ONLY; Gets the time this iteration was last modified. 566 TrainedAt *date.Time `json:"trainedAt,omitempty"` 567 // ProjectID - READ-ONLY; Gets the project id of the iteration. 568 ProjectID *uuid.UUID `json:"projectId,omitempty"` 569 // Exportable - READ-ONLY; Whether the iteration can be exported to another format for download. 570 Exportable *bool `json:"exportable,omitempty"` 571 // ExportableTo - READ-ONLY; A set of platforms this iteration can export to. 572 ExportableTo *[]string `json:"exportableTo,omitempty"` 573 // DomainID - READ-ONLY; Get or sets a guid of the domain the iteration has been trained on. 574 DomainID *uuid.UUID `json:"domainId,omitempty"` 575 // ClassificationType - READ-ONLY; Gets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' 576 ClassificationType Classifier `json:"classificationType,omitempty"` 577 // TrainingType - READ-ONLY; Gets the training type of the iteration. Possible values include: 'TypeRegular', 'TypeAdvanced' 578 TrainingType Type `json:"trainingType,omitempty"` 579 // ReservedBudgetInHours - READ-ONLY; Gets the reserved advanced training budget for the iteration. 580 ReservedBudgetInHours *int32 `json:"reservedBudgetInHours,omitempty"` 581 // TrainingTimeInMinutes - READ-ONLY; Gets the training time for the iteration. 582 TrainingTimeInMinutes *int32 `json:"trainingTimeInMinutes,omitempty"` 583 // PublishName - READ-ONLY; Name of the published model. 584 PublishName *string `json:"publishName,omitempty"` 585 // OriginalPublishResourceID - READ-ONLY; Resource Provider Id this iteration was originally published to. 586 OriginalPublishResourceID *string `json:"originalPublishResourceId,omitempty"` 587 // CustomBaseModelInfo - READ-ONLY; Information of the previously trained iteration which provides the base model for current iteration's training. 588 // Default value of null specifies that no previously trained iteration will be used for incremental learning. 589 CustomBaseModelInfo *CustomBaseModelInfo `json:"customBaseModelInfo,omitempty"` 590 // TrainingErrorDetails - READ-ONLY; Training error details, when training fails. 591 // Value is null when training succeeds. 592 TrainingErrorDetails *string `json:"trainingErrorDetails,omitempty"` 593 } 594 595 // MarshalJSON is the custom marshaler for Iteration. 596 func (i Iteration) MarshalJSON() ([]byte, error) { 597 objectMap := make(map[string]interface{}) 598 if i.Name != nil { 599 objectMap["name"] = i.Name 600 } 601 return json.Marshal(objectMap) 602 } 603 604 // IterationPerformance represents the detailed performance data for a trained iteration. 605 type IterationPerformance struct { 606 autorest.Response `json:"-"` 607 // PerTagPerformance - READ-ONLY; Gets the per-tag performance details for this iteration. 608 PerTagPerformance *[]TagPerformance `json:"perTagPerformance,omitempty"` 609 // Precision - READ-ONLY; Gets the precision. 610 Precision *float64 `json:"precision,omitempty"` 611 // PrecisionStdDeviation - READ-ONLY; Gets the standard deviation for the precision. 612 PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"` 613 // Recall - READ-ONLY; Gets the recall. 614 Recall *float64 `json:"recall,omitempty"` 615 // RecallStdDeviation - READ-ONLY; Gets the standard deviation for the recall. 616 RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"` 617 // AveragePrecision - READ-ONLY; Gets the average precision when applicable. 618 AveragePrecision *float64 `json:"averagePrecision,omitempty"` 619 } 620 621 // MarshalJSON is the custom marshaler for IterationPerformance. 622 func (IP IterationPerformance) MarshalJSON() ([]byte, error) { 623 objectMap := make(map[string]interface{}) 624 return json.Marshal(objectMap) 625 } 626 627 // ListDomain ... 628 type ListDomain struct { 629 autorest.Response `json:"-"` 630 Value *[]Domain `json:"value,omitempty"` 631 } 632 633 // ListExport ... 634 type ListExport struct { 635 autorest.Response `json:"-"` 636 Value *[]Export `json:"value,omitempty"` 637 } 638 639 // ListImage ... 640 type ListImage struct { 641 autorest.Response `json:"-"` 642 Value *[]Image `json:"value,omitempty"` 643 } 644 645 // ListImagePerformance ... 646 type ListImagePerformance struct { 647 autorest.Response `json:"-"` 648 Value *[]ImagePerformance `json:"value,omitempty"` 649 } 650 651 // ListIteration ... 652 type ListIteration struct { 653 autorest.Response `json:"-"` 654 Value *[]Iteration `json:"value,omitempty"` 655 } 656 657 // ListProject ... 658 type ListProject struct { 659 autorest.Response `json:"-"` 660 Value *[]Project `json:"value,omitempty"` 661 } 662 663 // ListSuggestedTagAndRegion ... 664 type ListSuggestedTagAndRegion struct { 665 autorest.Response `json:"-"` 666 Value *[]SuggestedTagAndRegion `json:"value,omitempty"` 667 } 668 669 // ListTag ... 670 type ListTag struct { 671 autorest.Response `json:"-"` 672 Value *[]Tag `json:"value,omitempty"` 673 } 674 675 // ModelInformation model information. 676 type ModelInformation struct { 677 // EstimatedModelSizeInMegabytes - Estimation of the exported FP32 Onnx model size (2 tags) in megabytes. This information is not present if the model cannot be exported. 678 EstimatedModelSizeInMegabytes *int32 `json:"estimatedModelSizeInMegabytes,omitempty"` 679 // Description - Model description. 680 Description *string `json:"description,omitempty"` 681 } 682 683 // Parameters parameters used for training. 684 type Parameters struct { 685 // SelectedTags - List of tags selected for this training session, other tags in the project will be ignored. 686 SelectedTags *[]uuid.UUID `json:"selectedTags,omitempty"` 687 // CustomBaseModelInfo - Information of the previously trained iteration which provides the base model for current iteration's training. 688 CustomBaseModelInfo *CustomBaseModelInfo `json:"customBaseModelInfo,omitempty"` 689 } 690 691 // Prediction prediction result. 692 type Prediction struct { 693 // Probability - READ-ONLY; Probability of the tag. 694 Probability *float64 `json:"probability,omitempty"` 695 // TagID - READ-ONLY; Id of the predicted tag. 696 TagID *uuid.UUID `json:"tagId,omitempty"` 697 // TagName - READ-ONLY; Name of the predicted tag. 698 TagName *string `json:"tagName,omitempty"` 699 // BoundingBox - READ-ONLY; Bounding box of the prediction. 700 BoundingBox *BoundingBox `json:"boundingBox,omitempty"` 701 // TagType - READ-ONLY; Type of the predicted tag. Possible values include: 'Regular', 'Negative', 'GeneralProduct' 702 TagType TagType `json:"tagType,omitempty"` 703 } 704 705 // MarshalJSON is the custom marshaler for Prediction. 706 func (p Prediction) MarshalJSON() ([]byte, error) { 707 objectMap := make(map[string]interface{}) 708 return json.Marshal(objectMap) 709 } 710 711 // PredictionQueryResult query result of the prediction images that were sent to your prediction endpoint. 712 type PredictionQueryResult struct { 713 autorest.Response `json:"-"` 714 // Token - Prediction Query Token. 715 Token *PredictionQueryToken `json:"token,omitempty"` 716 // Results - READ-ONLY; Result of an image prediction request. 717 Results *[]StoredImagePrediction `json:"results,omitempty"` 718 } 719 720 // MarshalJSON is the custom marshaler for PredictionQueryResult. 721 func (pqr PredictionQueryResult) MarshalJSON() ([]byte, error) { 722 objectMap := make(map[string]interface{}) 723 if pqr.Token != nil { 724 objectMap["token"] = pqr.Token 725 } 726 return json.Marshal(objectMap) 727 } 728 729 // PredictionQueryTag ... 730 type PredictionQueryTag struct { 731 ID *uuid.UUID `json:"id,omitempty"` 732 MinThreshold *float64 `json:"minThreshold,omitempty"` 733 MaxThreshold *float64 `json:"maxThreshold,omitempty"` 734 } 735 736 // PredictionQueryToken ... 737 type PredictionQueryToken struct { 738 Session *string `json:"session,omitempty"` 739 Continuation *string `json:"continuation,omitempty"` 740 MaxCount *int32 `json:"maxCount,omitempty"` 741 // OrderBy - Possible values include: 'Newest', 'Oldest', 'Suggested' 742 OrderBy OrderBy `json:"orderBy,omitempty"` 743 Tags *[]PredictionQueryTag `json:"tags,omitempty"` 744 IterationID *uuid.UUID `json:"iterationId,omitempty"` 745 StartTime *date.Time `json:"startTime,omitempty"` 746 EndTime *date.Time `json:"endTime,omitempty"` 747 Application *string `json:"application,omitempty"` 748 } 749 750 // Project represents a project. 751 type Project struct { 752 autorest.Response `json:"-"` 753 // ID - READ-ONLY; Gets the project id. 754 ID *uuid.UUID `json:"id,omitempty"` 755 // Name - Gets or sets the name of the project. 756 Name *string `json:"name,omitempty"` 757 // Description - Gets or sets the description of the project. 758 Description *string `json:"description,omitempty"` 759 // Settings - Gets or sets the project settings. 760 Settings *ProjectSettings `json:"settings,omitempty"` 761 // Created - READ-ONLY; Gets the date this project was created. 762 Created *date.Time `json:"created,omitempty"` 763 // LastModified - READ-ONLY; Gets the date this project was last modified. 764 LastModified *date.Time `json:"lastModified,omitempty"` 765 // ThumbnailURI - READ-ONLY; Gets the thumbnail url representing the image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 766 ThumbnailURI *string `json:"thumbnailUri,omitempty"` 767 // DrModeEnabled - READ-ONLY; Gets if the Disaster Recovery (DR) mode is on, indicating the project is temporarily read-only. 768 DrModeEnabled *bool `json:"drModeEnabled,omitempty"` 769 // Status - Gets the status of the project. Possible values include: 'ProjectStatusSucceeded', 'ProjectStatusImporting', 'ProjectStatusFailed' 770 Status ProjectStatus `json:"status,omitempty"` 771 } 772 773 // MarshalJSON is the custom marshaler for Project. 774 func (p Project) MarshalJSON() ([]byte, error) { 775 objectMap := make(map[string]interface{}) 776 if p.Name != nil { 777 objectMap["name"] = p.Name 778 } 779 if p.Description != nil { 780 objectMap["description"] = p.Description 781 } 782 if p.Settings != nil { 783 objectMap["settings"] = p.Settings 784 } 785 if p.Status != "" { 786 objectMap["status"] = p.Status 787 } 788 return json.Marshal(objectMap) 789 } 790 791 // ProjectExport represents information about a project export. 792 type ProjectExport struct { 793 autorest.Response `json:"-"` 794 // IterationCount - READ-ONLY; Count of iterations that will be exported. 795 IterationCount *int32 `json:"iterationCount,omitempty"` 796 // ImageCount - READ-ONLY; Count of images that will be exported. 797 ImageCount *int32 `json:"imageCount,omitempty"` 798 // TagCount - READ-ONLY; Count of tags that will be exported. 799 TagCount *int32 `json:"tagCount,omitempty"` 800 // RegionCount - READ-ONLY; Count of regions that will be exported. 801 RegionCount *int32 `json:"regionCount,omitempty"` 802 // EstimatedImportTimeInMS - READ-ONLY; Estimated time this project will take to import, can change based on network connectivity and load between 803 // source and destination regions. 804 EstimatedImportTimeInMS *int32 `json:"estimatedImportTimeInMS,omitempty"` 805 // Token - READ-ONLY; Opaque token that should be passed to ImportProject to perform the import. This token grants access to import this 806 // project to all that have the token. 807 Token *string `json:"token,omitempty"` 808 } 809 810 // MarshalJSON is the custom marshaler for ProjectExport. 811 func (peVar ProjectExport) MarshalJSON() ([]byte, error) { 812 objectMap := make(map[string]interface{}) 813 return json.Marshal(objectMap) 814 } 815 816 // ProjectSettings represents settings associated with a project. 817 type ProjectSettings struct { 818 // DomainID - Gets or sets the id of the Domain to use with this project. 819 DomainID *uuid.UUID `json:"domainId,omitempty"` 820 // ClassificationType - Gets or sets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' 821 ClassificationType Classifier `json:"classificationType,omitempty"` 822 // TargetExportPlatforms - A list of ExportPlatform that the trained model should be able to support. 823 TargetExportPlatforms *[]string `json:"targetExportPlatforms,omitempty"` 824 // UseNegativeSet - READ-ONLY; Indicates if negative set is being used. 825 UseNegativeSet *bool `json:"useNegativeSet,omitempty"` 826 // DetectionParameters - READ-ONLY; Detection parameters in use, if any. 827 DetectionParameters *string `json:"detectionParameters,omitempty"` 828 // ImageProcessingSettings - Gets or sets image preprocessing settings. 829 ImageProcessingSettings *ImageProcessingSettings `json:"imageProcessingSettings,omitempty"` 830 // ExportModelContainerURI - READ-ONLY; The uri to the Azure Storage container that will be used to store exported models. 831 ExportModelContainerURI *string `json:"exportModelContainerUri,omitempty"` 832 // NotificationQueueURI - READ-ONLY; The uri to the Azure Storage queue that will be used to send project-related notifications. See <a href="https://go.microsoft.com/fwlink/?linkid=2144149">Storage notifications</a> documentation for setup and message format. 833 NotificationQueueURI *string `json:"notificationQueueUri,omitempty"` 834 } 835 836 // MarshalJSON is the custom marshaler for ProjectSettings. 837 func (ps ProjectSettings) MarshalJSON() ([]byte, error) { 838 objectMap := make(map[string]interface{}) 839 if ps.DomainID != nil { 840 objectMap["domainId"] = ps.DomainID 841 } 842 if ps.ClassificationType != "" { 843 objectMap["classificationType"] = ps.ClassificationType 844 } 845 if ps.TargetExportPlatforms != nil { 846 objectMap["targetExportPlatforms"] = ps.TargetExportPlatforms 847 } 848 if ps.ImageProcessingSettings != nil { 849 objectMap["imageProcessingSettings"] = ps.ImageProcessingSettings 850 } 851 return json.Marshal(objectMap) 852 } 853 854 // ReadCloser ... 855 type ReadCloser struct { 856 autorest.Response `json:"-"` 857 Value *io.ReadCloser `json:"value,omitempty"` 858 } 859 860 // Region ... 861 type Region struct { 862 // TagID - Id of the tag associated with this region. 863 TagID *uuid.UUID `json:"tagId,omitempty"` 864 // Left - Coordinate of the left boundary. 865 Left *float64 `json:"left,omitempty"` 866 // Top - Coordinate of the top boundary. 867 Top *float64 `json:"top,omitempty"` 868 // Width - Width. 869 Width *float64 `json:"width,omitempty"` 870 // Height - Height. 871 Height *float64 `json:"height,omitempty"` 872 } 873 874 // RegionProposal ... 875 type RegionProposal struct { 876 // Confidence - READ-ONLY 877 Confidence *float64 `json:"confidence,omitempty"` 878 // BoundingBox - READ-ONLY 879 BoundingBox *BoundingBox `json:"boundingBox,omitempty"` 880 } 881 882 // MarshalJSON is the custom marshaler for RegionProposal. 883 func (rp RegionProposal) MarshalJSON() ([]byte, error) { 884 objectMap := make(map[string]interface{}) 885 return json.Marshal(objectMap) 886 } 887 888 // SetInt32 ... 889 type SetInt32 struct { 890 autorest.Response `json:"-"` 891 Value map[string]*int32 `json:"value"` 892 } 893 894 // MarshalJSON is the custom marshaler for SetInt32. 895 func (si3 SetInt32) MarshalJSON() ([]byte, error) { 896 objectMap := make(map[string]interface{}) 897 if si3.Value != nil { 898 objectMap["value"] = si3.Value 899 } 900 return json.Marshal(objectMap) 901 } 902 903 // StoredImagePrediction result of an image prediction request. 904 type StoredImagePrediction struct { 905 // ResizedImageURI - READ-ONLY; The URI to the (resized) prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 906 ResizedImageURI *string `json:"resizedImageUri,omitempty"` 907 // ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 908 ThumbnailURI *string `json:"thumbnailUri,omitempty"` 909 // OriginalImageURI - READ-ONLY; The URI to the original prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 910 OriginalImageURI *string `json:"originalImageUri,omitempty"` 911 // Domain - READ-ONLY; Domain used for the prediction. 912 Domain *uuid.UUID `json:"domain,omitempty"` 913 // ID - READ-ONLY; Prediction Id. 914 ID *uuid.UUID `json:"id,omitempty"` 915 // Project - READ-ONLY; Project Id. 916 Project *uuid.UUID `json:"project,omitempty"` 917 // Iteration - READ-ONLY; Iteration Id. 918 Iteration *uuid.UUID `json:"iteration,omitempty"` 919 // Created - READ-ONLY; Date this prediction was created. 920 Created *date.Time `json:"created,omitempty"` 921 // Predictions - READ-ONLY; List of predictions. 922 Predictions *[]Prediction `json:"predictions,omitempty"` 923 } 924 925 // MarshalJSON is the custom marshaler for StoredImagePrediction. 926 func (sip StoredImagePrediction) MarshalJSON() ([]byte, error) { 927 objectMap := make(map[string]interface{}) 928 return json.Marshal(objectMap) 929 } 930 931 // StoredSuggestedTagAndRegion result of a suggested tags and regions request of the untagged image. 932 type StoredSuggestedTagAndRegion struct { 933 // Width - READ-ONLY; Width of the resized image. 934 Width *int32 `json:"width,omitempty"` 935 // Height - READ-ONLY; Height of the resized image. 936 Height *int32 `json:"height,omitempty"` 937 // ResizedImageURI - READ-ONLY; The URI to the (resized) prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 938 ResizedImageURI *string `json:"resizedImageUri,omitempty"` 939 // ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 940 ThumbnailURI *string `json:"thumbnailUri,omitempty"` 941 // OriginalImageURI - READ-ONLY; The URI to the original prediction image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. 942 OriginalImageURI *string `json:"originalImageUri,omitempty"` 943 // Domain - READ-ONLY; Domain used for the prediction. 944 Domain *uuid.UUID `json:"domain,omitempty"` 945 // ID - READ-ONLY; Prediction Id. 946 ID *uuid.UUID `json:"id,omitempty"` 947 // Project - READ-ONLY; Project Id. 948 Project *uuid.UUID `json:"project,omitempty"` 949 // Iteration - READ-ONLY; Iteration Id. 950 Iteration *uuid.UUID `json:"iteration,omitempty"` 951 // Created - READ-ONLY; Date this prediction was created. 952 Created *date.Time `json:"created,omitempty"` 953 // Predictions - READ-ONLY; List of predictions. 954 Predictions *[]Prediction `json:"predictions,omitempty"` 955 // PredictionUncertainty - READ-ONLY; Uncertainty (entropy) of suggested tags or regions per image. 956 PredictionUncertainty *float64 `json:"predictionUncertainty,omitempty"` 957 } 958 959 // MarshalJSON is the custom marshaler for StoredSuggestedTagAndRegion. 960 func (sstar StoredSuggestedTagAndRegion) MarshalJSON() ([]byte, error) { 961 objectMap := make(map[string]interface{}) 962 return json.Marshal(objectMap) 963 } 964 965 // SuggestedTagAndRegion result of a suggested tags and regions request. 966 type SuggestedTagAndRegion struct { 967 // ID - READ-ONLY; Prediction Id. 968 ID *uuid.UUID `json:"id,omitempty"` 969 // Project - READ-ONLY; Project Id. 970 Project *uuid.UUID `json:"project,omitempty"` 971 // Iteration - READ-ONLY; Iteration Id. 972 Iteration *uuid.UUID `json:"iteration,omitempty"` 973 // Created - READ-ONLY; Date this prediction was created. 974 Created *date.Time `json:"created,omitempty"` 975 // Predictions - READ-ONLY; List of predictions. 976 Predictions *[]Prediction `json:"predictions,omitempty"` 977 // PredictionUncertainty - READ-ONLY; Uncertainty (entropy) of suggested tags or regions per image. 978 PredictionUncertainty *float64 `json:"predictionUncertainty,omitempty"` 979 } 980 981 // MarshalJSON is the custom marshaler for SuggestedTagAndRegion. 982 func (star SuggestedTagAndRegion) MarshalJSON() ([]byte, error) { 983 objectMap := make(map[string]interface{}) 984 return json.Marshal(objectMap) 985 } 986 987 // SuggestedTagAndRegionQuery the array of result images and token containing session and continuation Ids 988 // for the next query. 989 type SuggestedTagAndRegionQuery struct { 990 autorest.Response `json:"-"` 991 // Token - Contains properties we need to fetch suggested tags for. 992 Token *SuggestedTagAndRegionQueryToken `json:"token,omitempty"` 993 // Results - READ-ONLY; Result of a suggested tags and regions request of the untagged image. 994 Results *[]StoredSuggestedTagAndRegion `json:"results,omitempty"` 995 } 996 997 // MarshalJSON is the custom marshaler for SuggestedTagAndRegionQuery. 998 func (starq SuggestedTagAndRegionQuery) MarshalJSON() ([]byte, error) { 999 objectMap := make(map[string]interface{}) 1000 if starq.Token != nil { 1001 objectMap["token"] = starq.Token 1002 } 1003 return json.Marshal(objectMap) 1004 } 1005 1006 // SuggestedTagAndRegionQueryToken contains properties we need to fetch suggested tags for. For the first 1007 // call, Session and continuation set to null. 1008 // Then on subsequent calls, uses the session/continuation from the previous SuggestedTagAndRegionQuery 1009 // result to fetch additional results. 1010 type SuggestedTagAndRegionQueryToken struct { 1011 // TagIds - Existing TagIds in project to filter suggested tags on. 1012 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 1013 // Threshold - Confidence threshold to filter suggested tags on. 1014 Threshold *float64 `json:"threshold,omitempty"` 1015 // Session - SessionId for database query. Initially set to null but later used to paginate. 1016 Session *string `json:"session,omitempty"` 1017 // Continuation - Continuation Id for database pagination. Initially null but later used to paginate. 1018 Continuation *string `json:"continuation,omitempty"` 1019 // MaxCount - Maximum number of results you want to be returned in the response. 1020 MaxCount *int32 `json:"maxCount,omitempty"` 1021 // SortBy - OrderBy. Ordering mechanism for your results. Possible values include: 'UncertaintyAscending', 'UncertaintyDescending' 1022 SortBy SortBy `json:"sortBy,omitempty"` 1023 } 1024 1025 // Tag represents a Tag. 1026 type Tag struct { 1027 autorest.Response `json:"-"` 1028 // ID - READ-ONLY; Gets the Tag ID. 1029 ID *uuid.UUID `json:"id,omitempty"` 1030 // Name - Gets or sets the name of the tag. 1031 Name *string `json:"name,omitempty"` 1032 // Description - Gets or sets the description of the tag. 1033 Description *string `json:"description,omitempty"` 1034 // Type - Gets or sets the type of the tag. Possible values include: 'Regular', 'Negative', 'GeneralProduct' 1035 Type TagType `json:"type,omitempty"` 1036 // ImageCount - READ-ONLY; Gets the number of images with this tag. 1037 ImageCount *int32 `json:"imageCount,omitempty"` 1038 } 1039 1040 // MarshalJSON is the custom marshaler for Tag. 1041 func (t Tag) MarshalJSON() ([]byte, error) { 1042 objectMap := make(map[string]interface{}) 1043 if t.Name != nil { 1044 objectMap["name"] = t.Name 1045 } 1046 if t.Description != nil { 1047 objectMap["description"] = t.Description 1048 } 1049 if t.Type != "" { 1050 objectMap["type"] = t.Type 1051 } 1052 return json.Marshal(objectMap) 1053 } 1054 1055 // TagFilter model that query for counting of images whose suggested tags match given tags and their 1056 // probability are greater than or equal to the given threshold. 1057 type TagFilter struct { 1058 // TagIds - Existing TagIds in project to get suggested tags count for. 1059 TagIds *[]uuid.UUID `json:"tagIds,omitempty"` 1060 // Threshold - Confidence threshold to filter suggested tags on. 1061 Threshold *float64 `json:"threshold,omitempty"` 1062 } 1063 1064 // TagPerformance represents performance data for a particular tag in a trained iteration. 1065 type TagPerformance struct { 1066 // ID - READ-ONLY 1067 ID *uuid.UUID `json:"id,omitempty"` 1068 // Name - READ-ONLY 1069 Name *string `json:"name,omitempty"` 1070 // Precision - READ-ONLY; Gets the precision. 1071 Precision *float64 `json:"precision,omitempty"` 1072 // PrecisionStdDeviation - READ-ONLY; Gets the standard deviation for the precision. 1073 PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"` 1074 // Recall - READ-ONLY; Gets the recall. 1075 Recall *float64 `json:"recall,omitempty"` 1076 // RecallStdDeviation - READ-ONLY; Gets the standard deviation for the recall. 1077 RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"` 1078 // AveragePrecision - READ-ONLY; Gets the average precision when applicable. 1079 AveragePrecision *float64 `json:"averagePrecision,omitempty"` 1080 } 1081 1082 // MarshalJSON is the custom marshaler for TagPerformance. 1083 func (tp TagPerformance) MarshalJSON() ([]byte, error) { 1084 objectMap := make(map[string]interface{}) 1085 return json.Marshal(objectMap) 1086 } 1087