...

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

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

View as plain text