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