1 package authoring
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/preview/cognitiveservices/v3.0/luis/authoring"
19
20
21 type ApplicationCreateObject struct {
22
23 Culture *string `json:"culture,omitempty"`
24
25 Domain *string `json:"domain,omitempty"`
26
27 Description *string `json:"description,omitempty"`
28
29 InitialVersionID *string `json:"initialVersionId,omitempty"`
30
31 UsageScenario *string `json:"usageScenario,omitempty"`
32
33 Name *string `json:"name,omitempty"`
34 }
35
36
37 type ApplicationInfoResponse struct {
38 autorest.Response `json:"-"`
39
40 ID *uuid.UUID `json:"id,omitempty"`
41
42 Name *string `json:"name,omitempty"`
43
44 Description *string `json:"description,omitempty"`
45
46 Culture *string `json:"culture,omitempty"`
47
48 UsageScenario *string `json:"usageScenario,omitempty"`
49
50 Domain *string `json:"domain,omitempty"`
51
52 VersionsCount *int32 `json:"versionsCount,omitempty"`
53
54 CreatedDateTime *string `json:"createdDateTime,omitempty"`
55
56 Endpoints interface{} `json:"endpoints,omitempty"`
57
58 EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
59
60 ActiveVersion *string `json:"activeVersion,omitempty"`
61 }
62
63
64 type ApplicationPublishObject struct {
65
66 VersionID *string `json:"versionId,omitempty"`
67
68 IsStaging *bool `json:"isStaging,omitempty"`
69 }
70
71
72 type ApplicationSettings struct {
73 autorest.Response `json:"-"`
74
75 ID *uuid.UUID `json:"id,omitempty"`
76
77 IsPublic *bool `json:"public,omitempty"`
78 }
79
80
81 type ApplicationSettingUpdateObject struct {
82
83 IsPublic *bool `json:"public,omitempty"`
84 }
85
86
87 type ApplicationUpdateObject struct {
88
89 Name *string `json:"name,omitempty"`
90
91 Description *string `json:"description,omitempty"`
92 }
93
94
95 type AppVersionSettingObject struct {
96
97 Name *string `json:"name,omitempty"`
98
99 Value *string `json:"value,omitempty"`
100 }
101
102
103 type AvailableCulture struct {
104
105 Name *string `json:"name,omitempty"`
106
107 Code *string `json:"code,omitempty"`
108 }
109
110
111 type AvailablePrebuiltEntityModel struct {
112
113 Name *string `json:"name,omitempty"`
114
115 Description *string `json:"description,omitempty"`
116
117 Examples *string `json:"examples,omitempty"`
118 }
119
120
121 type AzureAccountInfoObject struct {
122
123 AzureSubscriptionID *string `json:"azureSubscriptionId,omitempty"`
124
125 ResourceGroup *string `json:"resourceGroup,omitempty"`
126
127 AccountName *string `json:"accountName,omitempty"`
128 }
129
130
131 type BatchLabelExample struct {
132 Value *LabelExampleResponse `json:"value,omitempty"`
133 HasError *bool `json:"hasError,omitempty"`
134 Error *OperationStatus `json:"error,omitempty"`
135 }
136
137
138 type ChildEntity struct {
139
140 ID *uuid.UUID `json:"id,omitempty"`
141
142 Name *string `json:"name,omitempty"`
143
144 InstanceOf *string `json:"instanceOf,omitempty"`
145
146 TypeID *int32 `json:"typeId,omitempty"`
147
148 ReadableType ReadableType1 `json:"readableType,omitempty"`
149
150 Children *[]ChildEntity `json:"children,omitempty"`
151 }
152
153
154 type ChildEntityModelCreateObject struct {
155
156 Children *[]ChildEntityModelCreateObject `json:"children,omitempty"`
157
158 Name *string `json:"name,omitempty"`
159
160 InstanceOf *string `json:"instanceOf,omitempty"`
161 }
162
163
164 type ClosedList struct {
165
166 Name *string `json:"name,omitempty"`
167
168 SubLists *[]SubClosedList `json:"subLists,omitempty"`
169 Roles *[]string `json:"roles,omitempty"`
170 }
171
172
173 type ClosedListEntityExtractor struct {
174 autorest.Response `json:"-"`
175
176 ID *uuid.UUID `json:"id,omitempty"`
177
178 Name *string `json:"name,omitempty"`
179
180 TypeID *int32 `json:"typeId,omitempty"`
181
182 ReadableType ReadableType5 `json:"readableType,omitempty"`
183 Roles *[]EntityRole `json:"roles,omitempty"`
184
185 SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
186 }
187
188
189 type ClosedListModelCreateObject struct {
190
191 SubLists *[]WordListObject `json:"subLists,omitempty"`
192
193 Name *string `json:"name,omitempty"`
194 }
195
196
197 type ClosedListModelPatchObject struct {
198
199 SubLists *[]WordListObject `json:"subLists,omitempty"`
200 }
201
202
203 type ClosedListModelUpdateObject struct {
204
205 SubLists *[]WordListObject `json:"subLists,omitempty"`
206
207 Name *string `json:"name,omitempty"`
208 }
209
210
211 type CollaboratorsArray struct {
212
213 Emails *[]string `json:"emails,omitempty"`
214 }
215
216
217 type CompositeChildModelCreateObject struct {
218 Name *string `json:"name,omitempty"`
219 }
220
221
222 type CompositeEntityExtractor struct {
223 autorest.Response `json:"-"`
224
225 ID *uuid.UUID `json:"id,omitempty"`
226
227 Name *string `json:"name,omitempty"`
228
229 TypeID *int32 `json:"typeId,omitempty"`
230
231 ReadableType ReadableType4 `json:"readableType,omitempty"`
232 Roles *[]EntityRole `json:"roles,omitempty"`
233
234 Children *[]ChildEntity `json:"children,omitempty"`
235 }
236
237
238 type CompositeEntityModel struct {
239
240 Children *[]string `json:"children,omitempty"`
241
242 Name *string `json:"name,omitempty"`
243 }
244
245
246 type CustomPrebuiltModel struct {
247
248 ID *uuid.UUID `json:"id,omitempty"`
249
250 Name *string `json:"name,omitempty"`
251
252 TypeID *int32 `json:"typeId,omitempty"`
253
254 ReadableType ReadableType7 `json:"readableType,omitempty"`
255
256 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
257
258 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
259 Roles *[]EntityRole `json:"roles,omitempty"`
260 }
261
262
263 type EndpointInfo struct {
264
265 VersionID *string `json:"versionId,omitempty"`
266
267 IsStaging *bool `json:"isStaging,omitempty"`
268
269 EndpointURL *string `json:"endpointUrl,omitempty"`
270
271 Region *string `json:"region,omitempty"`
272
273 AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
274
275 EndpointRegion *string `json:"endpointRegion,omitempty"`
276
277 FailedRegions *string `json:"failedRegions,omitempty"`
278
279 PublishedDateTime *string `json:"publishedDateTime,omitempty"`
280 }
281
282
283 type EnqueueTrainingResponse struct {
284 autorest.Response `json:"-"`
285
286 StatusID *int32 `json:"statusId,omitempty"`
287
288 Status Status `json:"status,omitempty"`
289 }
290
291
292 type EntitiesSuggestionExample struct {
293
294 Text *string `json:"text,omitempty"`
295
296 TokenizedText *[]string `json:"tokenizedText,omitempty"`
297
298 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
299
300 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
301 }
302
303
304 type EntityExtractor struct {
305
306 ID *uuid.UUID `json:"id,omitempty"`
307
308 Name *string `json:"name,omitempty"`
309
310 TypeID *int32 `json:"typeId,omitempty"`
311
312 ReadableType ReadableType8 `json:"readableType,omitempty"`
313 Roles *[]EntityRole `json:"roles,omitempty"`
314
315 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
316
317 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
318 }
319
320
321 type EntityLabel struct {
322
323 EntityName *string `json:"entityName,omitempty"`
324
325 StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
326
327 EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
328
329 Role *string `json:"role,omitempty"`
330
331 RoleID *uuid.UUID `json:"roleId,omitempty"`
332 Children *[]EntityLabel `json:"children,omitempty"`
333 }
334
335
336 type EntityLabelObject struct {
337
338 EntityName *string `json:"entityName,omitempty"`
339
340 StartCharIndex *int32 `json:"startCharIndex,omitempty"`
341
342 EndCharIndex *int32 `json:"endCharIndex,omitempty"`
343
344 Role *string `json:"role,omitempty"`
345
346 Children *[]EntityLabelObject `json:"children,omitempty"`
347 }
348
349
350 type EntityModelCreateObject struct {
351
352 Children *[]ChildEntityModelCreateObject `json:"children,omitempty"`
353
354 Name *string `json:"name,omitempty"`
355 }
356
357
358 type EntityModelInfo struct {
359 Roles *[]EntityRole `json:"roles,omitempty"`
360
361 ID *uuid.UUID `json:"id,omitempty"`
362
363 Name *string `json:"name,omitempty"`
364
365 TypeID *int32 `json:"typeId,omitempty"`
366
367 ReadableType ReadableType `json:"readableType,omitempty"`
368 }
369
370
371 type EntityModelUpdateObject struct {
372
373 Name *string `json:"name,omitempty"`
374
375 InstanceOf *string `json:"instanceOf,omitempty"`
376 }
377
378
379 type EntityPrediction struct {
380
381 EntityName *string `json:"entityName,omitempty"`
382
383 StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
384
385 EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
386
387 Phrase *string `json:"phrase,omitempty"`
388 Children *[]EntityPrediction `json:"children,omitempty"`
389 }
390
391
392 type EntityRole struct {
393 autorest.Response `json:"-"`
394
395 ID *uuid.UUID `json:"id,omitempty"`
396
397 Name *string `json:"name,omitempty"`
398 }
399
400
401 type EntityRoleCreateObject struct {
402
403 Name *string `json:"name,omitempty"`
404 }
405
406
407 type EntityRoleUpdateObject struct {
408
409 Name *string `json:"name,omitempty"`
410 }
411
412
413 type ErrorResponse struct {
414
415 AdditionalProperties map[string]interface{} `json:""`
416 ErrorType *string `json:"errorType,omitempty"`
417 }
418
419
420 func (er ErrorResponse) MarshalJSON() ([]byte, error) {
421 objectMap := make(map[string]interface{})
422 if er.ErrorType != nil {
423 objectMap["errorType"] = er.ErrorType
424 }
425 for k, v := range er.AdditionalProperties {
426 objectMap[k] = v
427 }
428 return json.Marshal(objectMap)
429 }
430
431
432 func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
433 var m map[string]*json.RawMessage
434 err := json.Unmarshal(body, &m)
435 if err != nil {
436 return err
437 }
438 for k, v := range m {
439 switch k {
440 default:
441 if v != nil {
442 var additionalProperties interface{}
443 err = json.Unmarshal(*v, &additionalProperties)
444 if err != nil {
445 return err
446 }
447 if er.AdditionalProperties == nil {
448 er.AdditionalProperties = make(map[string]interface{})
449 }
450 er.AdditionalProperties[k] = additionalProperties
451 }
452 case "errorType":
453 if v != nil {
454 var errorType string
455 err = json.Unmarshal(*v, &errorType)
456 if err != nil {
457 return err
458 }
459 er.ErrorType = &errorType
460 }
461 }
462 }
463
464 return nil
465 }
466
467
468 type ExampleLabelObject struct {
469
470 Text *string `json:"text,omitempty"`
471
472 EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"`
473
474 IntentName *string `json:"intentName,omitempty"`
475 }
476
477
478 type ExplicitListItem struct {
479 autorest.Response `json:"-"`
480
481 ID *int64 `json:"id,omitempty"`
482
483 ExplicitListItem *string `json:"explicitListItem,omitempty"`
484 }
485
486
487 type ExplicitListItemCreateObject struct {
488
489 ExplicitListItem *string `json:"explicitListItem,omitempty"`
490 }
491
492
493 type ExplicitListItemUpdateObject struct {
494
495 ExplicitListItem *string `json:"explicitListItem,omitempty"`
496 }
497
498
499 type FeatureInfoObject struct {
500
501 ID *int32 `json:"id,omitempty"`
502
503 Name *string `json:"name,omitempty"`
504
505 IsActive *bool `json:"isActive,omitempty"`
506
507 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
508 }
509
510
511 type FeaturesResponseObject struct {
512 autorest.Response `json:"-"`
513 PhraselistFeatures *[]PhraseListFeatureInfo `json:"phraselistFeatures,omitempty"`
514 PatternFeatures *[]PatternFeatureInfo `json:"patternFeatures,omitempty"`
515 }
516
517
518 type HierarchicalChildEntity struct {
519 autorest.Response `json:"-"`
520
521 ID *uuid.UUID `json:"id,omitempty"`
522
523 Name *string `json:"name,omitempty"`
524
525 InstanceOf *string `json:"instanceOf,omitempty"`
526
527 TypeID *int32 `json:"typeId,omitempty"`
528
529 ReadableType ReadableType1 `json:"readableType,omitempty"`
530
531 Children *[]ChildEntity `json:"children,omitempty"`
532 }
533
534
535 type HierarchicalChildModelUpdateObject struct {
536 Name *string `json:"name,omitempty"`
537 }
538
539
540 type HierarchicalEntityExtractor struct {
541 autorest.Response `json:"-"`
542
543 ID *uuid.UUID `json:"id,omitempty"`
544
545 Name *string `json:"name,omitempty"`
546
547 TypeID *int32 `json:"typeId,omitempty"`
548
549 ReadableType ReadableType3 `json:"readableType,omitempty"`
550 Roles *[]EntityRole `json:"roles,omitempty"`
551
552 Children *[]ChildEntity `json:"children,omitempty"`
553 }
554
555
556 type HierarchicalModel struct {
557 Name *string `json:"name,omitempty"`
558 Children *[]JSONChild `json:"children,omitempty"`
559 Features *[]JSONModelFeatureInformation `json:"features,omitempty"`
560 Roles *[]string `json:"roles,omitempty"`
561 Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
562 }
563
564
565 type HierarchicalModelV2 struct {
566 Name *string `json:"name,omitempty"`
567 Children *[]string `json:"children,omitempty"`
568 Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
569 Roles *[]string `json:"roles,omitempty"`
570 }
571
572
573 type Int32 struct {
574 autorest.Response `json:"-"`
575 Value *int32 `json:"value,omitempty"`
576 }
577
578
579 type Int64 struct {
580 autorest.Response `json:"-"`
581 Value *int64 `json:"value,omitempty"`
582 }
583
584
585 type IntentClassifier struct {
586 autorest.Response `json:"-"`
587
588 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
589
590 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
591
592 ID *uuid.UUID `json:"id,omitempty"`
593
594 Name *string `json:"name,omitempty"`
595
596 TypeID *int32 `json:"typeId,omitempty"`
597
598 ReadableType ReadableType `json:"readableType,omitempty"`
599 }
600
601
602 type IntentPrediction struct {
603
604 Name *string `json:"name,omitempty"`
605
606 Score *float64 `json:"score,omitempty"`
607 }
608
609
610 type IntentsSuggestionExample struct {
611
612 Text *string `json:"text,omitempty"`
613
614 TokenizedText *[]string `json:"tokenizedText,omitempty"`
615
616 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
617
618 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
619 }
620
621
622 type JSONChild struct {
623 Name *string `json:"name,omitempty"`
624 InstanceOf *string `json:"instanceOf,omitempty"`
625 Children *[]JSONChild `json:"children,omitempty"`
626 Features *[]JSONModelFeatureInformation `json:"features,omitempty"`
627 }
628
629
630 type JSONEntity struct {
631
632 StartPos *int32 `json:"startPos,omitempty"`
633
634 EndPos *int32 `json:"endPos,omitempty"`
635
636 Entity *string `json:"entity,omitempty"`
637
638 Role *string `json:"role,omitempty"`
639 Children *[]JSONEntity `json:"children,omitempty"`
640 }
641
642
643 type JSONModelFeature struct {
644
645 Activated *bool `json:"activated,omitempty"`
646
647 Name *string `json:"name,omitempty"`
648
649 Words *string `json:"words,omitempty"`
650
651 Mode *bool `json:"mode,omitempty"`
652
653 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
654 }
655
656
657
658 type JSONModelFeatureInformation struct {
659
660 ModelName *string `json:"modelName,omitempty"`
661
662 FeatureName *string `json:"featureName,omitempty"`
663 }
664
665
666 type JSONRegexFeature struct {
667
668 Pattern *string `json:"pattern,omitempty"`
669
670 Activated *bool `json:"activated,omitempty"`
671
672 Name *string `json:"name,omitempty"`
673 }
674
675
676 type JSONUtterance struct {
677
678 Text *string `json:"text,omitempty"`
679
680 Intent *string `json:"intent,omitempty"`
681
682 Entities *[]JSONEntity `json:"entities,omitempty"`
683 }
684
685
686 type LabeledUtterance struct {
687
688 ID *int32 `json:"id,omitempty"`
689
690 Text *string `json:"text,omitempty"`
691
692 TokenizedText *[]string `json:"tokenizedText,omitempty"`
693
694 IntentLabel *string `json:"intentLabel,omitempty"`
695
696 EntityLabels *[]EntityLabel `json:"entityLabels,omitempty"`
697
698 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
699
700 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
701 }
702
703
704 type LabelExampleResponse struct {
705 autorest.Response `json:"-"`
706
707 UtteranceText *string `json:"UtteranceText,omitempty"`
708
709 ExampleID *int32 `json:"ExampleId,omitempty"`
710 }
711
712
713 type LabelTextObject struct {
714
715 ID *int32 `json:"id,omitempty"`
716
717 Text *string `json:"text,omitempty"`
718 }
719
720
721 type ListApplicationInfoResponse struct {
722 autorest.Response `json:"-"`
723 Value *[]ApplicationInfoResponse `json:"value,omitempty"`
724 }
725
726
727 type ListAppVersionSettingObject struct {
728 autorest.Response `json:"-"`
729 Value *[]AppVersionSettingObject `json:"value,omitempty"`
730 }
731
732
733 type ListAvailableCulture struct {
734 autorest.Response `json:"-"`
735 Value *[]AvailableCulture `json:"value,omitempty"`
736 }
737
738
739 type ListAvailablePrebuiltEntityModel struct {
740 autorest.Response `json:"-"`
741 Value *[]AvailablePrebuiltEntityModel `json:"value,omitempty"`
742 }
743
744
745 type ListAzureAccountInfoObject struct {
746 autorest.Response `json:"-"`
747 Value *[]AzureAccountInfoObject `json:"value,omitempty"`
748 }
749
750
751 type ListBatchLabelExample struct {
752 autorest.Response `json:"-"`
753 Value *[]BatchLabelExample `json:"value,omitempty"`
754 }
755
756
757 type ListClosedListEntityExtractor struct {
758 autorest.Response `json:"-"`
759 Value *[]ClosedListEntityExtractor `json:"value,omitempty"`
760 }
761
762
763 type ListCompositeEntityExtractor struct {
764 autorest.Response `json:"-"`
765 Value *[]CompositeEntityExtractor `json:"value,omitempty"`
766 }
767
768
769 type ListCustomPrebuiltModel struct {
770 autorest.Response `json:"-"`
771 Value *[]CustomPrebuiltModel `json:"value,omitempty"`
772 }
773
774
775 type ListEntitiesSuggestionExample struct {
776 autorest.Response `json:"-"`
777 Value *[]EntitiesSuggestionExample `json:"value,omitempty"`
778 }
779
780
781 type ListEntityExtractor struct {
782 autorest.Response `json:"-"`
783 Value *[]EntityExtractor `json:"value,omitempty"`
784 }
785
786
787 type ListEntityRole struct {
788 autorest.Response `json:"-"`
789 Value *[]EntityRole `json:"value,omitempty"`
790 }
791
792
793 type ListExplicitListItem struct {
794 autorest.Response `json:"-"`
795 Value *[]ExplicitListItem `json:"value,omitempty"`
796 }
797
798
799 type ListHierarchicalEntityExtractor struct {
800 autorest.Response `json:"-"`
801 Value *[]HierarchicalEntityExtractor `json:"value,omitempty"`
802 }
803
804
805 type ListIntentClassifier struct {
806 autorest.Response `json:"-"`
807 Value *[]IntentClassifier `json:"value,omitempty"`
808 }
809
810
811 type ListIntentsSuggestionExample struct {
812 autorest.Response `json:"-"`
813 Value *[]IntentsSuggestionExample `json:"value,omitempty"`
814 }
815
816
817 type ListLabeledUtterance struct {
818 autorest.Response `json:"-"`
819 Value *[]LabeledUtterance `json:"value,omitempty"`
820 }
821
822
823 type ListLabelTextObject struct {
824 autorest.Response `json:"-"`
825 Value *[]LabelTextObject `json:"value,omitempty"`
826 }
827
828
829 type ListModelFeatureInformation struct {
830 autorest.Response `json:"-"`
831 Value *[]ModelFeatureInformation `json:"value,omitempty"`
832 }
833
834
835 type ListModelInfoResponse struct {
836 autorest.Response `json:"-"`
837 Value *[]ModelInfoResponse `json:"value,omitempty"`
838 }
839
840
841 type ListModelTrainingInfo struct {
842 autorest.Response `json:"-"`
843 Value *[]ModelTrainingInfo `json:"value,omitempty"`
844 }
845
846
847 type ListNDepthEntityExtractor struct {
848 autorest.Response `json:"-"`
849 Value *[]NDepthEntityExtractor `json:"value,omitempty"`
850 }
851
852
853 type ListPatternAnyEntityExtractor struct {
854 autorest.Response `json:"-"`
855 Value *[]PatternAnyEntityExtractor `json:"value,omitempty"`
856 }
857
858
859 type ListPatternRuleInfo struct {
860 autorest.Response `json:"-"`
861 Value *[]PatternRuleInfo `json:"value,omitempty"`
862 }
863
864
865 type ListPhraseListFeatureInfo struct {
866 autorest.Response `json:"-"`
867 Value *[]PhraseListFeatureInfo `json:"value,omitempty"`
868 }
869
870
871 type ListPrebuiltDomain struct {
872 autorest.Response `json:"-"`
873 Value *[]PrebuiltDomain `json:"value,omitempty"`
874 }
875
876
877 type ListPrebuiltEntityExtractor struct {
878 autorest.Response `json:"-"`
879 Value *[]PrebuiltEntityExtractor `json:"value,omitempty"`
880 }
881
882
883 type ListRegexEntityExtractor struct {
884 autorest.Response `json:"-"`
885 Value *[]RegexEntityExtractor `json:"value,omitempty"`
886 }
887
888
889 type ListString struct {
890 autorest.Response `json:"-"`
891 Value *[]string `json:"value,omitempty"`
892 }
893
894
895 type ListUUID struct {
896 autorest.Response `json:"-"`
897 Value *[]uuid.UUID `json:"value,omitempty"`
898 }
899
900
901 type ListVersionInfo struct {
902 autorest.Response `json:"-"`
903 Value *[]VersionInfo `json:"value,omitempty"`
904 }
905
906
907 type LuisApp struct {
908 autorest.Response `json:"-"`
909
910 AdditionalProperties map[string]interface{} `json:""`
911
912 Name *string `json:"name,omitempty"`
913
914 VersionID *string `json:"versionId,omitempty"`
915
916 Desc *string `json:"desc,omitempty"`
917
918 Culture *string `json:"culture,omitempty"`
919
920 Intents *[]HierarchicalModel `json:"intents,omitempty"`
921
922 Entities *[]HierarchicalModel `json:"entities,omitempty"`
923
924 ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
925
926 Composites *[]HierarchicalModel `json:"composites,omitempty"`
927
928 Hierarchicals *[]HierarchicalModel `json:"hierarchicals,omitempty"`
929
930 PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
931
932 RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"`
933
934 PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
935
936 RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
937
938 Phraselists *[]JSONModelFeature `json:"phraselists,omitempty"`
939
940 Patterns *[]PatternRule `json:"patterns,omitempty"`
941
942 Utterances *[]JSONUtterance `json:"utterances,omitempty"`
943 }
944
945
946 func (la LuisApp) MarshalJSON() ([]byte, error) {
947 objectMap := make(map[string]interface{})
948 if la.Name != nil {
949 objectMap["name"] = la.Name
950 }
951 if la.VersionID != nil {
952 objectMap["versionId"] = la.VersionID
953 }
954 if la.Desc != nil {
955 objectMap["desc"] = la.Desc
956 }
957 if la.Culture != nil {
958 objectMap["culture"] = la.Culture
959 }
960 if la.Intents != nil {
961 objectMap["intents"] = la.Intents
962 }
963 if la.Entities != nil {
964 objectMap["entities"] = la.Entities
965 }
966 if la.ClosedLists != nil {
967 objectMap["closedLists"] = la.ClosedLists
968 }
969 if la.Composites != nil {
970 objectMap["composites"] = la.Composites
971 }
972 if la.Hierarchicals != nil {
973 objectMap["hierarchicals"] = la.Hierarchicals
974 }
975 if la.PatternAnyEntities != nil {
976 objectMap["patternAnyEntities"] = la.PatternAnyEntities
977 }
978 if la.RegexEntities != nil {
979 objectMap["regex_entities"] = la.RegexEntities
980 }
981 if la.PrebuiltEntities != nil {
982 objectMap["prebuiltEntities"] = la.PrebuiltEntities
983 }
984 if la.RegexFeatures != nil {
985 objectMap["regex_features"] = la.RegexFeatures
986 }
987 if la.Phraselists != nil {
988 objectMap["phraselists"] = la.Phraselists
989 }
990 if la.Patterns != nil {
991 objectMap["patterns"] = la.Patterns
992 }
993 if la.Utterances != nil {
994 objectMap["utterances"] = la.Utterances
995 }
996 for k, v := range la.AdditionalProperties {
997 objectMap[k] = v
998 }
999 return json.Marshal(objectMap)
1000 }
1001
1002
1003 func (la *LuisApp) UnmarshalJSON(body []byte) error {
1004 var m map[string]*json.RawMessage
1005 err := json.Unmarshal(body, &m)
1006 if err != nil {
1007 return err
1008 }
1009 for k, v := range m {
1010 switch k {
1011 default:
1012 if v != nil {
1013 var additionalProperties interface{}
1014 err = json.Unmarshal(*v, &additionalProperties)
1015 if err != nil {
1016 return err
1017 }
1018 if la.AdditionalProperties == nil {
1019 la.AdditionalProperties = make(map[string]interface{})
1020 }
1021 la.AdditionalProperties[k] = additionalProperties
1022 }
1023 case "name":
1024 if v != nil {
1025 var name string
1026 err = json.Unmarshal(*v, &name)
1027 if err != nil {
1028 return err
1029 }
1030 la.Name = &name
1031 }
1032 case "versionId":
1033 if v != nil {
1034 var versionID string
1035 err = json.Unmarshal(*v, &versionID)
1036 if err != nil {
1037 return err
1038 }
1039 la.VersionID = &versionID
1040 }
1041 case "desc":
1042 if v != nil {
1043 var desc string
1044 err = json.Unmarshal(*v, &desc)
1045 if err != nil {
1046 return err
1047 }
1048 la.Desc = &desc
1049 }
1050 case "culture":
1051 if v != nil {
1052 var culture string
1053 err = json.Unmarshal(*v, &culture)
1054 if err != nil {
1055 return err
1056 }
1057 la.Culture = &culture
1058 }
1059 case "intents":
1060 if v != nil {
1061 var intents []HierarchicalModel
1062 err = json.Unmarshal(*v, &intents)
1063 if err != nil {
1064 return err
1065 }
1066 la.Intents = &intents
1067 }
1068 case "entities":
1069 if v != nil {
1070 var entities []HierarchicalModel
1071 err = json.Unmarshal(*v, &entities)
1072 if err != nil {
1073 return err
1074 }
1075 la.Entities = &entities
1076 }
1077 case "closedLists":
1078 if v != nil {
1079 var closedLists []ClosedList
1080 err = json.Unmarshal(*v, &closedLists)
1081 if err != nil {
1082 return err
1083 }
1084 la.ClosedLists = &closedLists
1085 }
1086 case "composites":
1087 if v != nil {
1088 var composites []HierarchicalModel
1089 err = json.Unmarshal(*v, &composites)
1090 if err != nil {
1091 return err
1092 }
1093 la.Composites = &composites
1094 }
1095 case "hierarchicals":
1096 if v != nil {
1097 var hierarchicals []HierarchicalModel
1098 err = json.Unmarshal(*v, &hierarchicals)
1099 if err != nil {
1100 return err
1101 }
1102 la.Hierarchicals = &hierarchicals
1103 }
1104 case "patternAnyEntities":
1105 if v != nil {
1106 var patternAnyEntities []PatternAny
1107 err = json.Unmarshal(*v, &patternAnyEntities)
1108 if err != nil {
1109 return err
1110 }
1111 la.PatternAnyEntities = &patternAnyEntities
1112 }
1113 case "regex_entities":
1114 if v != nil {
1115 var regexEntities []RegexEntity
1116 err = json.Unmarshal(*v, ®exEntities)
1117 if err != nil {
1118 return err
1119 }
1120 la.RegexEntities = ®exEntities
1121 }
1122 case "prebuiltEntities":
1123 if v != nil {
1124 var prebuiltEntities []PrebuiltEntity
1125 err = json.Unmarshal(*v, &prebuiltEntities)
1126 if err != nil {
1127 return err
1128 }
1129 la.PrebuiltEntities = &prebuiltEntities
1130 }
1131 case "regex_features":
1132 if v != nil {
1133 var regexFeatures []JSONRegexFeature
1134 err = json.Unmarshal(*v, ®exFeatures)
1135 if err != nil {
1136 return err
1137 }
1138 la.RegexFeatures = ®exFeatures
1139 }
1140 case "phraselists":
1141 if v != nil {
1142 var phraselists []JSONModelFeature
1143 err = json.Unmarshal(*v, &phraselists)
1144 if err != nil {
1145 return err
1146 }
1147 la.Phraselists = &phraselists
1148 }
1149 case "patterns":
1150 if v != nil {
1151 var patterns []PatternRule
1152 err = json.Unmarshal(*v, &patterns)
1153 if err != nil {
1154 return err
1155 }
1156 la.Patterns = &patterns
1157 }
1158 case "utterances":
1159 if v != nil {
1160 var utterances []JSONUtterance
1161 err = json.Unmarshal(*v, &utterances)
1162 if err != nil {
1163 return err
1164 }
1165 la.Utterances = &utterances
1166 }
1167 }
1168 }
1169
1170 return nil
1171 }
1172
1173
1174 type LuisAppV2 struct {
1175
1176 AdditionalProperties map[string]interface{} `json:""`
1177
1178 LuisSchemaVersion *string `json:"luis_schema_version,omitempty"`
1179
1180 Name *string `json:"name,omitempty"`
1181
1182 VersionID *string `json:"versionId,omitempty"`
1183
1184 Desc *string `json:"desc,omitempty"`
1185
1186 Culture *string `json:"culture,omitempty"`
1187
1188 Intents *[]HierarchicalModelV2 `json:"intents,omitempty"`
1189
1190 Entities *[]HierarchicalModelV2 `json:"entities,omitempty"`
1191
1192 ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
1193
1194 Composites *[]HierarchicalModelV2 `json:"composites,omitempty"`
1195
1196 PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
1197
1198 RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"`
1199
1200 PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
1201
1202 RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
1203
1204 ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
1205
1206 Patterns *[]PatternRule `json:"patterns,omitempty"`
1207
1208 Utterances *[]JSONUtterance `json:"utterances,omitempty"`
1209 }
1210
1211
1212 func (lav LuisAppV2) MarshalJSON() ([]byte, error) {
1213 objectMap := make(map[string]interface{})
1214 if lav.LuisSchemaVersion != nil {
1215 objectMap["luis_schema_version"] = lav.LuisSchemaVersion
1216 }
1217 if lav.Name != nil {
1218 objectMap["name"] = lav.Name
1219 }
1220 if lav.VersionID != nil {
1221 objectMap["versionId"] = lav.VersionID
1222 }
1223 if lav.Desc != nil {
1224 objectMap["desc"] = lav.Desc
1225 }
1226 if lav.Culture != nil {
1227 objectMap["culture"] = lav.Culture
1228 }
1229 if lav.Intents != nil {
1230 objectMap["intents"] = lav.Intents
1231 }
1232 if lav.Entities != nil {
1233 objectMap["entities"] = lav.Entities
1234 }
1235 if lav.ClosedLists != nil {
1236 objectMap["closedLists"] = lav.ClosedLists
1237 }
1238 if lav.Composites != nil {
1239 objectMap["composites"] = lav.Composites
1240 }
1241 if lav.PatternAnyEntities != nil {
1242 objectMap["patternAnyEntities"] = lav.PatternAnyEntities
1243 }
1244 if lav.RegexEntities != nil {
1245 objectMap["regex_entities"] = lav.RegexEntities
1246 }
1247 if lav.PrebuiltEntities != nil {
1248 objectMap["prebuiltEntities"] = lav.PrebuiltEntities
1249 }
1250 if lav.RegexFeatures != nil {
1251 objectMap["regex_features"] = lav.RegexFeatures
1252 }
1253 if lav.ModelFeatures != nil {
1254 objectMap["model_features"] = lav.ModelFeatures
1255 }
1256 if lav.Patterns != nil {
1257 objectMap["patterns"] = lav.Patterns
1258 }
1259 if lav.Utterances != nil {
1260 objectMap["utterances"] = lav.Utterances
1261 }
1262 for k, v := range lav.AdditionalProperties {
1263 objectMap[k] = v
1264 }
1265 return json.Marshal(objectMap)
1266 }
1267
1268
1269 func (lav *LuisAppV2) UnmarshalJSON(body []byte) error {
1270 var m map[string]*json.RawMessage
1271 err := json.Unmarshal(body, &m)
1272 if err != nil {
1273 return err
1274 }
1275 for k, v := range m {
1276 switch k {
1277 default:
1278 if v != nil {
1279 var additionalProperties interface{}
1280 err = json.Unmarshal(*v, &additionalProperties)
1281 if err != nil {
1282 return err
1283 }
1284 if lav.AdditionalProperties == nil {
1285 lav.AdditionalProperties = make(map[string]interface{})
1286 }
1287 lav.AdditionalProperties[k] = additionalProperties
1288 }
1289 case "luis_schema_version":
1290 if v != nil {
1291 var luisSchemaVersion string
1292 err = json.Unmarshal(*v, &luisSchemaVersion)
1293 if err != nil {
1294 return err
1295 }
1296 lav.LuisSchemaVersion = &luisSchemaVersion
1297 }
1298 case "name":
1299 if v != nil {
1300 var name string
1301 err = json.Unmarshal(*v, &name)
1302 if err != nil {
1303 return err
1304 }
1305 lav.Name = &name
1306 }
1307 case "versionId":
1308 if v != nil {
1309 var versionID string
1310 err = json.Unmarshal(*v, &versionID)
1311 if err != nil {
1312 return err
1313 }
1314 lav.VersionID = &versionID
1315 }
1316 case "desc":
1317 if v != nil {
1318 var desc string
1319 err = json.Unmarshal(*v, &desc)
1320 if err != nil {
1321 return err
1322 }
1323 lav.Desc = &desc
1324 }
1325 case "culture":
1326 if v != nil {
1327 var culture string
1328 err = json.Unmarshal(*v, &culture)
1329 if err != nil {
1330 return err
1331 }
1332 lav.Culture = &culture
1333 }
1334 case "intents":
1335 if v != nil {
1336 var intents []HierarchicalModelV2
1337 err = json.Unmarshal(*v, &intents)
1338 if err != nil {
1339 return err
1340 }
1341 lav.Intents = &intents
1342 }
1343 case "entities":
1344 if v != nil {
1345 var entities []HierarchicalModelV2
1346 err = json.Unmarshal(*v, &entities)
1347 if err != nil {
1348 return err
1349 }
1350 lav.Entities = &entities
1351 }
1352 case "closedLists":
1353 if v != nil {
1354 var closedLists []ClosedList
1355 err = json.Unmarshal(*v, &closedLists)
1356 if err != nil {
1357 return err
1358 }
1359 lav.ClosedLists = &closedLists
1360 }
1361 case "composites":
1362 if v != nil {
1363 var composites []HierarchicalModelV2
1364 err = json.Unmarshal(*v, &composites)
1365 if err != nil {
1366 return err
1367 }
1368 lav.Composites = &composites
1369 }
1370 case "patternAnyEntities":
1371 if v != nil {
1372 var patternAnyEntities []PatternAny
1373 err = json.Unmarshal(*v, &patternAnyEntities)
1374 if err != nil {
1375 return err
1376 }
1377 lav.PatternAnyEntities = &patternAnyEntities
1378 }
1379 case "regex_entities":
1380 if v != nil {
1381 var regexEntities []RegexEntity
1382 err = json.Unmarshal(*v, ®exEntities)
1383 if err != nil {
1384 return err
1385 }
1386 lav.RegexEntities = ®exEntities
1387 }
1388 case "prebuiltEntities":
1389 if v != nil {
1390 var prebuiltEntities []PrebuiltEntity
1391 err = json.Unmarshal(*v, &prebuiltEntities)
1392 if err != nil {
1393 return err
1394 }
1395 lav.PrebuiltEntities = &prebuiltEntities
1396 }
1397 case "regex_features":
1398 if v != nil {
1399 var regexFeatures []JSONRegexFeature
1400 err = json.Unmarshal(*v, ®exFeatures)
1401 if err != nil {
1402 return err
1403 }
1404 lav.RegexFeatures = ®exFeatures
1405 }
1406 case "model_features":
1407 if v != nil {
1408 var modelFeatures []JSONModelFeature
1409 err = json.Unmarshal(*v, &modelFeatures)
1410 if err != nil {
1411 return err
1412 }
1413 lav.ModelFeatures = &modelFeatures
1414 }
1415 case "patterns":
1416 if v != nil {
1417 var patterns []PatternRule
1418 err = json.Unmarshal(*v, &patterns)
1419 if err != nil {
1420 return err
1421 }
1422 lav.Patterns = &patterns
1423 }
1424 case "utterances":
1425 if v != nil {
1426 var utterances []JSONUtterance
1427 err = json.Unmarshal(*v, &utterances)
1428 if err != nil {
1429 return err
1430 }
1431 lav.Utterances = &utterances
1432 }
1433 }
1434 }
1435
1436 return nil
1437 }
1438
1439
1440 type ModelCreateObject struct {
1441
1442 Name *string `json:"name,omitempty"`
1443 }
1444
1445
1446
1447 type ModelFeatureInformation struct {
1448
1449 ModelName *string `json:"modelName,omitempty"`
1450
1451 FeatureName *string `json:"featureName,omitempty"`
1452 IsRequired *bool `json:"isRequired,omitempty"`
1453 }
1454
1455
1456 type ModelInfo struct {
1457
1458 ID *uuid.UUID `json:"id,omitempty"`
1459
1460 Name *string `json:"name,omitempty"`
1461
1462 TypeID *int32 `json:"typeId,omitempty"`
1463
1464 ReadableType ReadableType `json:"readableType,omitempty"`
1465 }
1466
1467
1468 type ModelInfoResponse struct {
1469
1470 ID *uuid.UUID `json:"id,omitempty"`
1471
1472 Name *string `json:"name,omitempty"`
1473
1474 TypeID *int32 `json:"typeId,omitempty"`
1475
1476 ReadableType ReadableType2 `json:"readableType,omitempty"`
1477 Roles *[]EntityRole `json:"roles,omitempty"`
1478
1479 Children *[]ChildEntity `json:"children,omitempty"`
1480
1481 SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
1482
1483 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
1484
1485 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
1486
1487 RegexPattern *string `json:"regexPattern,omitempty"`
1488 ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
1489 }
1490
1491
1492 type ModelTrainingDetails struct {
1493
1494 StatusID *int32 `json:"statusId,omitempty"`
1495
1496 Status Status1 `json:"status,omitempty"`
1497
1498 ExampleCount *int32 `json:"exampleCount,omitempty"`
1499
1500 TrainingDateTime *date.Time `json:"trainingDateTime,omitempty"`
1501
1502 FailureReason *string `json:"failureReason,omitempty"`
1503 }
1504
1505
1506 type ModelTrainingInfo struct {
1507
1508 ModelID *uuid.UUID `json:"modelId,omitempty"`
1509 Details *ModelTrainingDetails `json:"details,omitempty"`
1510 }
1511
1512
1513 type ModelUpdateObject struct {
1514
1515 Name *string `json:"name,omitempty"`
1516 }
1517
1518
1519 type NDepthEntityExtractor struct {
1520 autorest.Response `json:"-"`
1521
1522 ID *uuid.UUID `json:"id,omitempty"`
1523
1524 Name *string `json:"name,omitempty"`
1525
1526 TypeID *int32 `json:"typeId,omitempty"`
1527
1528 ReadableType ReadableType9 `json:"readableType,omitempty"`
1529 Roles *[]EntityRole `json:"roles,omitempty"`
1530
1531 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
1532
1533 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
1534 Children *[]ChildEntity `json:"children,omitempty"`
1535 }
1536
1537
1538 type OperationError struct {
1539 Code *string `json:"code,omitempty"`
1540 Message *string `json:"message,omitempty"`
1541 }
1542
1543
1544 type OperationStatus struct {
1545 autorest.Response `json:"-"`
1546
1547 Code OperationStatusType `json:"code,omitempty"`
1548
1549 Message *string `json:"message,omitempty"`
1550 }
1551
1552
1553 type PatternAny struct {
1554 Name *string `json:"name,omitempty"`
1555 ExplicitList *[]string `json:"explicitList,omitempty"`
1556 Roles *[]string `json:"roles,omitempty"`
1557 }
1558
1559
1560 type PatternAnyEntityExtractor struct {
1561 autorest.Response `json:"-"`
1562
1563 ID *uuid.UUID `json:"id,omitempty"`
1564
1565 Name *string `json:"name,omitempty"`
1566
1567 TypeID *int32 `json:"typeId,omitempty"`
1568
1569 ReadableType ReadableType11 `json:"readableType,omitempty"`
1570 Roles *[]EntityRole `json:"roles,omitempty"`
1571 ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"`
1572 }
1573
1574
1575 type PatternAnyModelCreateObject struct {
1576
1577 Name *string `json:"name,omitempty"`
1578
1579 ExplicitList *[]string `json:"explicitList,omitempty"`
1580 }
1581
1582
1583 type PatternAnyModelUpdateObject struct {
1584
1585 Name *string `json:"name,omitempty"`
1586
1587 ExplicitList *[]string `json:"explicitList,omitempty"`
1588 }
1589
1590
1591 type PatternFeatureInfo struct {
1592
1593 Pattern *string `json:"pattern,omitempty"`
1594
1595 ID *int32 `json:"id,omitempty"`
1596
1597 Name *string `json:"name,omitempty"`
1598
1599 IsActive *bool `json:"isActive,omitempty"`
1600
1601 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
1602 }
1603
1604
1605 type PatternRule struct {
1606
1607 Pattern *string `json:"pattern,omitempty"`
1608
1609 Intent *string `json:"intent,omitempty"`
1610 }
1611
1612
1613 type PatternRuleCreateObject struct {
1614
1615 Pattern *string `json:"pattern,omitempty"`
1616
1617 Intent *string `json:"intent,omitempty"`
1618 }
1619
1620
1621 type PatternRuleInfo struct {
1622 autorest.Response `json:"-"`
1623
1624 ID *uuid.UUID `json:"id,omitempty"`
1625
1626 Pattern *string `json:"pattern,omitempty"`
1627
1628 Intent *string `json:"intent,omitempty"`
1629 }
1630
1631
1632 type PatternRuleUpdateObject struct {
1633
1634 ID *uuid.UUID `json:"id,omitempty"`
1635
1636 Pattern *string `json:"pattern,omitempty"`
1637
1638 Intent *string `json:"intent,omitempty"`
1639 }
1640
1641
1642
1643 type PersonalAssistantsResponse struct {
1644 autorest.Response `json:"-"`
1645 EndpointKeys *[]uuid.UUID `json:"endpointKeys,omitempty"`
1646 EndpointUrls map[string]*string `json:"endpointUrls"`
1647 }
1648
1649
1650 func (par PersonalAssistantsResponse) MarshalJSON() ([]byte, error) {
1651 objectMap := make(map[string]interface{})
1652 if par.EndpointKeys != nil {
1653 objectMap["endpointKeys"] = par.EndpointKeys
1654 }
1655 if par.EndpointUrls != nil {
1656 objectMap["endpointUrls"] = par.EndpointUrls
1657 }
1658 return json.Marshal(objectMap)
1659 }
1660
1661
1662 type PhraselistCreateObject struct {
1663
1664 Phrases *string `json:"phrases,omitempty"`
1665
1666 Name *string `json:"name,omitempty"`
1667
1668 IsExchangeable *bool `json:"isExchangeable,omitempty"`
1669
1670 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
1671 }
1672
1673
1674 type PhraseListFeatureInfo struct {
1675 autorest.Response `json:"-"`
1676
1677 Phrases *string `json:"phrases,omitempty"`
1678
1679 IsExchangeable *bool `json:"isExchangeable,omitempty"`
1680
1681 ID *int32 `json:"id,omitempty"`
1682
1683 Name *string `json:"name,omitempty"`
1684
1685 IsActive *bool `json:"isActive,omitempty"`
1686
1687 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
1688 }
1689
1690
1691 type PhraselistUpdateObject struct {
1692
1693 Phrases *string `json:"phrases,omitempty"`
1694
1695 Name *string `json:"name,omitempty"`
1696
1697 IsActive *bool `json:"isActive,omitempty"`
1698
1699 IsExchangeable *bool `json:"isExchangeable,omitempty"`
1700
1701 EnabledForAllModels *bool `json:"enabledForAllModels,omitempty"`
1702 }
1703
1704
1705 type PrebuiltDomain struct {
1706 Name *string `json:"name,omitempty"`
1707 Culture *string `json:"culture,omitempty"`
1708 Description *string `json:"description,omitempty"`
1709 Examples *string `json:"examples,omitempty"`
1710 Intents *[]PrebuiltDomainItem `json:"intents,omitempty"`
1711 Entities *[]PrebuiltDomainItem `json:"entities,omitempty"`
1712 }
1713
1714
1715
1716 type PrebuiltDomainCreateBaseObject struct {
1717
1718 DomainName *string `json:"domainName,omitempty"`
1719 }
1720
1721
1722
1723 type PrebuiltDomainCreateObject struct {
1724
1725 DomainName *string `json:"domainName,omitempty"`
1726
1727 Culture *string `json:"culture,omitempty"`
1728 }
1729
1730
1731 type PrebuiltDomainItem struct {
1732 Name *string `json:"name,omitempty"`
1733 Description *string `json:"description,omitempty"`
1734 Examples *string `json:"examples,omitempty"`
1735 }
1736
1737
1738
1739 type PrebuiltDomainModelCreateObject struct {
1740
1741 DomainName *string `json:"domainName,omitempty"`
1742
1743 ModelName *string `json:"modelName,omitempty"`
1744 }
1745
1746
1747 type PrebuiltDomainObject struct {
1748 DomainName *string `json:"domain_name,omitempty"`
1749 ModelName *string `json:"model_name,omitempty"`
1750 }
1751
1752
1753 type PrebuiltEntity struct {
1754 Name *string `json:"name,omitempty"`
1755 Roles *[]string `json:"roles,omitempty"`
1756 }
1757
1758
1759 type PrebuiltEntityExtractor struct {
1760 autorest.Response `json:"-"`
1761
1762 ID *uuid.UUID `json:"id,omitempty"`
1763
1764 Name *string `json:"name,omitempty"`
1765
1766 TypeID *int32 `json:"typeId,omitempty"`
1767
1768 ReadableType ReadableType6 `json:"readableType,omitempty"`
1769 Roles *[]EntityRole `json:"roles,omitempty"`
1770 }
1771
1772
1773 type ProductionOrStagingEndpointInfo struct {
1774 autorest.Response `json:"-"`
1775
1776 VersionID *string `json:"versionId,omitempty"`
1777
1778 IsStaging *bool `json:"isStaging,omitempty"`
1779
1780 EndpointURL *string `json:"endpointUrl,omitempty"`
1781
1782 Region *string `json:"region,omitempty"`
1783
1784 AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
1785
1786 EndpointRegion *string `json:"endpointRegion,omitempty"`
1787
1788 FailedRegions *string `json:"failedRegions,omitempty"`
1789
1790 PublishedDateTime *string `json:"publishedDateTime,omitempty"`
1791 }
1792
1793
1794 type PublishSettings struct {
1795 autorest.Response `json:"-"`
1796
1797 ID *uuid.UUID `json:"id,omitempty"`
1798
1799 IsSentimentAnalysisEnabled *bool `json:"sentimentAnalysis,omitempty"`
1800
1801 IsSpeechEnabled *bool `json:"speech,omitempty"`
1802
1803 IsSpellCheckerEnabled *bool `json:"spellChecker,omitempty"`
1804 }
1805
1806
1807 type PublishSettingUpdateObject struct {
1808
1809 SentimentAnalysis *bool `json:"sentimentAnalysis,omitempty"`
1810
1811 Speech *bool `json:"speech,omitempty"`
1812
1813 SpellChecker *bool `json:"spellChecker,omitempty"`
1814 }
1815
1816
1817 type ReadCloser struct {
1818 autorest.Response `json:"-"`
1819 Value *io.ReadCloser `json:"value,omitempty"`
1820 }
1821
1822
1823 type RegexEntity struct {
1824 Name *string `json:"name,omitempty"`
1825 RegexPattern *string `json:"regexPattern,omitempty"`
1826 Roles *[]string `json:"roles,omitempty"`
1827 }
1828
1829
1830 type RegexEntityExtractor struct {
1831 autorest.Response `json:"-"`
1832
1833 ID *uuid.UUID `json:"id,omitempty"`
1834
1835 Name *string `json:"name,omitempty"`
1836
1837 TypeID *int32 `json:"typeId,omitempty"`
1838
1839 ReadableType ReadableType10 `json:"readableType,omitempty"`
1840 Roles *[]EntityRole `json:"roles,omitempty"`
1841
1842 RegexPattern *string `json:"regexPattern,omitempty"`
1843 }
1844
1845
1846 type RegexModelCreateObject struct {
1847
1848 RegexPattern *string `json:"regexPattern,omitempty"`
1849
1850 Name *string `json:"name,omitempty"`
1851 }
1852
1853
1854 type RegexModelUpdateObject struct {
1855
1856 RegexPattern *string `json:"regexPattern,omitempty"`
1857
1858 Name *string `json:"name,omitempty"`
1859 }
1860
1861
1862 type SetString struct {
1863 autorest.Response `json:"-"`
1864 Value map[string]*string `json:"value"`
1865 }
1866
1867
1868 func (ss SetString) MarshalJSON() ([]byte, error) {
1869 objectMap := make(map[string]interface{})
1870 if ss.Value != nil {
1871 objectMap["value"] = ss.Value
1872 }
1873 return json.Marshal(objectMap)
1874 }
1875
1876
1877 type String struct {
1878 autorest.Response `json:"-"`
1879 Value *string `json:"value,omitempty"`
1880 }
1881
1882
1883 type SubClosedList struct {
1884
1885 CanonicalForm *string `json:"canonicalForm,omitempty"`
1886
1887 List *[]string `json:"list,omitempty"`
1888 }
1889
1890
1891 type SubClosedListResponse struct {
1892
1893 ID *int32 `json:"id,omitempty"`
1894
1895 CanonicalForm *string `json:"canonicalForm,omitempty"`
1896
1897 List *[]string `json:"list,omitempty"`
1898 }
1899
1900
1901 type TaskUpdateObject struct {
1902
1903 Version *string `json:"version,omitempty"`
1904 }
1905
1906
1907 type UserAccessList struct {
1908
1909 Owner *string `json:"owner,omitempty"`
1910 Emails *[]string `json:"emails,omitempty"`
1911 }
1912
1913
1914 type UserCollaborator struct {
1915
1916 Email *string `json:"email,omitempty"`
1917 }
1918
1919
1920 type UUID struct {
1921 autorest.Response `json:"-"`
1922 Value *uuid.UUID `json:"value,omitempty"`
1923 }
1924
1925
1926 type VersionInfo struct {
1927 autorest.Response `json:"-"`
1928
1929 Version *string `json:"version,omitempty"`
1930
1931 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
1932
1933 LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
1934
1935 LastTrainedDateTime *date.Time `json:"lastTrainedDateTime,omitempty"`
1936
1937 LastPublishedDateTime *date.Time `json:"lastPublishedDateTime,omitempty"`
1938
1939 EndpointURL *string `json:"endpointUrl,omitempty"`
1940
1941 AssignedEndpointKey map[string]*string `json:"assignedEndpointKey"`
1942
1943 ExternalAPIKeys interface{} `json:"externalApiKeys,omitempty"`
1944
1945 IntentsCount *int32 `json:"intentsCount,omitempty"`
1946
1947 EntitiesCount *int32 `json:"entitiesCount,omitempty"`
1948
1949 EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
1950
1951 TrainingStatus TrainingStatus `json:"trainingStatus,omitempty"`
1952 }
1953
1954
1955 func (vi VersionInfo) MarshalJSON() ([]byte, error) {
1956 objectMap := make(map[string]interface{})
1957 if vi.Version != nil {
1958 objectMap["version"] = vi.Version
1959 }
1960 if vi.CreatedDateTime != nil {
1961 objectMap["createdDateTime"] = vi.CreatedDateTime
1962 }
1963 if vi.LastModifiedDateTime != nil {
1964 objectMap["lastModifiedDateTime"] = vi.LastModifiedDateTime
1965 }
1966 if vi.LastTrainedDateTime != nil {
1967 objectMap["lastTrainedDateTime"] = vi.LastTrainedDateTime
1968 }
1969 if vi.LastPublishedDateTime != nil {
1970 objectMap["lastPublishedDateTime"] = vi.LastPublishedDateTime
1971 }
1972 if vi.EndpointURL != nil {
1973 objectMap["endpointUrl"] = vi.EndpointURL
1974 }
1975 if vi.AssignedEndpointKey != nil {
1976 objectMap["assignedEndpointKey"] = vi.AssignedEndpointKey
1977 }
1978 if vi.ExternalAPIKeys != nil {
1979 objectMap["externalApiKeys"] = vi.ExternalAPIKeys
1980 }
1981 if vi.IntentsCount != nil {
1982 objectMap["intentsCount"] = vi.IntentsCount
1983 }
1984 if vi.EntitiesCount != nil {
1985 objectMap["entitiesCount"] = vi.EntitiesCount
1986 }
1987 if vi.EndpointHitsCount != nil {
1988 objectMap["endpointHitsCount"] = vi.EndpointHitsCount
1989 }
1990 if vi.TrainingStatus != "" {
1991 objectMap["trainingStatus"] = vi.TrainingStatus
1992 }
1993 return json.Marshal(objectMap)
1994 }
1995
1996
1997 type WordListBaseUpdateObject struct {
1998
1999 CanonicalForm *string `json:"canonicalForm,omitempty"`
2000
2001 List *[]string `json:"list,omitempty"`
2002 }
2003
2004
2005 type WordListObject struct {
2006
2007 CanonicalForm *string `json:"canonicalForm,omitempty"`
2008
2009 List *[]string `json:"list,omitempty"`
2010 }
2011
View as plain text