1 package training
2
3
4
5
6
7
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
17 const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v3.1/customvision/training"
18
19
20 type Bool struct {
21 autorest.Response `json:"-"`
22 Value *bool `json:"value,omitempty"`
23 }
24
25
26 type BoundingBox struct {
27
28 Left *float64 `json:"left,omitempty"`
29
30 Top *float64 `json:"top,omitempty"`
31
32 Width *float64 `json:"width,omitempty"`
33
34 Height *float64 `json:"height,omitempty"`
35 }
36
37
38 type CustomVisionError struct {
39
40 Code CustomVisionErrorCodes `json:"code,omitempty"`
41
42 Message *string `json:"message,omitempty"`
43 }
44
45
46 type Domain struct {
47 autorest.Response `json:"-"`
48
49 ID *uuid.UUID `json:"id,omitempty"`
50
51 Name *string `json:"name,omitempty"`
52
53 Type DomainType `json:"type,omitempty"`
54
55 Exportable *bool `json:"exportable,omitempty"`
56
57 Enabled *bool `json:"enabled,omitempty"`
58 }
59
60
61 func (d Domain) MarshalJSON() ([]byte, error) {
62 objectMap := make(map[string]interface{})
63 return json.Marshal(objectMap)
64 }
65
66
67 type Export struct {
68 autorest.Response `json:"-"`
69
70 Platform ExportPlatform `json:"platform,omitempty"`
71
72 Status ExportStatus `json:"status,omitempty"`
73
74 DownloadURI *string `json:"downloadUri,omitempty"`
75
76 Flavor ExportFlavor `json:"flavor,omitempty"`
77
78 NewerVersionAvailable *bool `json:"newerVersionAvailable,omitempty"`
79 }
80
81
82 func (e Export) MarshalJSON() ([]byte, error) {
83 objectMap := make(map[string]interface{})
84 return json.Marshal(objectMap)
85 }
86
87
88 type Image struct {
89
90 ID *uuid.UUID `json:"id,omitempty"`
91
92 Created *date.Time `json:"created,omitempty"`
93
94 Width *int32 `json:"width,omitempty"`
95
96 Height *int32 `json:"height,omitempty"`
97
98 ResizedImageURI *string `json:"resizedImageUri,omitempty"`
99
100 ThumbnailURI *string `json:"thumbnailUri,omitempty"`
101
102 OriginalImageURI *string `json:"originalImageUri,omitempty"`
103
104 Tags *[]ImageTag `json:"tags,omitempty"`
105
106 Regions *[]ImageRegion `json:"regions,omitempty"`
107 }
108
109
110 func (i Image) MarshalJSON() ([]byte, error) {
111 objectMap := make(map[string]interface{})
112 return json.Marshal(objectMap)
113 }
114
115
116 type ImageCreateResult struct {
117
118 SourceURL *string `json:"sourceUrl,omitempty"`
119
120 Status ImageCreateStatus `json:"status,omitempty"`
121
122 Image *Image `json:"image,omitempty"`
123 }
124
125
126 func (icr ImageCreateResult) MarshalJSON() ([]byte, error) {
127 objectMap := make(map[string]interface{})
128 return json.Marshal(objectMap)
129 }
130
131
132 type ImageCreateSummary struct {
133 autorest.Response `json:"-"`
134
135 IsBatchSuccessful *bool `json:"isBatchSuccessful,omitempty"`
136
137 Images *[]ImageCreateResult `json:"images,omitempty"`
138 }
139
140
141 func (ics ImageCreateSummary) MarshalJSON() ([]byte, error) {
142 objectMap := make(map[string]interface{})
143 return json.Marshal(objectMap)
144 }
145
146
147 type ImageFileCreateBatch struct {
148 Images *[]ImageFileCreateEntry `json:"images,omitempty"`
149 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
150 }
151
152
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
161 type ImageIDCreateBatch struct {
162 Images *[]ImageIDCreateEntry `json:"images,omitempty"`
163 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
164 }
165
166
167 type ImageIDCreateEntry struct {
168
169 ID *uuid.UUID `json:"id,omitempty"`
170 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
171 Regions *[]Region `json:"regions,omitempty"`
172 }
173
174
175 type ImagePerformance struct {
176
177 Predictions *[]Prediction `json:"predictions,omitempty"`
178
179 ID *uuid.UUID `json:"id,omitempty"`
180
181 Created *date.Time `json:"created,omitempty"`
182
183 Width *int32 `json:"width,omitempty"`
184
185 Height *int32 `json:"height,omitempty"`
186
187 ImageURI *string `json:"imageUri,omitempty"`
188
189 ThumbnailURI *string `json:"thumbnailUri,omitempty"`
190
191 Tags *[]ImageTag `json:"tags,omitempty"`
192
193 Regions *[]ImageRegion `json:"regions,omitempty"`
194 }
195
196
197 func (IP ImagePerformance) MarshalJSON() ([]byte, error) {
198 objectMap := make(map[string]interface{})
199 return json.Marshal(objectMap)
200 }
201
202
203 type ImagePrediction struct {
204 autorest.Response `json:"-"`
205
206 ID *uuid.UUID `json:"id,omitempty"`
207
208 Project *uuid.UUID `json:"project,omitempty"`
209
210 Iteration *uuid.UUID `json:"iteration,omitempty"`
211
212 Created *date.Time `json:"created,omitempty"`
213
214 Predictions *[]Prediction `json:"predictions,omitempty"`
215 }
216
217
218 func (IP ImagePrediction) MarshalJSON() ([]byte, error) {
219 objectMap := make(map[string]interface{})
220 return json.Marshal(objectMap)
221 }
222
223
224 type ImageProcessingSettings struct {
225
226
227 AugmentationMethods map[string]*bool `json:"augmentationMethods"`
228 }
229
230
231 func (ips ImageProcessingSettings) MarshalJSON() ([]byte, error) {
232 objectMap := make(map[string]interface{})
233 if ips.AugmentationMethods != nil {
234 objectMap["augmentationMethods"] = ips.AugmentationMethods
235 }
236 return json.Marshal(objectMap)
237 }
238
239
240 type ImageRegion struct {
241
242 RegionID *uuid.UUID `json:"regionId,omitempty"`
243
244 TagName *string `json:"tagName,omitempty"`
245
246 Created *date.Time `json:"created,omitempty"`
247
248 TagID *uuid.UUID `json:"tagId,omitempty"`
249
250 Left *float64 `json:"left,omitempty"`
251
252 Top *float64 `json:"top,omitempty"`
253
254 Width *float64 `json:"width,omitempty"`
255
256 Height *float64 `json:"height,omitempty"`
257 }
258
259
260 func (ir ImageRegion) MarshalJSON() ([]byte, error) {
261 objectMap := make(map[string]interface{})
262 if ir.TagID != nil {
263 objectMap["tagId"] = ir.TagID
264 }
265 if ir.Left != nil {
266 objectMap["left"] = ir.Left
267 }
268 if ir.Top != nil {
269 objectMap["top"] = ir.Top
270 }
271 if ir.Width != nil {
272 objectMap["width"] = ir.Width
273 }
274 if ir.Height != nil {
275 objectMap["height"] = ir.Height
276 }
277 return json.Marshal(objectMap)
278 }
279
280
281 type ImageRegionCreateBatch struct {
282 Regions *[]ImageRegionCreateEntry `json:"regions,omitempty"`
283 }
284
285
286 type ImageRegionCreateEntry struct {
287
288 ImageID *uuid.UUID `json:"imageId,omitempty"`
289
290 TagID *uuid.UUID `json:"tagId,omitempty"`
291
292 Left *float64 `json:"left,omitempty"`
293
294 Top *float64 `json:"top,omitempty"`
295
296 Width *float64 `json:"width,omitempty"`
297
298 Height *float64 `json:"height,omitempty"`
299 }
300
301
302 type ImageRegionCreateResult struct {
303
304 ImageID *uuid.UUID `json:"imageId,omitempty"`
305
306 RegionID *uuid.UUID `json:"regionId,omitempty"`
307
308 TagName *string `json:"tagName,omitempty"`
309
310 Created *date.Time `json:"created,omitempty"`
311
312 TagID *uuid.UUID `json:"tagId,omitempty"`
313
314 Left *float64 `json:"left,omitempty"`
315
316 Top *float64 `json:"top,omitempty"`
317
318 Width *float64 `json:"width,omitempty"`
319
320 Height *float64 `json:"height,omitempty"`
321 }
322
323
324 func (ircr ImageRegionCreateResult) MarshalJSON() ([]byte, error) {
325 objectMap := make(map[string]interface{})
326 if ircr.TagID != nil {
327 objectMap["tagId"] = ircr.TagID
328 }
329 if ircr.Left != nil {
330 objectMap["left"] = ircr.Left
331 }
332 if ircr.Top != nil {
333 objectMap["top"] = ircr.Top
334 }
335 if ircr.Width != nil {
336 objectMap["width"] = ircr.Width
337 }
338 if ircr.Height != nil {
339 objectMap["height"] = ircr.Height
340 }
341 return json.Marshal(objectMap)
342 }
343
344
345 type ImageRegionCreateSummary struct {
346 autorest.Response `json:"-"`
347 Created *[]ImageRegionCreateResult `json:"created,omitempty"`
348 Duplicated *[]ImageRegionCreateEntry `json:"duplicated,omitempty"`
349 Exceeded *[]ImageRegionCreateEntry `json:"exceeded,omitempty"`
350 }
351
352
353 type ImageRegionProposal struct {
354 autorest.Response `json:"-"`
355
356 ProjectID *uuid.UUID `json:"projectId,omitempty"`
357
358 ImageID *uuid.UUID `json:"imageId,omitempty"`
359
360 Proposals *[]RegionProposal `json:"proposals,omitempty"`
361 }
362
363
364 func (irp ImageRegionProposal) MarshalJSON() ([]byte, error) {
365 objectMap := make(map[string]interface{})
366 return json.Marshal(objectMap)
367 }
368
369
370 type ImageTag struct {
371
372 TagID *uuid.UUID `json:"tagId,omitempty"`
373
374 TagName *string `json:"tagName,omitempty"`
375
376 Created *date.Time `json:"created,omitempty"`
377 }
378
379
380 func (it ImageTag) MarshalJSON() ([]byte, error) {
381 objectMap := make(map[string]interface{})
382 return json.Marshal(objectMap)
383 }
384
385
386 type ImageTagCreateBatch struct {
387
388 Tags *[]ImageTagCreateEntry `json:"tags,omitempty"`
389 }
390
391
392 type ImageTagCreateEntry struct {
393
394 ImageID *uuid.UUID `json:"imageId,omitempty"`
395
396 TagID *uuid.UUID `json:"tagId,omitempty"`
397 }
398
399
400 type ImageTagCreateSummary struct {
401 autorest.Response `json:"-"`
402 Created *[]ImageTagCreateEntry `json:"created,omitempty"`
403 Duplicated *[]ImageTagCreateEntry `json:"duplicated,omitempty"`
404 Exceeded *[]ImageTagCreateEntry `json:"exceeded,omitempty"`
405 }
406
407
408 type ImageURL struct {
409
410 URL *string `json:"url,omitempty"`
411 }
412
413
414 type ImageURLCreateBatch struct {
415 Images *[]ImageURLCreateEntry `json:"images,omitempty"`
416 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
417 }
418
419
420 type ImageURLCreateEntry struct {
421
422 URL *string `json:"url,omitempty"`
423 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
424 Regions *[]Region `json:"regions,omitempty"`
425 }
426
427
428 type Int32 struct {
429 autorest.Response `json:"-"`
430 Value *int32 `json:"value,omitempty"`
431 }
432
433
434 type Iteration struct {
435 autorest.Response `json:"-"`
436
437 ID *uuid.UUID `json:"id,omitempty"`
438
439 Name *string `json:"name,omitempty"`
440
441 Status *string `json:"status,omitempty"`
442
443 Created *date.Time `json:"created,omitempty"`
444
445 LastModified *date.Time `json:"lastModified,omitempty"`
446
447 TrainedAt *date.Time `json:"trainedAt,omitempty"`
448
449 ProjectID *uuid.UUID `json:"projectId,omitempty"`
450
451 Exportable *bool `json:"exportable,omitempty"`
452
453 ExportableTo *[]string `json:"exportableTo,omitempty"`
454
455 DomainID *uuid.UUID `json:"domainId,omitempty"`
456
457 ClassificationType Classifier `json:"classificationType,omitempty"`
458
459 TrainingType Type `json:"trainingType,omitempty"`
460
461 ReservedBudgetInHours *int32 `json:"reservedBudgetInHours,omitempty"`
462
463 TrainingTimeInMinutes *int32 `json:"trainingTimeInMinutes,omitempty"`
464
465 PublishName *string `json:"publishName,omitempty"`
466
467 OriginalPublishResourceID *string `json:"originalPublishResourceId,omitempty"`
468 }
469
470
471 func (i Iteration) MarshalJSON() ([]byte, error) {
472 objectMap := make(map[string]interface{})
473 if i.Name != nil {
474 objectMap["name"] = i.Name
475 }
476 return json.Marshal(objectMap)
477 }
478
479
480 type IterationPerformance struct {
481 autorest.Response `json:"-"`
482
483 PerTagPerformance *[]TagPerformance `json:"perTagPerformance,omitempty"`
484
485 Precision *float64 `json:"precision,omitempty"`
486
487 PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
488
489 Recall *float64 `json:"recall,omitempty"`
490
491 RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
492
493 AveragePrecision *float64 `json:"averagePrecision,omitempty"`
494 }
495
496
497 func (IP IterationPerformance) MarshalJSON() ([]byte, error) {
498 objectMap := make(map[string]interface{})
499 return json.Marshal(objectMap)
500 }
501
502
503 type ListDomain struct {
504 autorest.Response `json:"-"`
505 Value *[]Domain `json:"value,omitempty"`
506 }
507
508
509 type ListExport struct {
510 autorest.Response `json:"-"`
511 Value *[]Export `json:"value,omitempty"`
512 }
513
514
515 type ListImage struct {
516 autorest.Response `json:"-"`
517 Value *[]Image `json:"value,omitempty"`
518 }
519
520
521 type ListImagePerformance struct {
522 autorest.Response `json:"-"`
523 Value *[]ImagePerformance `json:"value,omitempty"`
524 }
525
526
527 type ListIteration struct {
528 autorest.Response `json:"-"`
529 Value *[]Iteration `json:"value,omitempty"`
530 }
531
532
533 type ListProject struct {
534 autorest.Response `json:"-"`
535 Value *[]Project `json:"value,omitempty"`
536 }
537
538
539 type ListSuggestedTagAndRegion struct {
540 autorest.Response `json:"-"`
541 Value *[]SuggestedTagAndRegion `json:"value,omitempty"`
542 }
543
544
545 type ListTag struct {
546 autorest.Response `json:"-"`
547 Value *[]Tag `json:"value,omitempty"`
548 }
549
550
551 type Prediction struct {
552
553 Probability *float64 `json:"probability,omitempty"`
554
555 TagID *uuid.UUID `json:"tagId,omitempty"`
556
557 TagName *string `json:"tagName,omitempty"`
558
559 BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
560 }
561
562
563 func (p Prediction) MarshalJSON() ([]byte, error) {
564 objectMap := make(map[string]interface{})
565 return json.Marshal(objectMap)
566 }
567
568
569 type PredictionQueryResult struct {
570 autorest.Response `json:"-"`
571
572 Token *PredictionQueryToken `json:"token,omitempty"`
573
574 Results *[]StoredImagePrediction `json:"results,omitempty"`
575 }
576
577
578 func (pqr PredictionQueryResult) MarshalJSON() ([]byte, error) {
579 objectMap := make(map[string]interface{})
580 if pqr.Token != nil {
581 objectMap["token"] = pqr.Token
582 }
583 return json.Marshal(objectMap)
584 }
585
586
587 type PredictionQueryTag struct {
588 ID *uuid.UUID `json:"id,omitempty"`
589 MinThreshold *float64 `json:"minThreshold,omitempty"`
590 MaxThreshold *float64 `json:"maxThreshold,omitempty"`
591 }
592
593
594 type PredictionQueryToken struct {
595 Session *string `json:"session,omitempty"`
596 Continuation *string `json:"continuation,omitempty"`
597 MaxCount *int32 `json:"maxCount,omitempty"`
598
599 OrderBy OrderBy `json:"orderBy,omitempty"`
600 Tags *[]PredictionQueryTag `json:"tags,omitempty"`
601 IterationID *uuid.UUID `json:"iterationId,omitempty"`
602 StartTime *date.Time `json:"startTime,omitempty"`
603 EndTime *date.Time `json:"endTime,omitempty"`
604 Application *string `json:"application,omitempty"`
605 }
606
607
608 type Project struct {
609 autorest.Response `json:"-"`
610
611 ID *uuid.UUID `json:"id,omitempty"`
612
613 Name *string `json:"name,omitempty"`
614
615 Description *string `json:"description,omitempty"`
616
617 Settings *ProjectSettings `json:"settings,omitempty"`
618
619 Created *date.Time `json:"created,omitempty"`
620
621 LastModified *date.Time `json:"lastModified,omitempty"`
622
623 ThumbnailURI *string `json:"thumbnailUri,omitempty"`
624
625 DrModeEnabled *bool `json:"drModeEnabled,omitempty"`
626 }
627
628
629 func (p Project) MarshalJSON() ([]byte, error) {
630 objectMap := make(map[string]interface{})
631 if p.Name != nil {
632 objectMap["name"] = p.Name
633 }
634 if p.Description != nil {
635 objectMap["description"] = p.Description
636 }
637 if p.Settings != nil {
638 objectMap["settings"] = p.Settings
639 }
640 return json.Marshal(objectMap)
641 }
642
643
644 type ProjectSettings struct {
645
646 DomainID *uuid.UUID `json:"domainId,omitempty"`
647
648 ClassificationType Classifier `json:"classificationType,omitempty"`
649
650 TargetExportPlatforms *[]string `json:"targetExportPlatforms,omitempty"`
651
652 UseNegativeSet *bool `json:"useNegativeSet,omitempty"`
653
654 DetectionParameters *string `json:"detectionParameters,omitempty"`
655
656 ImageProcessingSettings *ImageProcessingSettings `json:"imageProcessingSettings,omitempty"`
657 }
658
659
660 func (ps ProjectSettings) MarshalJSON() ([]byte, error) {
661 objectMap := make(map[string]interface{})
662 if ps.DomainID != nil {
663 objectMap["domainId"] = ps.DomainID
664 }
665 if ps.ClassificationType != "" {
666 objectMap["classificationType"] = ps.ClassificationType
667 }
668 if ps.TargetExportPlatforms != nil {
669 objectMap["targetExportPlatforms"] = ps.TargetExportPlatforms
670 }
671 if ps.ImageProcessingSettings != nil {
672 objectMap["imageProcessingSettings"] = ps.ImageProcessingSettings
673 }
674 return json.Marshal(objectMap)
675 }
676
677
678 type Region struct {
679
680 TagID *uuid.UUID `json:"tagId,omitempty"`
681
682 Left *float64 `json:"left,omitempty"`
683
684 Top *float64 `json:"top,omitempty"`
685
686 Width *float64 `json:"width,omitempty"`
687
688 Height *float64 `json:"height,omitempty"`
689 }
690
691
692 type RegionProposal struct {
693
694 Confidence *float64 `json:"confidence,omitempty"`
695
696 BoundingBox *BoundingBox `json:"boundingBox,omitempty"`
697 }
698
699
700 func (rp RegionProposal) MarshalJSON() ([]byte, error) {
701 objectMap := make(map[string]interface{})
702 return json.Marshal(objectMap)
703 }
704
705
706 type SetInt32 struct {
707 autorest.Response `json:"-"`
708 Value map[string]*int32 `json:"value"`
709 }
710
711
712 func (si3 SetInt32) MarshalJSON() ([]byte, error) {
713 objectMap := make(map[string]interface{})
714 if si3.Value != nil {
715 objectMap["value"] = si3.Value
716 }
717 return json.Marshal(objectMap)
718 }
719
720
721 type StoredImagePrediction struct {
722
723 ResizedImageURI *string `json:"resizedImageUri,omitempty"`
724
725 ThumbnailURI *string `json:"thumbnailUri,omitempty"`
726
727 OriginalImageURI *string `json:"originalImageUri,omitempty"`
728
729 Domain *uuid.UUID `json:"domain,omitempty"`
730
731 ID *uuid.UUID `json:"id,omitempty"`
732
733 Project *uuid.UUID `json:"project,omitempty"`
734
735 Iteration *uuid.UUID `json:"iteration,omitempty"`
736
737 Created *date.Time `json:"created,omitempty"`
738
739 Predictions *[]Prediction `json:"predictions,omitempty"`
740 }
741
742
743 func (sip StoredImagePrediction) MarshalJSON() ([]byte, error) {
744 objectMap := make(map[string]interface{})
745 return json.Marshal(objectMap)
746 }
747
748
749 type StoredSuggestedTagAndRegion struct {
750
751 Width *int32 `json:"width,omitempty"`
752
753 Height *int32 `json:"height,omitempty"`
754
755 ResizedImageURI *string `json:"resizedImageUri,omitempty"`
756
757 ThumbnailURI *string `json:"thumbnailUri,omitempty"`
758
759 OriginalImageURI *string `json:"originalImageUri,omitempty"`
760
761 Domain *uuid.UUID `json:"domain,omitempty"`
762
763 ID *uuid.UUID `json:"id,omitempty"`
764
765 Project *uuid.UUID `json:"project,omitempty"`
766
767 Iteration *uuid.UUID `json:"iteration,omitempty"`
768
769 Created *date.Time `json:"created,omitempty"`
770
771 Predictions *[]Prediction `json:"predictions,omitempty"`
772
773 PredictionUncertainty *float64 `json:"predictionUncertainty,omitempty"`
774 }
775
776
777 func (sstar StoredSuggestedTagAndRegion) MarshalJSON() ([]byte, error) {
778 objectMap := make(map[string]interface{})
779 return json.Marshal(objectMap)
780 }
781
782
783 type SuggestedTagAndRegion struct {
784
785 ID *uuid.UUID `json:"id,omitempty"`
786
787 Project *uuid.UUID `json:"project,omitempty"`
788
789 Iteration *uuid.UUID `json:"iteration,omitempty"`
790
791 Created *date.Time `json:"created,omitempty"`
792
793 Predictions *[]Prediction `json:"predictions,omitempty"`
794
795 PredictionUncertainty *float64 `json:"predictionUncertainty,omitempty"`
796 }
797
798
799 func (star SuggestedTagAndRegion) MarshalJSON() ([]byte, error) {
800 objectMap := make(map[string]interface{})
801 return json.Marshal(objectMap)
802 }
803
804
805
806 type SuggestedTagAndRegionQuery struct {
807 autorest.Response `json:"-"`
808
809 Token *SuggestedTagAndRegionQueryToken `json:"token,omitempty"`
810
811 Results *[]StoredSuggestedTagAndRegion `json:"results,omitempty"`
812 }
813
814
815 func (starq SuggestedTagAndRegionQuery) MarshalJSON() ([]byte, error) {
816 objectMap := make(map[string]interface{})
817 if starq.Token != nil {
818 objectMap["token"] = starq.Token
819 }
820 return json.Marshal(objectMap)
821 }
822
823
824
825
826
827 type SuggestedTagAndRegionQueryToken struct {
828
829 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
830
831 Threshold *float64 `json:"threshold,omitempty"`
832
833 Session *string `json:"session,omitempty"`
834
835 Continuation *string `json:"continuation,omitempty"`
836
837 MaxCount *int32 `json:"maxCount,omitempty"`
838
839 SortBy SortBy `json:"sortBy,omitempty"`
840 }
841
842
843 type Tag struct {
844 autorest.Response `json:"-"`
845
846 ID *uuid.UUID `json:"id,omitempty"`
847
848 Name *string `json:"name,omitempty"`
849
850 Description *string `json:"description,omitempty"`
851
852 Type TagType `json:"type,omitempty"`
853
854 ImageCount *int32 `json:"imageCount,omitempty"`
855 }
856
857
858 func (t Tag) MarshalJSON() ([]byte, error) {
859 objectMap := make(map[string]interface{})
860 if t.Name != nil {
861 objectMap["name"] = t.Name
862 }
863 if t.Description != nil {
864 objectMap["description"] = t.Description
865 }
866 if t.Type != "" {
867 objectMap["type"] = t.Type
868 }
869 return json.Marshal(objectMap)
870 }
871
872
873
874 type TagFilter struct {
875
876 TagIds *[]uuid.UUID `json:"tagIds,omitempty"`
877
878 Threshold *float64 `json:"threshold,omitempty"`
879 }
880
881
882 type TagPerformance struct {
883
884 ID *uuid.UUID `json:"id,omitempty"`
885
886 Name *string `json:"name,omitempty"`
887
888 Precision *float64 `json:"precision,omitempty"`
889
890 PrecisionStdDeviation *float64 `json:"precisionStdDeviation,omitempty"`
891
892 Recall *float64 `json:"recall,omitempty"`
893
894 RecallStdDeviation *float64 `json:"recallStdDeviation,omitempty"`
895
896 AveragePrecision *float64 `json:"averagePrecision,omitempty"`
897 }
898
899
900 func (tp TagPerformance) MarshalJSON() ([]byte, error) {
901 objectMap := make(map[string]interface{})
902 return json.Marshal(objectMap)
903 }
904
View as plain text