...

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

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

View as plain text