forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
770 lines (696 loc) · 25.5 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
package contentmoderator
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/json"
"github.com/Azure/go-autorest/autorest"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/contentmoderator"
// StatusEnum enumerates the values for status enum.
type StatusEnum string
const (
// Complete ...
Complete StatusEnum = "Complete"
// Pending ...
Pending StatusEnum = "Pending"
// Unpublished ...
Unpublished StatusEnum = "Unpublished"
)
// PossibleStatusEnumValues returns an array of possible values for the StatusEnum const type.
func PossibleStatusEnumValues() []StatusEnum {
return []StatusEnum{Complete, Pending, Unpublished}
}
// Type enumerates the values for type.
type Type string
const (
// TypeImage ...
TypeImage Type = "Image"
// TypeText ...
TypeText Type = "Text"
)
// PossibleTypeValues returns an array of possible values for the Type const type.
func PossibleTypeValues() []Type {
return []Type{TypeImage, TypeText}
}
// Address address details.
type Address struct {
// Text - Detected Address.
Text *string `json:"Text,omitempty"`
// Index - Index(Location) of the Address in the input text content.
Index *int32 `json:"Index,omitempty"`
}
// APIError error information returned by the API
type APIError struct {
Error *Error `json:"Error,omitempty"`
}
// Body ...
type Body struct {
// Name - Name of the list.
Name *string `json:"Name,omitempty"`
// Description - Description of the list.
Description *string `json:"Description,omitempty"`
// Metadata - Metadata of the list.
Metadata map[string]*string `json:"Metadata"`
}
// MarshalJSON is the custom marshaler for Body.
func (b Body) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if b.Name != nil {
objectMap["Name"] = b.Name
}
if b.Description != nil {
objectMap["Description"] = b.Description
}
if b.Metadata != nil {
objectMap["Metadata"] = b.Metadata
}
return json.Marshal(objectMap)
}
// BodyModel ...
type BodyModel struct {
DataRepresentation *string `json:"DataRepresentation,omitempty"`
Value *string `json:"Value,omitempty"`
}
// Candidate OCR candidate text.
type Candidate struct {
// Text - The text found.
Text *string `json:"Text,omitempty"`
// Confidence - The confidence level.
Confidence *float64 `json:"Confidence,omitempty"`
}
// Classification the classification details of the text.
type Classification struct {
// Category1 - The category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Category1 *ClassificationCategory1 `json:"Category1,omitempty"`
// Category2 - The category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Category2 *ClassificationCategory2 `json:"Category2,omitempty"`
// Category3 - The category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
Category3 *ClassificationCategory3 `json:"Category3,omitempty"`
// ReviewRecommended - The review recommended flag.
ReviewRecommended *bool `json:"ReviewRecommended,omitempty"`
}
// ClassificationCategory1 the category1 score details of the text. <a
// href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
type ClassificationCategory1 struct {
// Score - The category1 score.
Score *float64 `json:"Score,omitempty"`
}
// ClassificationCategory2 the category2 score details of the text. <a
// href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
type ClassificationCategory2 struct {
// Score - The category2 score.
Score *float64 `json:"Score,omitempty"`
}
// ClassificationCategory3 the category3 score details of the text. <a
// href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification.
type ClassificationCategory3 struct {
// Score - The category3 score.
Score *float64 `json:"Score,omitempty"`
}
// Content ...
type Content struct {
// ContentValue - Content to evaluate for a job.
ContentValue *string `json:"ContentValue,omitempty"`
}
// CreateReviewBodyItem schema items of the body.
type CreateReviewBodyItem struct {
// Type - Type of the content. Possible values include: 'TypeImage', 'TypeText'
Type Type `json:"Type,omitempty"`
// Content - Content to review.
Content *string `json:"Content,omitempty"`
// ContentID - Content Identifier.
ContentID *string `json:"ContentId,omitempty"`
// CallbackEndpoint - Optional CallbackEndpoint.
CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
// Metadata - Optional metadata details.
Metadata *[]CreateReviewBodyItemMetadataItem `json:"Metadata,omitempty"`
}
// CreateReviewBodyItemMetadataItem ...
type CreateReviewBodyItemMetadataItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}
// CreateVideoReviewsBodyItem schema items of the body.
type CreateVideoReviewsBodyItem struct {
// VideoFrames - Optional metadata details.
VideoFrames *[]CreateVideoReviewsBodyItemVideoFramesItem `json:"VideoFrames,omitempty"`
// Metadata - Optional metadata details.
Metadata *[]CreateVideoReviewsBodyItemMetadataItem `json:"Metadata,omitempty"`
// Type - Type of the content.
Type *string `json:"Type,omitempty"`
// Content - Video content url to review.
Content *string `json:"Content,omitempty"`
// ContentID - Content Identifier.
ContentID *string `json:"ContentId,omitempty"`
// Status - Status of the video(Complete,Unpublished,Pending). Possible values include: 'Complete', 'Unpublished', 'Pending'
Status StatusEnum `json:"Status,omitempty"`
// Timescale - Timescale of the video.
Timescale *int32 `json:"Timescale,omitempty"`
// CallbackEndpoint - Optional CallbackEndpoint.
CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
}
// CreateVideoReviewsBodyItemMetadataItem ...
type CreateVideoReviewsBodyItemMetadataItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}
// CreateVideoReviewsBodyItemVideoFramesItem ...
type CreateVideoReviewsBodyItemVideoFramesItem struct {
// ID - Id of the frame.
ID *string `json:"Id,omitempty"`
// Timestamp - Timestamp of the frame.
Timestamp *int32 `json:"Timestamp,omitempty"`
// FrameImage - Frame image Url.
FrameImage *string `json:"FrameImage,omitempty"`
ReviewerResultTags *[]CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem `json:"ReviewerResultTags,omitempty"`
// Metadata - Optional metadata details.
Metadata *[]CreateVideoReviewsBodyItemVideoFramesItemMetadataItem `json:"Metadata,omitempty"`
}
// CreateVideoReviewsBodyItemVideoFramesItemMetadataItem ...
type CreateVideoReviewsBodyItemVideoFramesItemMetadataItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}
// CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem ...
type CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}
// DetectedLanguage detect language result.
type DetectedLanguage struct {
autorest.Response `json:"-"`
// DetectedLanguage - The detected language.
DetectedLanguage *string `json:"DetectedLanguage,omitempty"`
// Status - The detect language status
Status *Status `json:"Status,omitempty"`
// TrackingID - The tracking id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// DetectedTerms detected Terms details.
type DetectedTerms struct {
// Index - Index(Location) of the detected profanity term in the input text content.
Index *int32 `json:"Index,omitempty"`
// OriginalIndex - Original Index(Location) of the detected profanity term in the input text content.
OriginalIndex *int32 `json:"OriginalIndex,omitempty"`
// ListID - Matched Terms list Id.
ListID *int32 `json:"ListId,omitempty"`
// Term - Detected profanity term.
Term *string `json:"Term,omitempty"`
}
// Email email Address details.
type Email struct {
// Detected - Detected Email Address from the input text content.
Detected *string `json:"Detected,omitempty"`
// SubType - Subtype of the detected Email Address.
SubType *string `json:"SubType,omitempty"`
// Text - Email Address in the input text content.
Text *string `json:"Text,omitempty"`
// Index - Index(Location) of the Email address in the input text content.
Index *int32 `json:"Index,omitempty"`
}
// Error error body.
type Error struct {
Code *string `json:"Code,omitempty"`
Message *string `json:"Message,omitempty"`
}
// Evaluate evaluate response object.
type Evaluate struct {
autorest.Response `json:"-"`
// CacheID - The cache id.
CacheID *string `json:"CacheID,omitempty"`
// Result - Evaluate result.
Result *bool `json:"Result,omitempty"`
// TrackingID - The tracking id.
TrackingID *string `json:"TrackingId,omitempty"`
// AdultClassificationScore - The adult classification score.
AdultClassificationScore *float64 `json:"AdultClassificationScore,omitempty"`
// IsImageAdultClassified - Indicates if an image is classified as adult.
IsImageAdultClassified *bool `json:"IsImageAdultClassified,omitempty"`
// RacyClassificationScore - The racy classication score.
RacyClassificationScore *float64 `json:"RacyClassificationScore,omitempty"`
// IsImageRacyClassified - Indicates if the image is classified as racy.
IsImageRacyClassified *bool `json:"IsImageRacyClassified,omitempty"`
// AdvancedInfo - The advanced info.
AdvancedInfo *[]KeyValuePair `json:"AdvancedInfo,omitempty"`
// Status - The evaluate status
Status *Status `json:"Status,omitempty"`
}
// Face coordinates to the found face.
type Face struct {
// Bottom - The bottom coordinate.
Bottom *int32 `json:"Bottom,omitempty"`
// Left - The left coordinate.
Left *int32 `json:"Left,omitempty"`
// Right - The right coordinate.
Right *int32 `json:"Right,omitempty"`
// Top - The top coordinate.
Top *int32 `json:"Top,omitempty"`
}
// FoundFaces request object the contains found faces.
type FoundFaces struct {
autorest.Response `json:"-"`
// Status - The evaluate status
Status *Status `json:"Status,omitempty"`
// TrackingID - The tracking id.
TrackingID *string `json:"TrackingId,omitempty"`
// CacheID - The cache id.
CacheID *string `json:"CacheId,omitempty"`
// Result - True if result was found.
Result *bool `json:"Result,omitempty"`
// Count - Number of faces found.
Count *int32 `json:"Count,omitempty"`
// AdvancedInfo - The advanced info.
AdvancedInfo *[]KeyValuePair `json:"AdvancedInfo,omitempty"`
// Faces - The list of faces.
Faces *[]Face `json:"Faces,omitempty"`
}
// Frame video frame property details.
type Frame struct {
// Timestamp - Timestamp of the frame.
Timestamp *string `json:"Timestamp,omitempty"`
// FrameImage - Frame image.
FrameImage *string `json:"FrameImage,omitempty"`
// Metadata - Array of KeyValue.
Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
// ReviewerResultTags - Reviewer result tags.
ReviewerResultTags *[]Tag `json:"ReviewerResultTags,omitempty"`
}
// Frames the response for a Get Frames request.
type Frames struct {
autorest.Response `json:"-"`
// ReviewID - Id of the review.
ReviewID *string `json:"ReviewId,omitempty"`
VideoFrames *[]Frame `json:"VideoFrames,omitempty"`
}
// Image image Properties.
type Image struct {
autorest.Response `json:"-"`
// ContentID - Content Id.
ContentID *string `json:"ContentId,omitempty"`
// AdditionalInfo - Advanced info list.
AdditionalInfo *[]ImageAdditionalInfoItem `json:"AdditionalInfo,omitempty"`
// Status - Status details.
Status *Status `json:"Status,omitempty"`
// TrackingID - Tracking Id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// ImageAdditionalInfoItem ...
type ImageAdditionalInfoItem struct {
// Key - Key parameter.
Key *string `json:"Key,omitempty"`
// Value - Value parameter.
Value *string `json:"Value,omitempty"`
}
// ImageIds image Id properties.
type ImageIds struct {
autorest.Response `json:"-"`
// ContentSource - Source of the content.
ContentSource *string `json:"ContentSource,omitempty"`
// ContentIds - Id of the contents.
ContentIds *[]int32 `json:"ContentIds,omitempty"`
// Status - Get Image status.
Status *Status `json:"Status,omitempty"`
// TrackingID - Tracking Id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// ImageList image List Properties.
type ImageList struct {
autorest.Response `json:"-"`
// ID - Image List Id.
ID *int32 `json:"Id,omitempty"`
// Name - Image List Name.
Name *string `json:"Name,omitempty"`
// Description - Description for image list.
Description *string `json:"Description,omitempty"`
// Metadata - Image List Metadata.
Metadata map[string]*string `json:"Metadata"`
}
// MarshalJSON is the custom marshaler for ImageList.
func (il ImageList) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if il.ID != nil {
objectMap["Id"] = il.ID
}
if il.Name != nil {
objectMap["Name"] = il.Name
}
if il.Description != nil {
objectMap["Description"] = il.Description
}
if il.Metadata != nil {
objectMap["Metadata"] = il.Metadata
}
return json.Marshal(objectMap)
}
// IPA IP Address details.
type IPA struct {
// SubType - Subtype of the detected IP Address.
SubType *string `json:"SubType,omitempty"`
// Text - Detected IP Address.
Text *string `json:"Text,omitempty"`
// Index - Index(Location) of the IP Address in the input text content.
Index *int32 `json:"Index,omitempty"`
}
// Job the Job object.
type Job struct {
autorest.Response `json:"-"`
// ID - The job id.
ID *string `json:"Id,omitempty"`
// TeamName - The team name associated with the job.
TeamName *string `json:"TeamName,omitempty"`
// Status - The status string (<Pending, Failed, Completed>).
Status *string `json:"Status,omitempty"`
// WorkflowID - The Id of the workflow.
WorkflowID *string `json:"WorkflowId,omitempty"`
// Type - Type of the content.
Type *string `json:"Type,omitempty"`
// CallBackEndpoint - The callback endpoint.
CallBackEndpoint *string `json:"CallBackEndpoint,omitempty"`
// ReviewID - Review Id if one is created.
ReviewID *string `json:"ReviewId,omitempty"`
// ResultMetaData - Array of KeyValue pairs.
ResultMetaData *[]KeyValuePair `json:"ResultMetaData,omitempty"`
// JobExecutionReport - Job execution report- Array of KeyValue pairs object.
JobExecutionReport *[]JobExecutionReportDetails `json:"JobExecutionReport,omitempty"`
}
// JobExecutionReportDetails job Execution Report Values.
type JobExecutionReportDetails struct {
// Ts - Time details.
Ts *string `json:"Ts,omitempty"`
// Msg - Message details.
Msg *string `json:"Msg,omitempty"`
}
// JobID ...
type JobID struct {
autorest.Response `json:"-"`
// JobID - Id of the created job.
JobID *string `json:"JobId,omitempty"`
}
// JobListResult the list of job ids.
type JobListResult struct {
// Value - The job id.
Value *[]string `json:"Value,omitempty"`
}
// KeyValuePair the key value pair object properties.
type KeyValuePair struct {
// Key - The key parameter.
Key *string `json:"Key,omitempty"`
// Value - The value parameter.
Value *string `json:"Value,omitempty"`
}
// ListImageList ...
type ListImageList struct {
autorest.Response `json:"-"`
Value *[]ImageList `json:"value,omitempty"`
}
// ListString ...
type ListString struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// ListTermList ...
type ListTermList struct {
autorest.Response `json:"-"`
Value *[]TermList `json:"value,omitempty"`
}
// Match the match details.
type Match struct {
// Score - Confidence score of the image match.
Score *float64 `json:"Score,omitempty"`
// MatchID - The match id.
MatchID *int32 `json:"MatchId,omitempty"`
// Source - The source.
Source *string `json:"Source,omitempty"`
// Tags - The tags for match details.
Tags *[]int32 `json:"Tags,omitempty"`
// Label - The label.
Label *string `json:"Label,omitempty"`
}
// MatchResponse the response for a Match request.
type MatchResponse struct {
autorest.Response `json:"-"`
// TrackingID - The tracking id.
TrackingID *string `json:"TrackingId,omitempty"`
// CacheID - The cache id.
CacheID *string `json:"CacheID,omitempty"`
// IsMatch - Indicates if there is a match.
IsMatch *bool `json:"IsMatch,omitempty"`
// Matches - The match details.
Matches *[]Match `json:"Matches,omitempty"`
// Status - The evaluate status
Status *Status `json:"Status,omitempty"`
}
// OCR contains the text found in image for the language specified.
type OCR struct {
autorest.Response `json:"-"`
// Status - The evaluate status
Status *Status `json:"Status,omitempty"`
// Metadata - Array of KeyValue.
Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
// TrackingID - The tracking id.
TrackingID *string `json:"TrackingId,omitempty"`
// CacheID - The cache id.
CacheID *string `json:"CacheId,omitempty"`
// Language - The ISO 639-3 code.
Language *string `json:"Language,omitempty"`
// Text - The found text.
Text *string `json:"Text,omitempty"`
// Candidates - The list of candidate text.
Candidates *[]Candidate `json:"Candidates,omitempty"`
}
// Phone phone Property details.
type Phone struct {
// CountryCode - CountryCode of the detected Phone number.
CountryCode *string `json:"CountryCode,omitempty"`
// Text - Detected Phone number.
Text *string `json:"Text,omitempty"`
// Index - Index(Location) of the Phone number in the input text content.
Index *int32 `json:"Index,omitempty"`
}
// PII personal Identifier Information details.
type PII struct {
Email *[]Email `json:"Email,omitempty"`
SSN *[]SSN `json:"SSN,omitempty"`
IPA *[]IPA `json:"IPA,omitempty"`
Phone *[]Phone `json:"Phone,omitempty"`
Address *[]Address `json:"Address,omitempty"`
}
// RefreshIndex refresh Index Response.
type RefreshIndex struct {
autorest.Response `json:"-"`
// ContentSourceID - Content source Id.
ContentSourceID *string `json:"ContentSourceId,omitempty"`
// IsUpdateSuccess - Update success status.
IsUpdateSuccess *bool `json:"IsUpdateSuccess,omitempty"`
// AdvancedInfo - Advanced info list.
AdvancedInfo *[]map[string]*string `json:"AdvancedInfo,omitempty"`
// Status - Refresh index status.
Status *Status `json:"Status,omitempty"`
// TrackingID - Tracking Id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// Review the Review object.
type Review struct {
autorest.Response `json:"-"`
// ReviewID - Id of the review.
ReviewID *string `json:"ReviewId,omitempty"`
// SubTeam - Name of the subteam.
SubTeam *string `json:"SubTeam,omitempty"`
// Status - The status string (<Pending, Complete>).
Status *string `json:"Status,omitempty"`
// ReviewerResultTags - Array of KeyValue with Reviewer set Tags.
ReviewerResultTags *[]KeyValuePair `json:"ReviewerResultTags,omitempty"`
// CreatedBy - The reviewer name.
CreatedBy *string `json:"CreatedBy,omitempty"`
// Metadata - Array of KeyValue.
Metadata *[]KeyValuePair `json:"Metadata,omitempty"`
// Type - The type of content.
Type *string `json:"Type,omitempty"`
// Content - The content value.
Content *string `json:"Content,omitempty"`
// ContentID - Id of the content.
ContentID *string `json:"ContentId,omitempty"`
// CallbackEndpoint - The callback endpoint.
CallbackEndpoint *string `json:"CallbackEndpoint,omitempty"`
}
// Screen the response for a Screen text request.
type Screen struct {
autorest.Response `json:"-"`
// OriginalText - The original text.
OriginalText *string `json:"OriginalText,omitempty"`
// NormalizedText - The normalized text.
NormalizedText *string `json:"NormalizedText,omitempty"`
// AutoCorrectedText - The autocorrected text
AutoCorrectedText *string `json:"AutoCorrectedText,omitempty"`
// Misrepresentation - The misrepresentation text.
Misrepresentation *[]string `json:"Misrepresentation,omitempty"`
// Classification - The classification details of the text.
Classification *Classification `json:"Classification,omitempty"`
// Status - The evaluate status.
Status *Status `json:"Status,omitempty"`
// PII - Personal Identifier Information details.
PII *PII `json:"PII,omitempty"`
// Language - Language of the input text content.
Language *string `json:"Language,omitempty"`
Terms *[]DetectedTerms `json:"Terms,omitempty"`
// TrackingID - Unique Content Moderator transaction Id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// SetObject ...
type SetObject struct {
autorest.Response `json:"-"`
Value interface{} `json:"value,omitempty"`
}
// SSN detected SSN details.
type SSN struct {
// Text - Detected SSN in the input text content.
Text *string `json:"Text,omitempty"`
// Index - Index(Location) of the SSN in the input text content.
Index *int32 `json:"Index,omitempty"`
}
// Status status properties.
type Status struct {
// Code - Status code.
Code *int32 `json:"Code,omitempty"`
// Description - Status description.
Description *string `json:"Description,omitempty"`
// Exception - Exception status.
Exception *string `json:"Exception,omitempty"`
}
// String ...
type String struct {
autorest.Response `json:"-"`
Value *string `json:"value,omitempty"`
}
// Tag tag details.
type Tag struct {
// Key - The key parameter.
Key *string `json:"Key,omitempty"`
// Value - The value parameter.
Value *string `json:"Value,omitempty"`
}
// TermList term List Properties.
type TermList struct {
autorest.Response `json:"-"`
// ID - Term list Id.
ID *int32 `json:"Id,omitempty"`
// Name - Term list name.
Name *string `json:"Name,omitempty"`
// Description - Description for term list.
Description *string `json:"Description,omitempty"`
// Metadata - Term list metadata.
Metadata map[string]*string `json:"Metadata"`
}
// MarshalJSON is the custom marshaler for TermList.
func (tl TermList) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if tl.ID != nil {
objectMap["Id"] = tl.ID
}
if tl.Name != nil {
objectMap["Name"] = tl.Name
}
if tl.Description != nil {
objectMap["Description"] = tl.Description
}
if tl.Metadata != nil {
objectMap["Metadata"] = tl.Metadata
}
return json.Marshal(objectMap)
}
// Terms terms properties.
type Terms struct {
autorest.Response `json:"-"`
// Data - Term data details.
Data *TermsData `json:"Data,omitempty"`
// Paging - Paging details.
Paging *TermsPaging `json:"Paging,omitempty"`
}
// TermsData all term Id response properties.
type TermsData struct {
// Language - Language of the terms.
Language *string `json:"Language,omitempty"`
// Terms - List of terms.
Terms *[]TermsInList `json:"Terms,omitempty"`
// Status - Term Status.
Status *Status `json:"Status,omitempty"`
// TrackingID - Tracking Id.
TrackingID *string `json:"TrackingId,omitempty"`
}
// TermsInList terms in list Id passed.
type TermsInList struct {
// Term - Added term details.
Term *string `json:"Term,omitempty"`
}
// TermsPaging paging details.
type TermsPaging struct {
// Total - Total details.
Total *int32 `json:"Total,omitempty"`
// Limit - Limit details.
Limit *int32 `json:"Limit,omitempty"`
// Offset - Offset details.
Offset *int32 `json:"Offset,omitempty"`
// Returned - Returned text details.
Returned *int32 `json:"Returned,omitempty"`
}
// TranscriptModerationBodyItem schema items of the body.
type TranscriptModerationBodyItem struct {
// Timestamp - Timestamp of the image.
Timestamp *string `json:"Timestamp,omitempty"`
// Terms - Optional metadata details.
Terms *[]TranscriptModerationBodyItemTermsItem `json:"Terms,omitempty"`
}
// TranscriptModerationBodyItemTermsItem ...
type TranscriptModerationBodyItemTermsItem struct {
// Index - Index of the word
Index *int32 `json:"Index,omitempty"`
// Term - Detected word.
Term *string `json:"Term,omitempty"`
}
// VideoFrameBodyItem schema items of the body.
type VideoFrameBodyItem struct {
// Timestamp - Timestamp of the frame.
Timestamp *string `json:"Timestamp,omitempty"`
// FrameImage - Content to review.
FrameImage *string `json:"FrameImage,omitempty"`
ReviewerResultTags *[]VideoFrameBodyItemReviewerResultTagsItem `json:"ReviewerResultTags,omitempty"`
// Metadata - Optional metadata details.
Metadata *[]VideoFrameBodyItemMetadataItem `json:"Metadata,omitempty"`
}
// VideoFrameBodyItemMetadataItem ...
type VideoFrameBodyItemMetadataItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}
// VideoFrameBodyItemReviewerResultTagsItem ...
type VideoFrameBodyItemReviewerResultTagsItem struct {
// Key - Your key parameter.
Key *string `json:"Key,omitempty"`
// Value - Your value parameter.
Value *string `json:"Value,omitempty"`
}