...

Source file src/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/customvision/training/models.go

Documentation: github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/customvision/training

     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  )
    15  
    16  // The package's fully qualified name.
    17  const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.0/customvision/training"
    18  
    19  // Bool ...
    20  type Bool struct {
    21  	autorest.Response `json:"-"`
    22  	Value             *bool `json:"value,omitempty"`
    23  }
    24  
    25  // BoundingBox bounding box that defines a region of an image.
    26  type BoundingBox struct {
    27  	// Left - Coordinate of the left boundary.
    28  	Left *float64 `json:"left,omitempty"`
    29  	// Top - Coordinate of the top boundary.
    30  	Top *float64 `json:"top,omitempty"`
    31  	// Width - Width.
    32  	Width *float64 `json:"width,omitempty"`
    33  	// Height - Height.
    34  	Height *float64 `json:"height,omitempty"`
    35  }
    36  
    37  // CustomVisionError ...
    38  type CustomVisionError struct {
    39  	// 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'
    40  	Code CustomVisionErrorCodes `json:"code,omitempty"`
    41  	// Message - A message explaining the error reported by the service.
    42  	Message *string `json:"message,omitempty"`
    43  }
    44  
    45  // Domain ...
    46  type Domain struct {
    47  	autorest.Response `json:"-"`
    48  	// ID - READ-ONLY
    49  	ID *uuid.UUID `json:"id,omitempty"`
    50  	// Name - READ-ONLY
    51  	Name *string `json:"name,omitempty"`
    52  	// Type - READ-ONLY; Possible values include: 'Classification', 'ObjectDetection'
    53  	Type DomainType `json:"type,omitempty"`
    54  	// Exportable - READ-ONLY
    55  	Exportable *bool `json:"exportable,omitempty"`
    56  	// Enabled - READ-ONLY
    57  	Enabled *bool `json:"enabled,omitempty"`
    58  }
    59  
    60  // MarshalJSON is the custom marshaler for Domain.
    61  func (d Domain) MarshalJSON() ([]byte, error) {
    62  	objectMap := make(map[string]interface{})
    63  	return json.Marshal(objectMap)
    64  }
    65  
    66  // Export ...
    67  type Export struct {
    68  	autorest.Response `json:"-"`
    69  	// Platform - READ-ONLY; Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK'
    70  	Platform ExportPlatform `json:"platform,omitempty"`
    71  	// Status - READ-ONLY; Status of the export. Possible values include: 'Exporting', 'Failed', 'Done'
    72  	Status ExportStatus `json:"status,omitempty"`
    73  	// DownloadURI - READ-ONLY; URI used to download the model.
    74  	DownloadURI *string `json:"downloadUri,omitempty"`
    75  	// Flavor - READ-ONLY; Flavor of the export. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM'
    76  	Flavor ExportFlavor `json:"flavor,omitempty"`
    77  	// NewerVersionAvailable - READ-ONLY; Indicates an updated version of the export package is available and should be re-exported for the latest changes.
    78  	NewerVersionAvailable *bool `json:"newerVersionAvailable,omitempty"`
    79  }
    80  
    81  // MarshalJSON is the custom marshaler for Export.
    82  func (e Export) MarshalJSON() ([]byte, error) {
    83  	objectMap := make(map[string]interface{})
    84  	return json.Marshal(objectMap)
    85  }
    86  
    87  // Image image model to be sent as JSON.
    88  type Image struct {
    89  	// ID - READ-ONLY; Id of the image.
    90  	ID *uuid.UUID `json:"id,omitempty"`
    91  	// Created - READ-ONLY; Date the image was created.
    92  	Created *date.Time `json:"created,omitempty"`
    93  	// Width - READ-ONLY; Width of the image.
    94  	Width *int32 `json:"width,omitempty"`
    95  	// Height - READ-ONLY; Height of the image.
    96  	Height *int32 `json:"height,omitempty"`
    97  	// ResizedImageURI - READ-ONLY; The URI to the (resized) image used for training.
    98  	ResizedImageURI *string `json:"resizedImageUri,omitempty"`
    99  	// ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original image.
   100  	ThumbnailURI *string `json:"thumbnailUri,omitempty"`
   101  	// OriginalImageURI - READ-ONLY; The URI to the original uploaded image.
   102  	OriginalImageURI *string `json:"originalImageUri,omitempty"`
   103  	// Tags - READ-ONLY; Tags associated with this image.
   104  	Tags *[]ImageTag `json:"tags,omitempty"`
   105  	// Regions - READ-ONLY; Regions associated with this image.
   106  	Regions *[]ImageRegion `json:"regions,omitempty"`
   107  }
   108  
   109  // MarshalJSON is the custom marshaler for Image.
   110  func (i Image) MarshalJSON() ([]byte, error) {
   111  	objectMap := make(map[string]interface{})
   112  	return json.Marshal(objectMap)
   113  }
   114  
   115  // ImageCreateResult ...
   116  type ImageCreateResult struct {
   117  	// SourceURL - READ-ONLY; Source URL of the image.
   118  	SourceURL *string `json:"sourceUrl,omitempty"`
   119  	// Status - READ-ONLY; Status of the image creation. Possible values include: 'ImageCreateStatusOK', 'ImageCreateStatusOKDuplicate', 'ImageCreateStatusErrorSource', 'ImageCreateStatusErrorImageFormat', 'ImageCreateStatusErrorImageSize', 'ImageCreateStatusErrorStorage', 'ImageCreateStatusErrorLimitExceed', 'ImageCreateStatusErrorTagLimitExceed', 'ImageCreateStatusErrorRegionLimitExceed', 'ImageCreateStatusErrorUnknown', 'ImageCreateStatusErrorNegativeAndRegularTagOnSameImage'
   120  	Status ImageCreateStatus `json:"status,omitempty"`
   121  	// Image - READ-ONLY; The image.
   122  	Image *Image `json:"image,omitempty"`
   123  }
   124  
   125  // MarshalJSON is the custom marshaler for ImageCreateResult.
   126  func (icr ImageCreateResult) MarshalJSON() ([]byte, error) {
   127  	objectMap := make(map[string]interface{})
   128  	return json.Marshal(objectMap)
   129  }
   130  
   131  // ImageCreateSummary ...
   132  type ImageCreateSummary struct {
   133  	autorest.Response `json:"-"`
   134  	// IsBatchSuccessful - READ-ONLY; True if all of the images in the batch were created successfully, otherwise false.
   135  	IsBatchSuccessful *bool `json:"isBatchSuccessful,omitempty"`
   136  	// Images - READ-ONLY; List of the image creation results.
   137  	Images *[]ImageCreateResult `json:"images,omitempty"`
   138  }
   139  
   140  // MarshalJSON is the custom marshaler for ImageCreateSummary.
   141  func (ics ImageCreateSummary) MarshalJSON() ([]byte, error) {
   142  	objectMap := make(map[string]interface{})
   143  	return json.Marshal(objectMap)
   144  }
   145  
   146  // ImageFileCreateBatch ...
   147  type ImageFileCreateBatch struct {
   148  	Images *[]ImageFileCreateEntry `json:"images,omitempty"`
   149  	TagIds *[]uuid.UUID            `json:"tagIds,omitempty"`
   150  }
   151  
   152  // ImageFileCreateEntry ...
   153  type ImageFileCreateEntry struct {
   154  	Name     *string      `json:"name,omitempty"`
   155  	Contents *[]byte      `json:"contents,omitempty"`
   156  	TagIds   *[]uuid.UUID `json:"tagIds,omitempty"`
   157  	Regions  *[]Region    `json:"regions,omitempty"`
   158  }
   159  
   160  // ImageIDCreateBatch ...
   161  type ImageIDCreateBatch struct {
   162  	Images *[]ImageIDCreateEntry `json:"images,omitempty"`
   163  	TagIds *[]uuid.UUID          `json:"tagIds,omitempty"`
   164  }
   165  
   166  // ImageIDCreateEntry ...
   167  type ImageIDCreateEntry struct {
   168  	// ID - Id of the image.
   169  	ID      *uuid.UUID   `json:"id,omitempty"`
   170  	TagIds  *[]uuid.UUID `json:"tagIds,omitempty"`
   171  	Regions *[]Region    `json:"regions,omitempty"`
   172  }
   173  
   174  // ImagePerformance image performance model.
   175  type ImagePerformance struct {
   176  	// Predictions - READ-ONLY
   177  	Predictions *[]Prediction `json:"predictions,omitempty"`
   178  	// ID - READ-ONLY
   179  	ID *uuid.UUID `json:"id,omitempty"`
   180  	// Created - READ-ONLY
   181  	Created *date.Time `json:"created,omitempty"`
   182  	// Width - READ-ONLY
   183  	Width *int32 `json:"width,omitempty"`
   184  	// Height - READ-ONLY
   185  	Height *int32 `json:"height,omitempty"`
   186  	// ImageURI - READ-ONLY
   187  	ImageURI *string `json:"imageUri,omitempty"`
   188  	// ThumbnailURI - READ-ONLY
   189  	ThumbnailURI *string `json:"thumbnailUri,omitempty"`
   190  	// Tags - READ-ONLY
   191  	Tags *[]ImageTag `json:"tags,omitempty"`
   192  	// Regions - READ-ONLY
   193  	Regions *[]ImageRegion `json:"regions,omitempty"`
   194  }
   195  
   196  // MarshalJSON is the custom marshaler for ImagePerformance.
   197  func (IP ImagePerformance) MarshalJSON() ([]byte, error) {
   198  	objectMap := make(map[string]interface{})
   199  	return json.Marshal(objectMap)
   200  }
   201  
   202  // ImagePrediction result of an image prediction request.
   203  type ImagePrediction struct {
   204  	autorest.Response `json:"-"`
   205  	// ID - READ-ONLY; Prediction Id.
   206  	ID *uuid.UUID `json:"id,omitempty"`
   207  	// Project - READ-ONLY; Project Id.
   208  	Project *uuid.UUID `json:"project,omitempty"`
   209  	// Iteration - READ-ONLY; Iteration Id.
   210  	Iteration *uuid.UUID `json:"iteration,omitempty"`
   211  	// Created - READ-ONLY; Date this prediction was created.
   212  	Created *date.Time `json:"created,omitempty"`
   213  	// Predictions - READ-ONLY; List of predictions.
   214  	Predictions *[]Prediction `json:"predictions,omitempty"`
   215  }
   216  
   217  // MarshalJSON is the custom marshaler for ImagePrediction.
   218  func (IP ImagePrediction) MarshalJSON() ([]byte, error) {
   219  	objectMap := make(map[string]interface{})
   220  	return json.Marshal(objectMap)
   221  }
   222  
   223  // ImageRegion ...
   224  type ImageRegion struct {
   225  	// RegionID - READ-ONLY
   226  	RegionID *uuid.UUID `json:"regionId,omitempty"`
   227  	// TagName - READ-ONLY
   228  	TagName *string `json:"tagName,omitempty"`
   229  	// Created - READ-ONLY
   230  	Created *date.Time `json:"created,omitempty"`
   231  	// TagID - Id of the tag associated with this region.
   232  	TagID *uuid.UUID `json:"tagId,omitempty"`
   233  	// Left - Coordinate of the left boundary.
   234  	Left *float64 `json:"left,omitempty"`
   235  	// Top - Coordinate of the top boundary.
   236  	Top *float64 `json:"top,omitempty"`
   237  	// Width - Width.
   238  	Width *float64 `json:"width,omitempty"`
   239  	// Height - Height.
   240  	Height *float64 `json:"height,omitempty"`
   241  }
   242  
   243  // MarshalJSON is the custom marshaler for ImageRegion.
   244  func (ir ImageRegion) MarshalJSON() ([]byte, error) {
   245  	objectMap := make(map[string]interface{})
   246  	if ir.TagID != nil {
   247  		objectMap["tagId"] = ir.TagID
   248  	}
   249  	if ir.Left != nil {
   250  		objectMap["left"] = ir.Left
   251  	}
   252  	if ir.Top != nil {
   253  		objectMap["top"] = ir.Top
   254  	}
   255  	if ir.Width != nil {
   256  		objectMap["width"] = ir.Width
   257  	}
   258  	if ir.Height != nil {
   259  		objectMap["height"] = ir.Height
   260  	}
   261  	return json.Marshal(objectMap)
   262  }
   263  
   264  // ImageRegionCreateBatch batch of image region information to create.
   265  type ImageRegionCreateBatch struct {
   266  	Regions *[]ImageRegionCreateEntry `json:"regions,omitempty"`
   267  }
   268  
   269  // ImageRegionCreateEntry entry associating a region to an image.
   270  type ImageRegionCreateEntry struct {
   271  	// ImageID - Id of the image.
   272  	ImageID *uuid.UUID `json:"imageId,omitempty"`
   273  	// TagID - Id of the tag associated with this region.
   274  	TagID *uuid.UUID `json:"tagId,omitempty"`
   275  	// Left - Coordinate of the left boundary.
   276  	Left *float64 `json:"left,omitempty"`
   277  	// Top - Coordinate of the top boundary.
   278  	Top *float64 `json:"top,omitempty"`
   279  	// Width - Width.
   280  	Width *float64 `json:"width,omitempty"`
   281  	// Height - Height.
   282  	Height *float64 `json:"height,omitempty"`
   283  }
   284  
   285  // ImageRegionCreateResult ...
   286  type ImageRegionCreateResult struct {
   287  	// ImageID - READ-ONLY
   288  	ImageID *uuid.UUID `json:"imageId,omitempty"`
   289  	// RegionID - READ-ONLY
   290  	RegionID *uuid.UUID `json:"regionId,omitempty"`
   291  	// TagName - READ-ONLY
   292  	TagName *string `json:"tagName,omitempty"`
   293  	// Created - READ-ONLY
   294  	Created *date.Time `json:"created,omitempty"`
   295  	// TagID - Id of the tag associated with this region.
   296  	TagID *uuid.UUID `json:"tagId,omitempty"`
   297  	// Left - Coordinate of the left boundary.
   298  	Left *float64 `json:"left,omitempty"`
   299  	// Top - Coordinate of the top boundary.
   300  	Top *float64 `json:"top,omitempty"`
   301  	// Width - Width.
   302  	Width *float64 `json:"width,omitempty"`
   303  	// Height - Height.
   304  	Height *float64 `json:"height,omitempty"`
   305  }
   306  
   307  // MarshalJSON is the custom marshaler for ImageRegionCreateResult.
   308  func (ircr ImageRegionCreateResult) MarshalJSON() ([]byte, error) {
   309  	objectMap := make(map[string]interface{})
   310  	if ircr.TagID != nil {
   311  		objectMap["tagId"] = ircr.TagID
   312  	}
   313  	if ircr.Left != nil {
   314  		objectMap["left"] = ircr.Left
   315  	}
   316  	if ircr.Top != nil {
   317  		objectMap["top"] = ircr.Top
   318  	}
   319  	if ircr.Width != nil {
   320  		objectMap["width"] = ircr.Width
   321  	}
   322  	if ircr.Height != nil {
   323  		objectMap["height"] = ircr.Height
   324  	}
   325  	return json.Marshal(objectMap)
   326  }
   327  
   328  // ImageRegionCreateSummary ...
   329  type ImageRegionCreateSummary struct {
   330  	autorest.Response `json:"-"`
   331  	Created           *[]ImageRegionCreateResult `json:"created,omitempty"`
   332  	Duplicated        *[]ImageRegionCreateEntry  `json:"duplicated,omitempty"`
   333  	Exceeded          *[]ImageRegionCreateEntry  `json:"exceeded,omitempty"`
   334  }
   335  
   336  // ImageRegionProposal ...
   337  type ImageRegionProposal struct {
   338  	autorest.Response `json:"-"`
   339  	// ProjectID - READ-ONLY
   340  	ProjectID *uuid.UUID `json:"projectId,omitempty"`
   341  	// ImageID - READ-ONLY
   342  	ImageID *uuid.UUID `json:"imageId,omitempty"`
   343  	// Proposals - READ-ONLY
   344  	Proposals *[]RegionProposal `json:"proposals,omitempty"`
   345  }
   346  
   347  // MarshalJSON is the custom marshaler for ImageRegionProposal.
   348  func (irp ImageRegionProposal) MarshalJSON() ([]byte, error) {
   349  	objectMap := make(map[string]interface{})
   350  	return json.Marshal(objectMap)
   351  }
   352  
   353  // ImageTag ...
   354  type ImageTag struct {
   355  	// TagID - READ-ONLY
   356  	TagID *uuid.UUID `json:"tagId,omitempty"`
   357  	// TagName - READ-ONLY
   358  	TagName *string `json:"tagName,omitempty"`
   359  	// Created - READ-ONLY
   360  	Created *date.Time `json:"created,omitempty"`
   361  }
   362  
   363  // MarshalJSON is the custom marshaler for ImageTag.
   364  func (it ImageTag) MarshalJSON() ([]byte, error) {
   365  	objectMap := make(map[string]interface{})
   366  	return json.Marshal(objectMap)
   367  }
   368  
   369  // ImageTagCreateBatch batch of image tags.
   370  type ImageTagCreateBatch struct {
   371  	// Tags - Image Tag entries to include in this batch.
   372  	Tags *[]ImageTagCreateEntry `json:"tags,omitempty"`
   373  }
   374  
   375  // ImageTagCreateEntry entry associating a tag to an image.
   376  type ImageTagCreateEntry struct {
   377  	// ImageID - Id of the image.
   378  	ImageID *uuid.UUID `json:"imageId,omitempty"`
   379  	// TagID - Id of the tag.
   380  	TagID *uuid.UUID `json:"tagId,omitempty"`
   381  }
   382  
   383  // ImageTagCreateSummary ...
   384  type ImageTagCreateSummary struct {
   385  	autorest.Response `json:"-"`
   386  	Created           *[]ImageTagCreateEntry `json:"created,omitempty"`
   387  	Duplicated        *[]ImageTagCreateEntry `json:"duplicated,omitempty"`
   388  	Exceeded          *[]ImageTagCreateEntry `json:"exceeded,omitempty"`
   389  }
   390  
   391  // ImageURL image url.
   392  type ImageURL struct {
   393  	// URL - Url of the image.
   394  	URL *string `json:"url,omitempty"`
   395  }
   396  
   397  // ImageURLCreateBatch ...
   398  type ImageURLCreateBatch struct {
   399  	Images *[]ImageURLCreateEntry `json:"images,omitempty"`
   400  	TagIds *[]uuid.UUID           `json:"tagIds,omitempty"`
   401  }
   402  
   403  // ImageURLCreateEntry ...
   404  type ImageURLCreateEntry struct {
   405  	// URL - Url of the image.
   406  	URL     *string      `json:"url,omitempty"`
   407  	TagIds  *[]uuid.UUID `json:"tagIds,omitempty"`
   408  	Regions *[]Region    `json:"regions,omitempty"`
   409  }
   410  
   411  // Int32 ...
   412  type Int32 struct {
   413  	autorest.Response `json:"-"`
   414  	Value             *int32 `json:"value,omitempty"`
   415  }
   416  
   417  // Iteration iteration model to be sent over JSON.
   418  type Iteration struct {
   419  	autorest.Response `json:"-"`
   420  	// ID - READ-ONLY; Gets the id of the iteration.
   421  	ID *uuid.UUID `json:"id,omitempty"`
   422  	// Name - Gets or sets the name of the iteration.
   423  	Name *string `json:"name,omitempty"`
   424  	// Status - READ-ONLY; Gets the current iteration status.
   425  	Status *string `json:"status,omitempty"`
   426  	// Created - READ-ONLY; Gets the time this iteration was completed.
   427  	Created *date.Time `json:"created,omitempty"`
   428  	// LastModified - READ-ONLY; Gets the time this iteration was last modified.
   429  	LastModified *date.Time `json:"lastModified,omitempty"`
   430  	// TrainedAt - READ-ONLY; Gets the time this iteration was last modified.
   431  	TrainedAt *date.Time `json:"trainedAt,omitempty"`
   432  	// ProjectID - READ-ONLY; Gets the project id of the iteration.
   433  	ProjectID *uuid.UUID `json:"projectId,omitempty"`
   434  	// Exportable - READ-ONLY; Whether the iteration can be exported to another format for download.
   435  	Exportable *bool `json:"exportable,omitempty"`
   436  	// ExportableTo - READ-ONLY; A set of platforms this iteration can export to.
   437  	ExportableTo *[]string `json:"exportableTo,omitempty"`
   438  	// DomainID - READ-ONLY; Get or sets a guid of the domain the iteration has been trained on.
   439  	DomainID *uuid.UUID `json:"domainId,omitempty"`
   440  	// ClassificationType - READ-ONLY; Gets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel'
   441  	ClassificationType Classifier `json:"classificationType,omitempty"`
   442  	// TrainingType - READ-ONLY; Gets the training type of the iteration. Possible values include: 'TypeRegular', 'TypeAdvanced'
   443  	TrainingType Type `json:"trainingType,omitempty"`
   444  	// ReservedBudgetInHours - READ-ONLY; Gets the reserved advanced training budget for the iteration.
   445  	ReservedBudgetInHours *int32 `json:"reservedBudgetInHours,omitempty"`
   446  	// PublishName - READ-ONLY; Name of the published model.
   447  	PublishName *string `json:"publishName,omitempty"`
   448  	// OriginalPublishResourceID - READ-ONLY; Resource Provider Id this iteration was originally published to.
   449  	OriginalPublishResourceID *string `json:"originalPublishResourceId,omitempty"`
   450  }
   451  
   452  // MarshalJSON is the custom marshaler for Iteration.
   453  func (i Iteration) MarshalJSON() ([]byte, error) {
   454  	objectMap := make(map[string]interface{})
   455  	if i.Name != nil {
   456  		objectMap["name"] = i.Name
   457  	}
   458  	return json.Marshal(objectMap)
   459  }
   460  
   461  // IterationPerformance represents the detailed performance data for a trained iteration.
   462  type IterationPerformance struct {
   463  	autorest.Response `json:"-"`
   464  	// PerTagPerformance - READ-ONLY; Gets the per-tag performance details for this iteration.
   465  	PerTagPerformance *[]TagPerformance `json:"perTagPerformance,omitempty"`
   466  	// Precision - READ-ONLY; Gets the precision.
   467  	Precision *float64 `json:"precision,omitempty"`
   468  	// PrecisionStdDeviation - READ-ONLY; Gets the standard deviation for the precision.
   469  	PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
   470  	// Recall - READ-ONLY; Gets the recall.
   471  	Recall *float64 `json:"recall,omitempty"`
   472  	// RecallStdDeviation - READ-ONLY; Gets the standard deviation for the recall.
   473  	RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
   474  	// AveragePrecision - READ-ONLY; Gets the average precision when applicable.
   475  	AveragePrecision *float64 `json:"averagePrecision,omitempty"`
   476  }
   477  
   478  // MarshalJSON is the custom marshaler for IterationPerformance.
   479  func (IP IterationPerformance) MarshalJSON() ([]byte, error) {
   480  	objectMap := make(map[string]interface{})
   481  	return json.Marshal(objectMap)
   482  }
   483  
   484  // ListDomain ...
   485  type ListDomain struct {
   486  	autorest.Response `json:"-"`
   487  	Value             *[]Domain `json:"value,omitempty"`
   488  }
   489  
   490  // ListExport ...
   491  type ListExport struct {
   492  	autorest.Response `json:"-"`
   493  	Value             *[]Export `json:"value,omitempty"`
   494  }
   495  
   496  // ListImage ...
   497  type ListImage struct {
   498  	autorest.Response `json:"-"`
   499  	Value             *[]Image `json:"value,omitempty"`
   500  }
   501  
   502  // ListImagePerformance ...
   503  type ListImagePerformance struct {
   504  	autorest.Response `json:"-"`
   505  	Value             *[]ImagePerformance `json:"value,omitempty"`
   506  }
   507  
   508  // ListIteration ...
   509  type ListIteration struct {
   510  	autorest.Response `json:"-"`
   511  	Value             *[]Iteration `json:"value,omitempty"`
   512  }
   513  
   514  // ListProject ...
   515  type ListProject struct {
   516  	autorest.Response `json:"-"`
   517  	Value             *[]Project `json:"value,omitempty"`
   518  }
   519  
   520  // ListTag ...
   521  type ListTag struct {
   522  	autorest.Response `json:"-"`
   523  	Value             *[]Tag `json:"value,omitempty"`
   524  }
   525  
   526  // Prediction prediction result.
   527  type Prediction struct {
   528  	// Probability - READ-ONLY; Probability of the tag.
   529  	Probability *float64 `json:"probability,omitempty"`
   530  	// TagID - READ-ONLY; Id of the predicted tag.
   531  	TagID *uuid.UUID `json:"tagId,omitempty"`
   532  	// TagName - READ-ONLY; Name of the predicted tag.
   533  	TagName *string `json:"tagName,omitempty"`
   534  	// BoundingBox - READ-ONLY; Bounding box of the prediction.
   535  	BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
   536  }
   537  
   538  // MarshalJSON is the custom marshaler for Prediction.
   539  func (p Prediction) MarshalJSON() ([]byte, error) {
   540  	objectMap := make(map[string]interface{})
   541  	return json.Marshal(objectMap)
   542  }
   543  
   544  // PredictionQueryResult ...
   545  type PredictionQueryResult struct {
   546  	autorest.Response `json:"-"`
   547  	// Token - READ-ONLY
   548  	Token *PredictionQueryToken `json:"token,omitempty"`
   549  	// Results - READ-ONLY
   550  	Results *[]StoredImagePrediction `json:"results,omitempty"`
   551  }
   552  
   553  // MarshalJSON is the custom marshaler for PredictionQueryResult.
   554  func (pqr PredictionQueryResult) MarshalJSON() ([]byte, error) {
   555  	objectMap := make(map[string]interface{})
   556  	return json.Marshal(objectMap)
   557  }
   558  
   559  // PredictionQueryTag ...
   560  type PredictionQueryTag struct {
   561  	// ID - READ-ONLY
   562  	ID *uuid.UUID `json:"id,omitempty"`
   563  	// MinThreshold - READ-ONLY
   564  	MinThreshold *float64 `json:"minThreshold,omitempty"`
   565  	// MaxThreshold - READ-ONLY
   566  	MaxThreshold *float64 `json:"maxThreshold,omitempty"`
   567  }
   568  
   569  // MarshalJSON is the custom marshaler for PredictionQueryTag.
   570  func (pqt PredictionQueryTag) MarshalJSON() ([]byte, error) {
   571  	objectMap := make(map[string]interface{})
   572  	return json.Marshal(objectMap)
   573  }
   574  
   575  // PredictionQueryToken ...
   576  type PredictionQueryToken struct {
   577  	Session      *string `json:"session,omitempty"`
   578  	Continuation *string `json:"continuation,omitempty"`
   579  	MaxCount     *int32  `json:"maxCount,omitempty"`
   580  	// OrderBy - Possible values include: 'Newest', 'Oldest', 'Suggested'
   581  	OrderBy     OrderBy               `json:"orderBy,omitempty"`
   582  	Tags        *[]PredictionQueryTag `json:"tags,omitempty"`
   583  	IterationID *uuid.UUID            `json:"iterationId,omitempty"`
   584  	StartTime   *date.Time            `json:"startTime,omitempty"`
   585  	EndTime     *date.Time            `json:"endTime,omitempty"`
   586  	Application *string               `json:"application,omitempty"`
   587  }
   588  
   589  // Project represents a project.
   590  type Project struct {
   591  	autorest.Response `json:"-"`
   592  	// ID - READ-ONLY; Gets the project id.
   593  	ID *uuid.UUID `json:"id,omitempty"`
   594  	// Name - Gets or sets the name of the project.
   595  	Name *string `json:"name,omitempty"`
   596  	// Description - Gets or sets the description of the project.
   597  	Description *string `json:"description,omitempty"`
   598  	// Settings - Gets or sets the project settings.
   599  	Settings *ProjectSettings `json:"settings,omitempty"`
   600  	// Created - READ-ONLY; Gets the date this project was created.
   601  	Created *date.Time `json:"created,omitempty"`
   602  	// LastModified - READ-ONLY; Gets the date this project was last modified.
   603  	LastModified *date.Time `json:"lastModified,omitempty"`
   604  	// ThumbnailURI - READ-ONLY; Gets the thumbnail url representing the image.
   605  	ThumbnailURI *string `json:"thumbnailUri,omitempty"`
   606  	// DrModeEnabled - READ-ONLY; Gets if the DR mode is on.
   607  	DrModeEnabled *bool `json:"drModeEnabled,omitempty"`
   608  }
   609  
   610  // MarshalJSON is the custom marshaler for Project.
   611  func (p Project) MarshalJSON() ([]byte, error) {
   612  	objectMap := make(map[string]interface{})
   613  	if p.Name != nil {
   614  		objectMap["name"] = p.Name
   615  	}
   616  	if p.Description != nil {
   617  		objectMap["description"] = p.Description
   618  	}
   619  	if p.Settings != nil {
   620  		objectMap["settings"] = p.Settings
   621  	}
   622  	return json.Marshal(objectMap)
   623  }
   624  
   625  // ProjectSettings represents settings associated with a project.
   626  type ProjectSettings struct {
   627  	// DomainID - Gets or sets the id of the Domain to use with this project.
   628  	DomainID *uuid.UUID `json:"domainId,omitempty"`
   629  	// ClassificationType - Gets or sets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel'
   630  	ClassificationType Classifier `json:"classificationType,omitempty"`
   631  	// TargetExportPlatforms - A list of ExportPlatform that the trained model should be able to support.
   632  	TargetExportPlatforms *[]string `json:"targetExportPlatforms,omitempty"`
   633  }
   634  
   635  // Region ...
   636  type Region struct {
   637  	// TagID - Id of the tag associated with this region.
   638  	TagID *uuid.UUID `json:"tagId,omitempty"`
   639  	// Left - Coordinate of the left boundary.
   640  	Left *float64 `json:"left,omitempty"`
   641  	// Top - Coordinate of the top boundary.
   642  	Top *float64 `json:"top,omitempty"`
   643  	// Width - Width.
   644  	Width *float64 `json:"width,omitempty"`
   645  	// Height - Height.
   646  	Height *float64 `json:"height,omitempty"`
   647  }
   648  
   649  // RegionProposal ...
   650  type RegionProposal struct {
   651  	// Confidence - READ-ONLY
   652  	Confidence *float64 `json:"confidence,omitempty"`
   653  	// BoundingBox - READ-ONLY
   654  	BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
   655  }
   656  
   657  // MarshalJSON is the custom marshaler for RegionProposal.
   658  func (rp RegionProposal) MarshalJSON() ([]byte, error) {
   659  	objectMap := make(map[string]interface{})
   660  	return json.Marshal(objectMap)
   661  }
   662  
   663  // StoredImagePrediction result of an image classification request.
   664  type StoredImagePrediction struct {
   665  	// ResizedImageURI - READ-ONLY; The URI to the (resized) prediction image.
   666  	ResizedImageURI *string `json:"resizedImageUri,omitempty"`
   667  	// ThumbnailURI - READ-ONLY; The URI to the thumbnail of the original prediction image.
   668  	ThumbnailURI *string `json:"thumbnailUri,omitempty"`
   669  	// OriginalImageURI - READ-ONLY; The URI to the original prediction image.
   670  	OriginalImageURI *string `json:"originalImageUri,omitempty"`
   671  	// Domain - READ-ONLY; Domain used for the prediction.
   672  	Domain *uuid.UUID `json:"domain,omitempty"`
   673  	// ID - READ-ONLY; Prediction Id.
   674  	ID *uuid.UUID `json:"id,omitempty"`
   675  	// Project - READ-ONLY; Project Id.
   676  	Project *uuid.UUID `json:"project,omitempty"`
   677  	// Iteration - READ-ONLY; Iteration Id.
   678  	Iteration *uuid.UUID `json:"iteration,omitempty"`
   679  	// Created - READ-ONLY; Date this prediction was created.
   680  	Created *date.Time `json:"created,omitempty"`
   681  	// Predictions - READ-ONLY; List of predictions.
   682  	Predictions *[]Prediction `json:"predictions,omitempty"`
   683  }
   684  
   685  // MarshalJSON is the custom marshaler for StoredImagePrediction.
   686  func (sip StoredImagePrediction) MarshalJSON() ([]byte, error) {
   687  	objectMap := make(map[string]interface{})
   688  	return json.Marshal(objectMap)
   689  }
   690  
   691  // Tag represents a Tag.
   692  type Tag struct {
   693  	autorest.Response `json:"-"`
   694  	// ID - READ-ONLY; Gets the Tag ID.
   695  	ID *uuid.UUID `json:"id,omitempty"`
   696  	// Name - Gets or sets the name of the tag.
   697  	Name *string `json:"name,omitempty"`
   698  	// Description - Gets or sets the description of the tag.
   699  	Description *string `json:"description,omitempty"`
   700  	// Type - Gets or sets the type of the tag. Possible values include: 'Regular', 'Negative'
   701  	Type TagType `json:"type,omitempty"`
   702  	// ImageCount - READ-ONLY; Gets the number of images with this tag.
   703  	ImageCount *int32 `json:"imageCount,omitempty"`
   704  }
   705  
   706  // MarshalJSON is the custom marshaler for Tag.
   707  func (t Tag) MarshalJSON() ([]byte, error) {
   708  	objectMap := make(map[string]interface{})
   709  	if t.Name != nil {
   710  		objectMap["name"] = t.Name
   711  	}
   712  	if t.Description != nil {
   713  		objectMap["description"] = t.Description
   714  	}
   715  	if t.Type != "" {
   716  		objectMap["type"] = t.Type
   717  	}
   718  	return json.Marshal(objectMap)
   719  }
   720  
   721  // TagPerformance represents performance data for a particular tag in a trained iteration.
   722  type TagPerformance struct {
   723  	// ID - READ-ONLY
   724  	ID *uuid.UUID `json:"id,omitempty"`
   725  	// Name - READ-ONLY
   726  	Name *string `json:"name,omitempty"`
   727  	// Precision - READ-ONLY; Gets the precision.
   728  	Precision *float64 `json:"precision,omitempty"`
   729  	// PrecisionStdDeviation - READ-ONLY; Gets the standard deviation for the precision.
   730  	PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
   731  	// Recall - READ-ONLY; Gets the recall.
   732  	Recall *float64 `json:"recall,omitempty"`
   733  	// RecallStdDeviation - READ-ONLY; Gets the standard deviation for the recall.
   734  	RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
   735  	// AveragePrecision - READ-ONLY; Gets the average precision when applicable.
   736  	AveragePrecision *float64 `json:"averagePrecision,omitempty"`
   737  }
   738  
   739  // MarshalJSON is the custom marshaler for TagPerformance.
   740  func (tp TagPerformance) MarshalJSON() ([]byte, error) {
   741  	objectMap := make(map[string]interface{})
   742  	return json.Marshal(objectMap)
   743  }
   744  

View as plain text