...

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

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

View as plain text