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