forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.go
1647 lines (1496 loc) · 64 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
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package authoring
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// 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"
"github.com/Azure/go-autorest/autorest/date"
"github.com/gofrs/uuid"
"io"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring"
// ApplicationCreateObject properties for creating a new LUIS Application
type ApplicationCreateObject struct {
// Culture - The culture for the new application. It is the language that your app understands and speaks. E.g.: "en-us". Note: the culture cannot be changed after the app is created.
Culture *string `json:"culture,omitempty"`
// Domain - The domain for the new application. Optional. E.g.: Comics.
Domain *string `json:"domain,omitempty"`
// Description - Description of the new application. Optional.
Description *string `json:"description,omitempty"`
// InitialVersionID - The initial version ID. Optional. Default value is: "0.1"
InitialVersionID *string `json:"initialVersionId,omitempty"`
// UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT.
UsageScenario *string `json:"usageScenario,omitempty"`
// Name - The name for the new application.
Name *string `json:"name,omitempty"`
}
// ApplicationInfoResponse response containing the Application Info.
type ApplicationInfoResponse struct {
autorest.Response `json:"-"`
// ID - The ID (GUID) of the application.
ID *uuid.UUID `json:"id,omitempty"`
// Name - The name of the application.
Name *string `json:"name,omitempty"`
// Description - The description of the application.
Description *string `json:"description,omitempty"`
// Culture - The culture of the application. For example, "en-us".
Culture *string `json:"culture,omitempty"`
// UsageScenario - Defines the scenario for the new application. Optional. For example, IoT.
UsageScenario *string `json:"usageScenario,omitempty"`
// Domain - The domain for the new application. Optional. For example, Comics.
Domain *string `json:"domain,omitempty"`
// VersionsCount - Amount of model versions within the application.
VersionsCount *int32 `json:"versionsCount,omitempty"`
// CreatedDateTime - The version's creation timestamp.
CreatedDateTime *string `json:"createdDateTime,omitempty"`
// Endpoints - The Runtime endpoint URL for this model version.
Endpoints interface{} `json:"endpoints,omitempty"`
// EndpointHitsCount - Number of calls made to this endpoint.
EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
// ActiveVersion - The version ID currently marked as active.
ActiveVersion *string `json:"activeVersion,omitempty"`
}
// ApplicationPublishObject object model for publishing a specific application version.
type ApplicationPublishObject struct {
// VersionID - The version ID to publish.
VersionID *string `json:"versionId,omitempty"`
// IsStaging - Indicates if the staging slot should be used, instead of the Production one.
IsStaging *bool `json:"isStaging,omitempty"`
}
// ApplicationSettings the application settings.
type ApplicationSettings struct {
autorest.Response `json:"-"`
// ID - The application ID.
ID *uuid.UUID `json:"id,omitempty"`
// IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys for billing purposes.
IsPublic *bool `json:"public,omitempty"`
}
// ApplicationSettingUpdateObject object model for updating an application's settings.
type ApplicationSettingUpdateObject struct {
// IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys.
IsPublic *bool `json:"public,omitempty"`
}
// ApplicationUpdateObject object model for updating the name or description of an application.
type ApplicationUpdateObject struct {
// Name - The application's new name.
Name *string `json:"name,omitempty"`
// Description - The application's new description.
Description *string `json:"description,omitempty"`
}
// AppVersionSettingObject object model of an application version setting.
type AppVersionSettingObject struct {
// Name - The application version setting name.
Name *string `json:"name,omitempty"`
// Value - The application version setting value.
Value *string `json:"value,omitempty"`
}
// AvailableCulture available culture for using in a new application.
type AvailableCulture struct {
// Name - The language name.
Name *string `json:"name,omitempty"`
// Code - The ISO value for the language.
Code *string `json:"code,omitempty"`
}
// AvailablePrebuiltEntityModel available Prebuilt entity model for using in an application.
type AvailablePrebuiltEntityModel struct {
// Name - The entity name.
Name *string `json:"name,omitempty"`
// Description - The entity description and usage information.
Description *string `json:"description,omitempty"`
// Examples - Usage examples.
Examples *string `json:"examples,omitempty"`
}
// AzureAccountInfoObject defines the Azure account information object.
type AzureAccountInfoObject struct {
// AzureSubscriptionID - The id for the Azure subscription.
AzureSubscriptionID *string `json:"azureSubscriptionId,omitempty"`
// ResourceGroup - The Azure resource group name.
ResourceGroup *string `json:"resourceGroup,omitempty"`
// AccountName - The Azure account name.
AccountName *string `json:"accountName,omitempty"`
}
// BatchLabelExample response when adding a batch of labeled example utterances.
type BatchLabelExample struct {
Value *LabelExampleResponse `json:"value,omitempty"`
HasError *bool `json:"hasError,omitempty"`
Error *OperationStatus `json:"error,omitempty"`
}
// ChildEntity the base child entity type.
type ChildEntity struct {
// ID - The ID (GUID) belonging to a child entity.
ID *uuid.UUID `json:"id,omitempty"`
// Name - The name of a child entity.
Name *string `json:"name,omitempty"`
}
// ClosedList exported Model - A list entity.
type ClosedList struct {
// Name - Name of the list entity.
Name *string `json:"name,omitempty"`
// SubLists - Sublists for the list entity.
SubLists *[]SubClosedList `json:"subLists,omitempty"`
Roles *[]string `json:"roles,omitempty"`
}
// ClosedListEntityExtractor list Entity Extractor.
type ClosedListEntityExtractor struct {
autorest.Response `json:"-"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4RegexEntityExtractor'
ReadableType ReadableType4 `json:"readableType,omitempty"`
Roles *[]EntityRole `json:"roles,omitempty"`
// SubLists - List of sublists.
SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
}
// ClosedListModelCreateObject object model for creating a list entity.
type ClosedListModelCreateObject struct {
// SubLists - Sublists for the feature.
SubLists *[]WordListObject `json:"subLists,omitempty"`
// Name - Name of the list entity.
Name *string `json:"name,omitempty"`
}
// ClosedListModelPatchObject object model for adding a batch of sublists to an existing list entity.
type ClosedListModelPatchObject struct {
// SubLists - Sublists to add.
SubLists *[]WordListObject `json:"subLists,omitempty"`
}
// ClosedListModelUpdateObject object model for updating a list entity.
type ClosedListModelUpdateObject struct {
// SubLists - The new sublists for the feature.
SubLists *[]WordListObject `json:"subLists,omitempty"`
// Name - The new name of the list entity.
Name *string `json:"name,omitempty"`
}
// CollaboratorsArray ...
type CollaboratorsArray struct {
// Emails - The email address of the users.
Emails *[]string `json:"emails,omitempty"`
}
// CompositeChildModelCreateObject ...
type CompositeChildModelCreateObject struct {
Name *string `json:"name,omitempty"`
}
// CompositeEntityExtractor a Composite Entity Extractor.
type CompositeEntityExtractor struct {
autorest.Response `json:"-"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3RegexEntityExtractor'
ReadableType ReadableType3 `json:"readableType,omitempty"`
Roles *[]EntityRole `json:"roles,omitempty"`
// Children - List of child entities.
Children *[]ChildEntity `json:"children,omitempty"`
}
// CompositeEntityModel a composite entity extractor.
type CompositeEntityModel struct {
// Children - Child entities.
Children *[]string `json:"children,omitempty"`
// Name - Entity name.
Name *string `json:"name,omitempty"`
}
// CustomPrebuiltModel a Custom Prebuilt model.
type CustomPrebuiltModel struct {
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7RegexEntityExtractor'
ReadableType ReadableType7 `json:"readableType,omitempty"`
// CustomPrebuiltDomainName - The domain name.
CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
// CustomPrebuiltModelName - The intent name or entity name.
CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
Roles *[]EntityRole `json:"roles,omitempty"`
}
// EndpointInfo the base class "ProductionOrStagingEndpointInfo" inherits from.
type EndpointInfo struct {
// VersionID - The version ID to publish.
VersionID *string `json:"versionId,omitempty"`
// IsStaging - Indicates if the staging slot should be used, instead of the Production one.
IsStaging *bool `json:"isStaging,omitempty"`
// EndpointURL - The Runtime endpoint URL for this model version.
EndpointURL *string `json:"endpointUrl,omitempty"`
// Region - The target region that the application is published to.
Region *string `json:"region,omitempty"`
// AssignedEndpointKey - The endpoint key.
AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
// EndpointRegion - The endpoint's region.
EndpointRegion *string `json:"endpointRegion,omitempty"`
// FailedRegions - Regions where publishing failed.
FailedRegions *string `json:"failedRegions,omitempty"`
// PublishedDateTime - Timestamp when was last published.
PublishedDateTime *string `json:"publishedDateTime,omitempty"`
}
// EnqueueTrainingResponse response model when requesting to train the model.
type EnqueueTrainingResponse struct {
autorest.Response `json:"-"`
// StatusID - The train request status ID.
StatusID *int32 `json:"statusId,omitempty"`
// Status - Possible values include: 'StatusQueued', 'StatusInProgress', 'StatusUpToDate', 'StatusFail', 'StatusSuccess'
Status Status `json:"status,omitempty"`
}
// EntitiesSuggestionExample predicted/suggested entity.
type EntitiesSuggestionExample struct {
// Text - The utterance. For example, "What's the weather like in seattle?"
Text *string `json:"text,omitempty"`
// TokenizedText - The utterance tokenized.
TokenizedText *[]string `json:"tokenizedText,omitempty"`
// IntentPredictions - Predicted/suggested intents.
IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
// EntityPredictions - Predicted/suggested entities.
EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}
// EntityExtractor entity Extractor.
type EntityExtractor struct {
autorest.Response `json:"-"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8RegexEntityExtractor'
ReadableType ReadableType8 `json:"readableType,omitempty"`
Roles *[]EntityRole `json:"roles,omitempty"`
// CustomPrebuiltDomainName - The domain name.
CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
// CustomPrebuiltModelName - The intent name or entity name.
CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
}
// EntityLabel defines the entity type and position of the extracted entity within the example.
type EntityLabel struct {
// EntityName - The entity type.
EntityName *string `json:"entityName,omitempty"`
// StartTokenIndex - The index within the utterance where the extracted entity starts.
StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
// EndTokenIndex - The index within the utterance where the extracted entity ends.
EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
// Role - The role of the entity within the utterance.
Role *string `json:"role,omitempty"`
// RoleID - The role Id.
RoleID *string `json:"roleId,omitempty"`
}
// EntityLabelObject defines the entity type and position of the extracted entity within the example.
type EntityLabelObject struct {
// EntityName - The entity type.
EntityName *string `json:"entityName,omitempty"`
// StartCharIndex - The index within the utterance where the extracted entity starts.
StartCharIndex *int32 `json:"startCharIndex,omitempty"`
// EndCharIndex - The index within the utterance where the extracted entity ends.
EndCharIndex *int32 `json:"endCharIndex,omitempty"`
// Role - The role of the entity within the utterance.
Role *string `json:"role,omitempty"`
}
// EntityModelInfo an Entity Extractor model info.
type EntityModelInfo struct {
Roles *[]EntityRole `json:"roles,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor'
ReadableType ReadableType `json:"readableType,omitempty"`
}
// EntityPrediction a suggested entity.
type EntityPrediction struct {
// EntityName - The entity's name
EntityName *string `json:"entityName,omitempty"`
// StartTokenIndex - The index within the utterance where the extracted entity starts.
StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
// EndTokenIndex - The index within the utterance where the extracted entity ends.
EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
// Phrase - The actual token(s) that comprise the entity.
Phrase *string `json:"phrase,omitempty"`
}
// EntityRole entity extractor role
type EntityRole struct {
autorest.Response `json:"-"`
// ID - The entity role ID.
ID *uuid.UUID `json:"id,omitempty"`
// Name - The entity role name.
Name *string `json:"name,omitempty"`
}
// EntityRoleCreateObject object model for creating an entity role.
type EntityRoleCreateObject struct {
// Name - The entity role name.
Name *string `json:"name,omitempty"`
}
// EntityRoleUpdateObject object model for updating an entity role.
type EntityRoleUpdateObject struct {
// Name - The entity role name.
Name *string `json:"name,omitempty"`
}
// ErrorResponse error response when invoking an operation on the API.
type ErrorResponse struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
ErrorType *string `json:"errorType,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorResponse.
func (er ErrorResponse) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if er.ErrorType != nil {
objectMap["errorType"] = er.ErrorType
}
for k, v := range er.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct.
func (er *ErrorResponse) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
default:
if v != nil {
var additionalProperties interface{}
err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
if er.AdditionalProperties == nil {
er.AdditionalProperties = make(map[string]interface{})
}
er.AdditionalProperties[k] = additionalProperties
}
case "errorType":
if v != nil {
var errorType string
err = json.Unmarshal(*v, &errorType)
if err != nil {
return err
}
er.ErrorType = &errorType
}
}
}
return nil
}
// ExampleLabelObject a labeled example utterance.
type ExampleLabelObject struct {
// Text - The example utterance.
Text *string `json:"text,omitempty"`
// EntityLabels - The identified entities within the example utterance.
EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"`
// IntentName - The identified intent representing the example utterance.
IntentName *string `json:"intentName,omitempty"`
}
// ExplicitListItem explicit (exception) list item
type ExplicitListItem struct {
autorest.Response `json:"-"`
// ID - The explicit list item ID.
ID *int64 `json:"id,omitempty"`
// ExplicitListItem - The explicit list item value.
ExplicitListItem *string `json:"explicitListItem,omitempty"`
}
// ExplicitListItemCreateObject object model for creating an explicit (exception) list item.
type ExplicitListItemCreateObject struct {
// ExplicitListItem - The explicit list item.
ExplicitListItem *string `json:"explicitListItem,omitempty"`
}
// ExplicitListItemUpdateObject model object for updating an explicit (exception) list item.
type ExplicitListItemUpdateObject struct {
// ExplicitListItem - The explicit list item.
ExplicitListItem *string `json:"explicitListItem,omitempty"`
}
// FeatureInfoObject the base class Features-related response objects inherit from.
type FeatureInfoObject struct {
// ID - A six-digit ID used for Features.
ID *int32 `json:"id,omitempty"`
// Name - The name of the Feature.
Name *string `json:"name,omitempty"`
// IsActive - Indicates if the feature is enabled.
IsActive *bool `json:"isActive,omitempty"`
}
// FeaturesResponseObject model Features, including Patterns and Phraselists.
type FeaturesResponseObject struct {
autorest.Response `json:"-"`
PhraselistFeatures *[]PhraseListFeatureInfo `json:"phraselistFeatures,omitempty"`
PatternFeatures *[]PatternFeatureInfo `json:"patternFeatures,omitempty"`
}
// HierarchicalChildEntity a Hierarchical Child Entity.
type HierarchicalChildEntity struct {
autorest.Response `json:"-"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6RegexEntityExtractor'
ReadableType ReadableType6 `json:"readableType,omitempty"`
// ID - The ID (GUID) belonging to a child entity.
ID *uuid.UUID `json:"id,omitempty"`
// Name - The name of a child entity.
Name *string `json:"name,omitempty"`
}
// HierarchicalChildModelCreateObject ...
type HierarchicalChildModelCreateObject struct {
Name *string `json:"name,omitempty"`
}
// HierarchicalChildModelUpdateObject ...
type HierarchicalChildModelUpdateObject struct {
Name *string `json:"name,omitempty"`
}
// HierarchicalEntityExtractor hierarchical Entity Extractor.
type HierarchicalEntityExtractor struct {
autorest.Response `json:"-"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2RegexEntityExtractor'
ReadableType ReadableType2 `json:"readableType,omitempty"`
Roles *[]EntityRole `json:"roles,omitempty"`
// Children - List of child entities.
Children *[]ChildEntity `json:"children,omitempty"`
}
// HierarchicalEntityModel a hierarchical entity extractor.
type HierarchicalEntityModel struct {
// Children - Child entities.
Children *[]string `json:"children,omitempty"`
// Name - Entity name.
Name *string `json:"name,omitempty"`
}
// HierarchicalModel ...
type HierarchicalModel struct {
Name *string `json:"name,omitempty"`
Children *[]string `json:"children,omitempty"`
Inherits *PrebuiltDomainObject `json:"inherits,omitempty"`
Roles *[]string `json:"roles,omitempty"`
}
// Int32 ...
type Int32 struct {
autorest.Response `json:"-"`
Value *int32 `json:"value,omitempty"`
}
// Int64 ...
type Int64 struct {
autorest.Response `json:"-"`
Value *int64 `json:"value,omitempty"`
}
// IntentClassifier intent Classifier.
type IntentClassifier struct {
autorest.Response `json:"-"`
// CustomPrebuiltDomainName - The domain name.
CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
// CustomPrebuiltModelName - The intent name or entity name.
CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
// ID - The ID of the Entity Model.
ID *uuid.UUID `json:"id,omitempty"`
// Name - Name of the Entity Model.
Name *string `json:"name,omitempty"`
// TypeID - The type ID of the Entity Model.
TypeID *int32 `json:"typeId,omitempty"`
// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor'
ReadableType ReadableType `json:"readableType,omitempty"`
}
// IntentPrediction a suggested intent.
type IntentPrediction struct {
// Name - The intent's name
Name *string `json:"name,omitempty"`
// Score - The intent's score, based on the prediction model.
Score *float64 `json:"score,omitempty"`
}
// IntentsSuggestionExample predicted/suggested intent.
type IntentsSuggestionExample struct {
// Text - The utterance. For example, "What's the weather like in seattle?"
Text *string `json:"text,omitempty"`
// TokenizedText - The tokenized utterance.
TokenizedText *[]string `json:"tokenizedText,omitempty"`
// IntentPredictions - Predicted/suggested intents.
IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
// EntityPredictions - Predicted/suggested entities.
EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}
// JSONEntity exported Model - Extracted Entity from utterance.
type JSONEntity struct {
// StartPos - The index within the utterance where the extracted entity starts.
StartPos *int32 `json:"startPos,omitempty"`
// EndPos - The index within the utterance where the extracted entity ends.
EndPos *int32 `json:"endPos,omitempty"`
// Entity - The entity name.
Entity *string `json:"entity,omitempty"`
// Role - The role of the entity within the utterance.
Role *string `json:"role,omitempty"`
}
// JSONModelFeature exported Model - Phraselist Model Feature.
type JSONModelFeature struct {
// Activated - Indicates if the feature is enabled.
Activated *bool `json:"activated,omitempty"`
// Name - The Phraselist name.
Name *string `json:"name,omitempty"`
// Words - List of comma-separated phrases that represent the Phraselist.
Words *string `json:"words,omitempty"`
// Mode - An interchangeable phrase list feature serves as a list of synonyms for training. A non-exchangeable phrase list serves as separate features for training. So, if your non-interchangeable phrase list contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-interchangeable phrase list as an additional bag of words to add to LUIS existing vocabulary features. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn’t. Default value is true.
Mode *bool `json:"mode,omitempty"`
}
// JSONRegexFeature exported Model - A Pattern feature.
type JSONRegexFeature struct {
// Pattern - The Regular Expression to match.
Pattern *string `json:"pattern,omitempty"`
// Activated - Indicates if the Pattern feature is enabled.
Activated *bool `json:"activated,omitempty"`
// Name - Name of the feature.
Name *string `json:"name,omitempty"`
}
// JSONUtterance exported Model - Utterance that was used to train the model.
type JSONUtterance struct {
// Text - The utterance.
Text *string `json:"text,omitempty"`
// Intent - The matched intent.
Intent *string `json:"intent,omitempty"`
// Entities - The matched entities.
Entities *[]JSONEntity `json:"entities,omitempty"`
}
// LabeledUtterance a prediction and label pair of an example.
type LabeledUtterance struct {
// ID - ID of Labeled Utterance.
ID *int32 `json:"id,omitempty"`
// Text - The utterance. For example, "What's the weather like in seattle?"
Text *string `json:"text,omitempty"`
// TokenizedText - The utterance tokenized.
TokenizedText *[]string `json:"tokenizedText,omitempty"`
// IntentLabel - The intent matching the example.
IntentLabel *string `json:"intentLabel,omitempty"`
// EntityLabels - The entities matching the example.
EntityLabels *[]EntityLabel `json:"entityLabels,omitempty"`
// IntentPredictions - List of suggested intents.
IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
// EntityPredictions - List of suggested entities.
EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}
// LabelExampleResponse response when adding a labeled example utterance.
type LabelExampleResponse struct {
autorest.Response `json:"-"`
// UtteranceText - The example utterance.
UtteranceText *string `json:"UtteranceText,omitempty"`
// ExampleID - The newly created sample ID.
ExampleID *int32 `json:"ExampleId,omitempty"`
}
// LabelTextObject an object containing the example utterance's text.
type LabelTextObject struct {
// ID - The ID of the Label.
ID *int32 `json:"id,omitempty"`
// Text - The text of the label.
Text *string `json:"text,omitempty"`
}
// ListApplicationInfoResponse ...
type ListApplicationInfoResponse struct {
autorest.Response `json:"-"`
Value *[]ApplicationInfoResponse `json:"value,omitempty"`
}
// ListAppVersionSettingObject ...
type ListAppVersionSettingObject struct {
autorest.Response `json:"-"`
Value *[]AppVersionSettingObject `json:"value,omitempty"`
}
// ListAvailableCulture ...
type ListAvailableCulture struct {
autorest.Response `json:"-"`
Value *[]AvailableCulture `json:"value,omitempty"`
}
// ListAvailablePrebuiltEntityModel ...
type ListAvailablePrebuiltEntityModel struct {
autorest.Response `json:"-"`
Value *[]AvailablePrebuiltEntityModel `json:"value,omitempty"`
}
// ListAzureAccountInfoObject ...
type ListAzureAccountInfoObject struct {
autorest.Response `json:"-"`
Value *[]AzureAccountInfoObject `json:"value,omitempty"`
}
// ListBatchLabelExample ...
type ListBatchLabelExample struct {
autorest.Response `json:"-"`
Value *[]BatchLabelExample `json:"value,omitempty"`
}
// ListClosedListEntityExtractor ...
type ListClosedListEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]ClosedListEntityExtractor `json:"value,omitempty"`
}
// ListCompositeEntityExtractor ...
type ListCompositeEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]CompositeEntityExtractor `json:"value,omitempty"`
}
// ListCustomPrebuiltModel ...
type ListCustomPrebuiltModel struct {
autorest.Response `json:"-"`
Value *[]CustomPrebuiltModel `json:"value,omitempty"`
}
// ListEntitiesSuggestionExample ...
type ListEntitiesSuggestionExample struct {
autorest.Response `json:"-"`
Value *[]EntitiesSuggestionExample `json:"value,omitempty"`
}
// ListEntityExtractor ...
type ListEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]EntityExtractor `json:"value,omitempty"`
}
// ListEntityRole ...
type ListEntityRole struct {
autorest.Response `json:"-"`
Value *[]EntityRole `json:"value,omitempty"`
}
// ListExplicitListItem ...
type ListExplicitListItem struct {
autorest.Response `json:"-"`
Value *[]ExplicitListItem `json:"value,omitempty"`
}
// ListHierarchicalEntityExtractor ...
type ListHierarchicalEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]HierarchicalEntityExtractor `json:"value,omitempty"`
}
// ListIntentClassifier ...
type ListIntentClassifier struct {
autorest.Response `json:"-"`
Value *[]IntentClassifier `json:"value,omitempty"`
}
// ListIntentsSuggestionExample ...
type ListIntentsSuggestionExample struct {
autorest.Response `json:"-"`
Value *[]IntentsSuggestionExample `json:"value,omitempty"`
}
// ListLabeledUtterance ...
type ListLabeledUtterance struct {
autorest.Response `json:"-"`
Value *[]LabeledUtterance `json:"value,omitempty"`
}
// ListLabelTextObject ...
type ListLabelTextObject struct {
autorest.Response `json:"-"`
Value *[]LabelTextObject `json:"value,omitempty"`
}
// ListModelInfoResponse ...
type ListModelInfoResponse struct {
autorest.Response `json:"-"`
Value *[]ModelInfoResponse `json:"value,omitempty"`
}
// ListModelTrainingInfo ...
type ListModelTrainingInfo struct {
autorest.Response `json:"-"`
Value *[]ModelTrainingInfo `json:"value,omitempty"`
}
// ListPatternAnyEntityExtractor ...
type ListPatternAnyEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]PatternAnyEntityExtractor `json:"value,omitempty"`
}
// ListPatternFeatureInfo ...
type ListPatternFeatureInfo struct {
autorest.Response `json:"-"`
Value *[]PatternFeatureInfo `json:"value,omitempty"`
}
// ListPatternRuleInfo ...
type ListPatternRuleInfo struct {
autorest.Response `json:"-"`
Value *[]PatternRuleInfo `json:"value,omitempty"`
}
// ListPhraseListFeatureInfo ...
type ListPhraseListFeatureInfo struct {
autorest.Response `json:"-"`
Value *[]PhraseListFeatureInfo `json:"value,omitempty"`
}
// ListPrebuiltDomain ...
type ListPrebuiltDomain struct {
autorest.Response `json:"-"`
Value *[]PrebuiltDomain `json:"value,omitempty"`
}
// ListPrebuiltEntityExtractor ...
type ListPrebuiltEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]PrebuiltEntityExtractor `json:"value,omitempty"`
}
// ListRegexEntityExtractor ...
type ListRegexEntityExtractor struct {
autorest.Response `json:"-"`
Value *[]RegexEntityExtractor `json:"value,omitempty"`
}
// ListString ...
type ListString struct {
autorest.Response `json:"-"`
Value *[]string `json:"value,omitempty"`
}
// ListUUID ...
type ListUUID struct {
autorest.Response `json:"-"`
Value *[]uuid.UUID `json:"value,omitempty"`
}
// ListVersionInfo ...
type ListVersionInfo struct {
autorest.Response `json:"-"`
Value *[]VersionInfo `json:"value,omitempty"`
}
// LuisApp exported Model - An exported LUIS Application.
type LuisApp struct {
autorest.Response `json:"-"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// Name - The name of the application.
Name *string `json:"name,omitempty"`
// VersionID - The version ID of the application that was exported.
VersionID *string `json:"versionId,omitempty"`
// Desc - The description of the application.
Desc *string `json:"desc,omitempty"`
// Culture - The culture of the application. E.g.: en-us.
Culture *string `json:"culture,omitempty"`
// Intents - List of intents.
Intents *[]HierarchicalModel `json:"intents,omitempty"`
// Entities - List of entities.
Entities *[]HierarchicalModel `json:"entities,omitempty"`
// ClosedLists - List of list entities.
ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
// Composites - List of composite entities.
Composites *[]HierarchicalModel `json:"composites,omitempty"`
// PatternAnyEntities - List of Pattern.Any entities.
PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"`
// RegexEntities - List of regular expression entities.
RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"`
// PrebuiltEntities - List of prebuilt entities.
PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"`
// RegexFeatures - List of pattern features.
RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
// ModelFeatures - List of model features.
ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
// Patterns - List of patterns.
Patterns *[]PatternRule `json:"patterns,omitempty"`
// Utterances - List of example utterances.
Utterances *[]JSONUtterance `json:"utterances,omitempty"`
}
// MarshalJSON is the custom marshaler for LuisApp.
func (la LuisApp) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if la.Name != nil {
objectMap["name"] = la.Name
}
if la.VersionID != nil {
objectMap["versionId"] = la.VersionID
}
if la.Desc != nil {
objectMap["desc"] = la.Desc
}
if la.Culture != nil {
objectMap["culture"] = la.Culture
}
if la.Intents != nil {
objectMap["intents"] = la.Intents
}
if la.Entities != nil {
objectMap["entities"] = la.Entities
}
if la.ClosedLists != nil {
objectMap["closedLists"] = la.ClosedLists
}
if la.Composites != nil {
objectMap["composites"] = la.Composites
}
if la.PatternAnyEntities != nil {
objectMap["patternAnyEntities"] = la.PatternAnyEntities
}
if la.RegexEntities != nil {
objectMap["regex_entities"] = la.RegexEntities
}
if la.PrebuiltEntities != nil {
objectMap["prebuiltEntities"] = la.PrebuiltEntities
}
if la.RegexFeatures != nil {
objectMap["regex_features"] = la.RegexFeatures
}
if la.ModelFeatures != nil {
objectMap["model_features"] = la.ModelFeatures
}
if la.Patterns != nil {
objectMap["patterns"] = la.Patterns
}
if la.Utterances != nil {
objectMap["utterances"] = la.Utterances
}
for k, v := range la.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for LuisApp struct.
func (la *LuisApp) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
default:
if v != nil {
var additionalProperties interface{}
err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
if la.AdditionalProperties == nil {
la.AdditionalProperties = make(map[string]interface{})
}
la.AdditionalProperties[k] = additionalProperties
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
la.Name = &name
}
case "versionId":
if v != nil {
var versionID string
err = json.Unmarshal(*v, &versionID)
if err != nil {
return err
}
la.VersionID = &versionID
}
case "desc":
if v != nil {
var desc string
err = json.Unmarshal(*v, &desc)
if err != nil {
return err
}
la.Desc = &desc
}
case "culture":
if v != nil {
var culture string
err = json.Unmarshal(*v, &culture)
if err != nil {
return err
}
la.Culture = &culture
}
case "intents":
if v != nil {
var intents []HierarchicalModel
err = json.Unmarshal(*v, &intents)
if err != nil {
return err
}
la.Intents = &intents
}
case "entities":
if v != nil {
var entities []HierarchicalModel