1package authoring 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "encoding/json" 22 "github.com/Azure/go-autorest/autorest" 23 "github.com/Azure/go-autorest/autorest/date" 24 "github.com/satori/go.uuid" 25 "io" 26) 27 28// The package's fully qualified name. 29const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v2.0/luis/authoring" 30 31// ApplicationCreateObject properties for creating a new LUIS Application 32type ApplicationCreateObject struct { 33 // 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. 34 Culture *string `json:"culture,omitempty"` 35 // Domain - The domain for the new application. Optional. E.g.: Comics. 36 Domain *string `json:"domain,omitempty"` 37 // Description - Description of the new application. Optional. 38 Description *string `json:"description,omitempty"` 39 // InitialVersionID - The initial version ID. Optional. Default value is: "0.1" 40 InitialVersionID *string `json:"initialVersionId,omitempty"` 41 // UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT. 42 UsageScenario *string `json:"usageScenario,omitempty"` 43 // Name - The name for the new application. 44 Name *string `json:"name,omitempty"` 45} 46 47// ApplicationInfoResponse response containing the Application Info. 48type ApplicationInfoResponse struct { 49 autorest.Response `json:"-"` 50 // ID - The ID (GUID) of the application. 51 ID *uuid.UUID `json:"id,omitempty"` 52 // Name - The name of the application. 53 Name *string `json:"name,omitempty"` 54 // Description - The description of the application. 55 Description *string `json:"description,omitempty"` 56 // Culture - The culture of the application. For example, "en-us". 57 Culture *string `json:"culture,omitempty"` 58 // UsageScenario - Defines the scenario for the new application. Optional. For example, IoT. 59 UsageScenario *string `json:"usageScenario,omitempty"` 60 // Domain - The domain for the new application. Optional. For example, Comics. 61 Domain *string `json:"domain,omitempty"` 62 // VersionsCount - Amount of model versions within the application. 63 VersionsCount *int32 `json:"versionsCount,omitempty"` 64 // CreatedDateTime - The version's creation timestamp. 65 CreatedDateTime *string `json:"createdDateTime,omitempty"` 66 // Endpoints - The Runtime endpoint URL for this model version. 67 Endpoints interface{} `json:"endpoints,omitempty"` 68 // EndpointHitsCount - Number of calls made to this endpoint. 69 EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"` 70 // ActiveVersion - The version ID currently marked as active. 71 ActiveVersion *string `json:"activeVersion,omitempty"` 72} 73 74// ApplicationPublishObject object model for publishing a specific application version. 75type ApplicationPublishObject struct { 76 // VersionID - The version ID to publish. 77 VersionID *string `json:"versionId,omitempty"` 78 // IsStaging - Indicates if the staging slot should be used, instead of the Production one. 79 IsStaging *bool `json:"isStaging,omitempty"` 80} 81 82// ApplicationSettings the application settings. 83type ApplicationSettings struct { 84 autorest.Response `json:"-"` 85 // ID - The application ID. 86 ID *uuid.UUID `json:"id,omitempty"` 87 // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys for billing purposes. 88 IsPublic *bool `json:"public,omitempty"` 89} 90 91// ApplicationSettingUpdateObject object model for updating an application's settings. 92type ApplicationSettingUpdateObject struct { 93 // IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys. 94 IsPublic *bool `json:"public,omitempty"` 95} 96 97// ApplicationUpdateObject object model for updating the name or description of an application. 98type ApplicationUpdateObject struct { 99 // Name - The application's new name. 100 Name *string `json:"name,omitempty"` 101 // Description - The application's new description. 102 Description *string `json:"description,omitempty"` 103} 104 105// AppVersionSettingObject object model of an application version setting. 106type AppVersionSettingObject struct { 107 // Name - The application version setting name. 108 Name *string `json:"name,omitempty"` 109 // Value - The application version setting value. 110 Value *string `json:"value,omitempty"` 111} 112 113// AvailableCulture available culture for using in a new application. 114type AvailableCulture struct { 115 // Name - The language name. 116 Name *string `json:"name,omitempty"` 117 // Code - The ISO value for the language. 118 Code *string `json:"code,omitempty"` 119} 120 121// AvailablePrebuiltEntityModel available Prebuilt entity model for using in an application. 122type AvailablePrebuiltEntityModel struct { 123 // Name - The entity name. 124 Name *string `json:"name,omitempty"` 125 // Description - The entity description and usage information. 126 Description *string `json:"description,omitempty"` 127 // Examples - Usage examples. 128 Examples *string `json:"examples,omitempty"` 129} 130 131// AzureAccountInfoObject defines the Azure account information object. 132type AzureAccountInfoObject struct { 133 // AzureSubscriptionID - The id for the Azure subscription. 134 AzureSubscriptionID *string `json:"azureSubscriptionId,omitempty"` 135 // ResourceGroup - The Azure resource group name. 136 ResourceGroup *string `json:"resourceGroup,omitempty"` 137 // AccountName - The Azure account name. 138 AccountName *string `json:"accountName,omitempty"` 139} 140 141// BatchLabelExample response when adding a batch of labeled example utterances. 142type BatchLabelExample struct { 143 Value *LabelExampleResponse `json:"value,omitempty"` 144 HasError *bool `json:"hasError,omitempty"` 145 Error *OperationStatus `json:"error,omitempty"` 146} 147 148// ChildEntity the base child entity type. 149type ChildEntity struct { 150 // ID - The ID (GUID) belonging to a child entity. 151 ID *uuid.UUID `json:"id,omitempty"` 152 // Name - The name of a child entity. 153 Name *string `json:"name,omitempty"` 154} 155 156// ClosedList exported Model - A list entity. 157type ClosedList struct { 158 // Name - Name of the list entity. 159 Name *string `json:"name,omitempty"` 160 // SubLists - Sublists for the list entity. 161 SubLists *[]SubClosedList `json:"subLists,omitempty"` 162 Roles *[]string `json:"roles,omitempty"` 163} 164 165// ClosedListEntityExtractor list Entity Extractor. 166type ClosedListEntityExtractor struct { 167 autorest.Response `json:"-"` 168 // ID - The ID of the Entity Model. 169 ID *uuid.UUID `json:"id,omitempty"` 170 // Name - Name of the Entity Model. 171 Name *string `json:"name,omitempty"` 172 // TypeID - The type ID of the Entity Model. 173 TypeID *int32 `json:"typeId,omitempty"` 174 // ReadableType - Possible values include: 'ReadableType4EntityExtractor', 'ReadableType4HierarchicalEntityExtractor', 'ReadableType4HierarchicalChildEntityExtractor', 'ReadableType4CompositeEntityExtractor', 'ReadableType4ListEntityExtractor', 'ReadableType4PrebuiltEntityExtractor', 'ReadableType4IntentClassifier', 'ReadableType4PatternAnyEntityExtractor', 'ReadableType4ClosedListEntityExtractor', 'ReadableType4RegexEntityExtractor' 175 ReadableType ReadableType4 `json:"readableType,omitempty"` 176 Roles *[]EntityRole `json:"roles,omitempty"` 177 // SubLists - List of sublists. 178 SubLists *[]SubClosedListResponse `json:"subLists,omitempty"` 179} 180 181// ClosedListModelCreateObject object model for creating a list entity. 182type ClosedListModelCreateObject struct { 183 // SubLists - Sublists for the feature. 184 SubLists *[]WordListObject `json:"subLists,omitempty"` 185 // Name - Name of the list entity. 186 Name *string `json:"name,omitempty"` 187} 188 189// ClosedListModelPatchObject object model for adding a batch of sublists to an existing list entity. 190type ClosedListModelPatchObject struct { 191 // SubLists - Sublists to add. 192 SubLists *[]WordListObject `json:"subLists,omitempty"` 193} 194 195// ClosedListModelUpdateObject object model for updating a list entity. 196type ClosedListModelUpdateObject struct { 197 // SubLists - The new sublists for the feature. 198 SubLists *[]WordListObject `json:"subLists,omitempty"` 199 // Name - The new name of the list entity. 200 Name *string `json:"name,omitempty"` 201} 202 203// CollaboratorsArray ... 204type CollaboratorsArray struct { 205 // Emails - The email address of the users. 206 Emails *[]string `json:"emails,omitempty"` 207} 208 209// CompositeChildModelCreateObject ... 210type CompositeChildModelCreateObject struct { 211 Name *string `json:"name,omitempty"` 212} 213 214// CompositeEntityExtractor a Composite Entity Extractor. 215type CompositeEntityExtractor struct { 216 autorest.Response `json:"-"` 217 // ID - The ID of the Entity Model. 218 ID *uuid.UUID `json:"id,omitempty"` 219 // Name - Name of the Entity Model. 220 Name *string `json:"name,omitempty"` 221 // TypeID - The type ID of the Entity Model. 222 TypeID *int32 `json:"typeId,omitempty"` 223 // ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier', 'ReadableType3PatternAnyEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3RegexEntityExtractor' 224 ReadableType ReadableType3 `json:"readableType,omitempty"` 225 Roles *[]EntityRole `json:"roles,omitempty"` 226 // Children - List of child entities. 227 Children *[]ChildEntity `json:"children,omitempty"` 228} 229 230// CompositeEntityModel a composite entity extractor. 231type CompositeEntityModel struct { 232 // Children - Child entities. 233 Children *[]string `json:"children,omitempty"` 234 // Name - Entity name. 235 Name *string `json:"name,omitempty"` 236} 237 238// CustomPrebuiltModel a Custom Prebuilt model. 239type CustomPrebuiltModel struct { 240 // ID - The ID of the Entity Model. 241 ID *uuid.UUID `json:"id,omitempty"` 242 // Name - Name of the Entity Model. 243 Name *string `json:"name,omitempty"` 244 // TypeID - The type ID of the Entity Model. 245 TypeID *int32 `json:"typeId,omitempty"` 246 // ReadableType - Possible values include: 'ReadableType7EntityExtractor', 'ReadableType7HierarchicalEntityExtractor', 'ReadableType7HierarchicalChildEntityExtractor', 'ReadableType7CompositeEntityExtractor', 'ReadableType7ListEntityExtractor', 'ReadableType7PrebuiltEntityExtractor', 'ReadableType7IntentClassifier', 'ReadableType7PatternAnyEntityExtractor', 'ReadableType7ClosedListEntityExtractor', 'ReadableType7RegexEntityExtractor' 247 ReadableType ReadableType7 `json:"readableType,omitempty"` 248 // CustomPrebuiltDomainName - The domain name. 249 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` 250 // CustomPrebuiltModelName - The intent name or entity name. 251 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"` 252 Roles *[]EntityRole `json:"roles,omitempty"` 253} 254 255// EndpointInfo the base class "ProductionOrStagingEndpointInfo" inherits from. 256type EndpointInfo struct { 257 // VersionID - The version ID to publish. 258 VersionID *string `json:"versionId,omitempty"` 259 // IsStaging - Indicates if the staging slot should be used, instead of the Production one. 260 IsStaging *bool `json:"isStaging,omitempty"` 261 // EndpointURL - The Runtime endpoint URL for this model version. 262 EndpointURL *string `json:"endpointUrl,omitempty"` 263 // Region - The target region that the application is published to. 264 Region *string `json:"region,omitempty"` 265 // AssignedEndpointKey - The endpoint key. 266 AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"` 267 // EndpointRegion - The endpoint's region. 268 EndpointRegion *string `json:"endpointRegion,omitempty"` 269 // FailedRegions - Regions where publishing failed. 270 FailedRegions *string `json:"failedRegions,omitempty"` 271 // PublishedDateTime - Timestamp when was last published. 272 PublishedDateTime *string `json:"publishedDateTime,omitempty"` 273} 274 275// EnqueueTrainingResponse response model when requesting to train the model. 276type EnqueueTrainingResponse struct { 277 autorest.Response `json:"-"` 278 // StatusID - The train request status ID. 279 StatusID *int32 `json:"statusId,omitempty"` 280 // Status - Possible values include: 'StatusQueued', 'StatusInProgress', 'StatusUpToDate', 'StatusFail', 'StatusSuccess' 281 Status Status `json:"status,omitempty"` 282} 283 284// EntitiesSuggestionExample predicted/suggested entity. 285type EntitiesSuggestionExample struct { 286 // Text - The utterance. For example, "What's the weather like in seattle?" 287 Text *string `json:"text,omitempty"` 288 // TokenizedText - The utterance tokenized. 289 TokenizedText *[]string `json:"tokenizedText,omitempty"` 290 // IntentPredictions - Predicted/suggested intents. 291 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"` 292 // EntityPredictions - Predicted/suggested entities. 293 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"` 294} 295 296// EntityExtractor entity Extractor. 297type EntityExtractor struct { 298 autorest.Response `json:"-"` 299 // ID - The ID of the Entity Model. 300 ID *uuid.UUID `json:"id,omitempty"` 301 // Name - Name of the Entity Model. 302 Name *string `json:"name,omitempty"` 303 // TypeID - The type ID of the Entity Model. 304 TypeID *int32 `json:"typeId,omitempty"` 305 // ReadableType - Possible values include: 'ReadableType8EntityExtractor', 'ReadableType8HierarchicalEntityExtractor', 'ReadableType8HierarchicalChildEntityExtractor', 'ReadableType8CompositeEntityExtractor', 'ReadableType8ListEntityExtractor', 'ReadableType8PrebuiltEntityExtractor', 'ReadableType8IntentClassifier', 'ReadableType8PatternAnyEntityExtractor', 'ReadableType8ClosedListEntityExtractor', 'ReadableType8RegexEntityExtractor' 306 ReadableType ReadableType8 `json:"readableType,omitempty"` 307 Roles *[]EntityRole `json:"roles,omitempty"` 308 // CustomPrebuiltDomainName - The domain name. 309 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` 310 // CustomPrebuiltModelName - The intent name or entity name. 311 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"` 312} 313 314// EntityLabel defines the entity type and position of the extracted entity within the example. 315type EntityLabel struct { 316 // EntityName - The entity type. 317 EntityName *string `json:"entityName,omitempty"` 318 // StartTokenIndex - The index within the utterance where the extracted entity starts. 319 StartTokenIndex *int32 `json:"startTokenIndex,omitempty"` 320 // EndTokenIndex - The index within the utterance where the extracted entity ends. 321 EndTokenIndex *int32 `json:"endTokenIndex,omitempty"` 322 // Role - The role of the entity within the utterance. 323 Role *string `json:"role,omitempty"` 324 // RoleID - The role Id. 325 RoleID *string `json:"roleId,omitempty"` 326} 327 328// EntityLabelObject defines the entity type and position of the extracted entity within the example. 329type EntityLabelObject struct { 330 // EntityName - The entity type. 331 EntityName *string `json:"entityName,omitempty"` 332 // StartCharIndex - The index within the utterance where the extracted entity starts. 333 StartCharIndex *int32 `json:"startCharIndex,omitempty"` 334 // EndCharIndex - The index within the utterance where the extracted entity ends. 335 EndCharIndex *int32 `json:"endCharIndex,omitempty"` 336 // Role - The role of the entity within the utterance. 337 Role *string `json:"role,omitempty"` 338} 339 340// EntityModelInfo an Entity Extractor model info. 341type EntityModelInfo struct { 342 Roles *[]EntityRole `json:"roles,omitempty"` 343 // ID - The ID of the Entity Model. 344 ID *uuid.UUID `json:"id,omitempty"` 345 // Name - Name of the Entity Model. 346 Name *string `json:"name,omitempty"` 347 // TypeID - The type ID of the Entity Model. 348 TypeID *int32 `json:"typeId,omitempty"` 349 // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' 350 ReadableType ReadableType `json:"readableType,omitempty"` 351} 352 353// EntityPrediction a suggested entity. 354type EntityPrediction struct { 355 // EntityName - The entity's name 356 EntityName *string `json:"entityName,omitempty"` 357 // StartTokenIndex - The index within the utterance where the extracted entity starts. 358 StartTokenIndex *int32 `json:"startTokenIndex,omitempty"` 359 // EndTokenIndex - The index within the utterance where the extracted entity ends. 360 EndTokenIndex *int32 `json:"endTokenIndex,omitempty"` 361 // Phrase - The actual token(s) that comprise the entity. 362 Phrase *string `json:"phrase,omitempty"` 363} 364 365// EntityRole entity extractor role 366type EntityRole struct { 367 autorest.Response `json:"-"` 368 // ID - The entity role ID. 369 ID *uuid.UUID `json:"id,omitempty"` 370 // Name - The entity role name. 371 Name *string `json:"name,omitempty"` 372} 373 374// EntityRoleCreateObject object model for creating an entity role. 375type EntityRoleCreateObject struct { 376 // Name - The entity role name. 377 Name *string `json:"name,omitempty"` 378} 379 380// EntityRoleUpdateObject object model for updating an entity role. 381type EntityRoleUpdateObject struct { 382 // Name - The entity role name. 383 Name *string `json:"name,omitempty"` 384} 385 386// ErrorResponse error response when invoking an operation on the API. 387type ErrorResponse struct { 388 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 389 AdditionalProperties map[string]interface{} `json:""` 390 ErrorType *string `json:"errorType,omitempty"` 391} 392 393// MarshalJSON is the custom marshaler for ErrorResponse. 394func (er ErrorResponse) MarshalJSON() ([]byte, error) { 395 objectMap := make(map[string]interface{}) 396 if er.ErrorType != nil { 397 objectMap["errorType"] = er.ErrorType 398 } 399 for k, v := range er.AdditionalProperties { 400 objectMap[k] = v 401 } 402 return json.Marshal(objectMap) 403} 404 405// UnmarshalJSON is the custom unmarshaler for ErrorResponse struct. 406func (er *ErrorResponse) UnmarshalJSON(body []byte) error { 407 var m map[string]*json.RawMessage 408 err := json.Unmarshal(body, &m) 409 if err != nil { 410 return err 411 } 412 for k, v := range m { 413 switch k { 414 default: 415 if v != nil { 416 var additionalProperties interface{} 417 err = json.Unmarshal(*v, &additionalProperties) 418 if err != nil { 419 return err 420 } 421 if er.AdditionalProperties == nil { 422 er.AdditionalProperties = make(map[string]interface{}) 423 } 424 er.AdditionalProperties[k] = additionalProperties 425 } 426 case "errorType": 427 if v != nil { 428 var errorType string 429 err = json.Unmarshal(*v, &errorType) 430 if err != nil { 431 return err 432 } 433 er.ErrorType = &errorType 434 } 435 } 436 } 437 438 return nil 439} 440 441// ExampleLabelObject a labeled example utterance. 442type ExampleLabelObject struct { 443 // Text - The example utterance. 444 Text *string `json:"text,omitempty"` 445 // EntityLabels - The identified entities within the example utterance. 446 EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"` 447 // IntentName - The identified intent representing the example utterance. 448 IntentName *string `json:"intentName,omitempty"` 449} 450 451// ExplicitListItem explicit (exception) list item 452type ExplicitListItem struct { 453 autorest.Response `json:"-"` 454 // ID - The explicit list item ID. 455 ID *int64 `json:"id,omitempty"` 456 // ExplicitListItem - The explicit list item value. 457 ExplicitListItem *string `json:"explicitListItem,omitempty"` 458} 459 460// ExplicitListItemCreateObject object model for creating an explicit (exception) list item. 461type ExplicitListItemCreateObject struct { 462 // ExplicitListItem - The explicit list item. 463 ExplicitListItem *string `json:"explicitListItem,omitempty"` 464} 465 466// ExplicitListItemUpdateObject model object for updating an explicit (exception) list item. 467type ExplicitListItemUpdateObject struct { 468 // ExplicitListItem - The explicit list item. 469 ExplicitListItem *string `json:"explicitListItem,omitempty"` 470} 471 472// FeatureInfoObject the base class Features-related response objects inherit from. 473type FeatureInfoObject struct { 474 // ID - A six-digit ID used for Features. 475 ID *int32 `json:"id,omitempty"` 476 // Name - The name of the Feature. 477 Name *string `json:"name,omitempty"` 478 // IsActive - Indicates if the feature is enabled. 479 IsActive *bool `json:"isActive,omitempty"` 480} 481 482// FeaturesResponseObject model Features, including Patterns and Phraselists. 483type FeaturesResponseObject struct { 484 autorest.Response `json:"-"` 485 PhraselistFeatures *[]PhraseListFeatureInfo `json:"phraselistFeatures,omitempty"` 486 PatternFeatures *[]PatternFeatureInfo `json:"patternFeatures,omitempty"` 487} 488 489// HierarchicalChildEntity a Hierarchical Child Entity. 490type HierarchicalChildEntity struct { 491 autorest.Response `json:"-"` 492 // TypeID - The type ID of the Entity Model. 493 TypeID *int32 `json:"typeId,omitempty"` 494 // ReadableType - Possible values include: 'ReadableType6EntityExtractor', 'ReadableType6HierarchicalEntityExtractor', 'ReadableType6HierarchicalChildEntityExtractor', 'ReadableType6CompositeEntityExtractor', 'ReadableType6ListEntityExtractor', 'ReadableType6PrebuiltEntityExtractor', 'ReadableType6IntentClassifier', 'ReadableType6PatternAnyEntityExtractor', 'ReadableType6ClosedListEntityExtractor', 'ReadableType6RegexEntityExtractor' 495 ReadableType ReadableType6 `json:"readableType,omitempty"` 496 // ID - The ID (GUID) belonging to a child entity. 497 ID *uuid.UUID `json:"id,omitempty"` 498 // Name - The name of a child entity. 499 Name *string `json:"name,omitempty"` 500} 501 502// HierarchicalChildModelCreateObject ... 503type HierarchicalChildModelCreateObject struct { 504 Name *string `json:"name,omitempty"` 505} 506 507// HierarchicalChildModelUpdateObject ... 508type HierarchicalChildModelUpdateObject struct { 509 Name *string `json:"name,omitempty"` 510} 511 512// HierarchicalEntityExtractor hierarchical Entity Extractor. 513type HierarchicalEntityExtractor struct { 514 autorest.Response `json:"-"` 515 // ID - The ID of the Entity Model. 516 ID *uuid.UUID `json:"id,omitempty"` 517 // Name - Name of the Entity Model. 518 Name *string `json:"name,omitempty"` 519 // TypeID - The type ID of the Entity Model. 520 TypeID *int32 `json:"typeId,omitempty"` 521 // ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier', 'ReadableType2PatternAnyEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2RegexEntityExtractor' 522 ReadableType ReadableType2 `json:"readableType,omitempty"` 523 Roles *[]EntityRole `json:"roles,omitempty"` 524 // Children - List of child entities. 525 Children *[]ChildEntity `json:"children,omitempty"` 526} 527 528// HierarchicalEntityModel a hierarchical entity extractor. 529type HierarchicalEntityModel struct { 530 // Children - Child entities. 531 Children *[]string `json:"children,omitempty"` 532 // Name - Entity name. 533 Name *string `json:"name,omitempty"` 534} 535 536// HierarchicalModel ... 537type HierarchicalModel struct { 538 Name *string `json:"name,omitempty"` 539 Children *[]string `json:"children,omitempty"` 540 Inherits *PrebuiltDomainObject `json:"inherits,omitempty"` 541 Roles *[]string `json:"roles,omitempty"` 542} 543 544// Int32 ... 545type Int32 struct { 546 autorest.Response `json:"-"` 547 Value *int32 `json:"value,omitempty"` 548} 549 550// Int64 ... 551type Int64 struct { 552 autorest.Response `json:"-"` 553 Value *int64 `json:"value,omitempty"` 554} 555 556// IntentClassifier intent Classifier. 557type IntentClassifier struct { 558 autorest.Response `json:"-"` 559 // CustomPrebuiltDomainName - The domain name. 560 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` 561 // CustomPrebuiltModelName - The intent name or entity name. 562 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"` 563 // ID - The ID of the Entity Model. 564 ID *uuid.UUID `json:"id,omitempty"` 565 // Name - Name of the Entity Model. 566 Name *string `json:"name,omitempty"` 567 // TypeID - The type ID of the Entity Model. 568 TypeID *int32 `json:"typeId,omitempty"` 569 // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' 570 ReadableType ReadableType `json:"readableType,omitempty"` 571} 572 573// IntentPrediction a suggested intent. 574type IntentPrediction struct { 575 // Name - The intent's name 576 Name *string `json:"name,omitempty"` 577 // Score - The intent's score, based on the prediction model. 578 Score *float64 `json:"score,omitempty"` 579} 580 581// IntentsSuggestionExample predicted/suggested intent. 582type IntentsSuggestionExample struct { 583 // Text - The utterance. For example, "What's the weather like in seattle?" 584 Text *string `json:"text,omitempty"` 585 // TokenizedText - The tokenized utterance. 586 TokenizedText *[]string `json:"tokenizedText,omitempty"` 587 // IntentPredictions - Predicted/suggested intents. 588 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"` 589 // EntityPredictions - Predicted/suggested entities. 590 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"` 591} 592 593// JSONEntity exported Model - Extracted Entity from utterance. 594type JSONEntity struct { 595 // StartPos - The index within the utterance where the extracted entity starts. 596 StartPos *int32 `json:"startPos,omitempty"` 597 // EndPos - The index within the utterance where the extracted entity ends. 598 EndPos *int32 `json:"endPos,omitempty"` 599 // Entity - The entity name. 600 Entity *string `json:"entity,omitempty"` 601 // Role - The role of the entity within the utterance. 602 Role *string `json:"role,omitempty"` 603} 604 605// JSONModelFeature exported Model - Phraselist Model Feature. 606type JSONModelFeature struct { 607 // Activated - Indicates if the feature is enabled. 608 Activated *bool `json:"activated,omitempty"` 609 // Name - The Phraselist name. 610 Name *string `json:"name,omitempty"` 611 // Words - List of comma-separated phrases that represent the Phraselist. 612 Words *string `json:"words,omitempty"` 613 // 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. 614 Mode *bool `json:"mode,omitempty"` 615} 616 617// JSONRegexFeature exported Model - A Pattern feature. 618type JSONRegexFeature struct { 619 // Pattern - The Regular Expression to match. 620 Pattern *string `json:"pattern,omitempty"` 621 // Activated - Indicates if the Pattern feature is enabled. 622 Activated *bool `json:"activated,omitempty"` 623 // Name - Name of the feature. 624 Name *string `json:"name,omitempty"` 625} 626 627// JSONUtterance exported Model - Utterance that was used to train the model. 628type JSONUtterance struct { 629 // Text - The utterance. 630 Text *string `json:"text,omitempty"` 631 // Intent - The matched intent. 632 Intent *string `json:"intent,omitempty"` 633 // Entities - The matched entities. 634 Entities *[]JSONEntity `json:"entities,omitempty"` 635} 636 637// LabeledUtterance a prediction and label pair of an example. 638type LabeledUtterance struct { 639 // ID - ID of Labeled Utterance. 640 ID *int32 `json:"id,omitempty"` 641 // Text - The utterance. For example, "What's the weather like in seattle?" 642 Text *string `json:"text,omitempty"` 643 // TokenizedText - The utterance tokenized. 644 TokenizedText *[]string `json:"tokenizedText,omitempty"` 645 // IntentLabel - The intent matching the example. 646 IntentLabel *string `json:"intentLabel,omitempty"` 647 // EntityLabels - The entities matching the example. 648 EntityLabels *[]EntityLabel `json:"entityLabels,omitempty"` 649 // IntentPredictions - List of suggested intents. 650 IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"` 651 // EntityPredictions - List of suggested entities. 652 EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"` 653} 654 655// LabelExampleResponse response when adding a labeled example utterance. 656type LabelExampleResponse struct { 657 autorest.Response `json:"-"` 658 // UtteranceText - The example utterance. 659 UtteranceText *string `json:"UtteranceText,omitempty"` 660 // ExampleID - The newly created sample ID. 661 ExampleID *int32 `json:"ExampleId,omitempty"` 662} 663 664// LabelTextObject an object containing the example utterance's text. 665type LabelTextObject struct { 666 // ID - The ID of the Label. 667 ID *int32 `json:"id,omitempty"` 668 // Text - The text of the label. 669 Text *string `json:"text,omitempty"` 670} 671 672// ListApplicationInfoResponse ... 673type ListApplicationInfoResponse struct { 674 autorest.Response `json:"-"` 675 Value *[]ApplicationInfoResponse `json:"value,omitempty"` 676} 677 678// ListAppVersionSettingObject ... 679type ListAppVersionSettingObject struct { 680 autorest.Response `json:"-"` 681 Value *[]AppVersionSettingObject `json:"value,omitempty"` 682} 683 684// ListAvailableCulture ... 685type ListAvailableCulture struct { 686 autorest.Response `json:"-"` 687 Value *[]AvailableCulture `json:"value,omitempty"` 688} 689 690// ListAvailablePrebuiltEntityModel ... 691type ListAvailablePrebuiltEntityModel struct { 692 autorest.Response `json:"-"` 693 Value *[]AvailablePrebuiltEntityModel `json:"value,omitempty"` 694} 695 696// ListAzureAccountInfoObject ... 697type ListAzureAccountInfoObject struct { 698 autorest.Response `json:"-"` 699 Value *[]AzureAccountInfoObject `json:"value,omitempty"` 700} 701 702// ListBatchLabelExample ... 703type ListBatchLabelExample struct { 704 autorest.Response `json:"-"` 705 Value *[]BatchLabelExample `json:"value,omitempty"` 706} 707 708// ListClosedListEntityExtractor ... 709type ListClosedListEntityExtractor struct { 710 autorest.Response `json:"-"` 711 Value *[]ClosedListEntityExtractor `json:"value,omitempty"` 712} 713 714// ListCompositeEntityExtractor ... 715type ListCompositeEntityExtractor struct { 716 autorest.Response `json:"-"` 717 Value *[]CompositeEntityExtractor `json:"value,omitempty"` 718} 719 720// ListCustomPrebuiltModel ... 721type ListCustomPrebuiltModel struct { 722 autorest.Response `json:"-"` 723 Value *[]CustomPrebuiltModel `json:"value,omitempty"` 724} 725 726// ListEntitiesSuggestionExample ... 727type ListEntitiesSuggestionExample struct { 728 autorest.Response `json:"-"` 729 Value *[]EntitiesSuggestionExample `json:"value,omitempty"` 730} 731 732// ListEntityExtractor ... 733type ListEntityExtractor struct { 734 autorest.Response `json:"-"` 735 Value *[]EntityExtractor `json:"value,omitempty"` 736} 737 738// ListEntityRole ... 739type ListEntityRole struct { 740 autorest.Response `json:"-"` 741 Value *[]EntityRole `json:"value,omitempty"` 742} 743 744// ListExplicitListItem ... 745type ListExplicitListItem struct { 746 autorest.Response `json:"-"` 747 Value *[]ExplicitListItem `json:"value,omitempty"` 748} 749 750// ListHierarchicalEntityExtractor ... 751type ListHierarchicalEntityExtractor struct { 752 autorest.Response `json:"-"` 753 Value *[]HierarchicalEntityExtractor `json:"value,omitempty"` 754} 755 756// ListIntentClassifier ... 757type ListIntentClassifier struct { 758 autorest.Response `json:"-"` 759 Value *[]IntentClassifier `json:"value,omitempty"` 760} 761 762// ListIntentsSuggestionExample ... 763type ListIntentsSuggestionExample struct { 764 autorest.Response `json:"-"` 765 Value *[]IntentsSuggestionExample `json:"value,omitempty"` 766} 767 768// ListLabeledUtterance ... 769type ListLabeledUtterance struct { 770 autorest.Response `json:"-"` 771 Value *[]LabeledUtterance `json:"value,omitempty"` 772} 773 774// ListLabelTextObject ... 775type ListLabelTextObject struct { 776 autorest.Response `json:"-"` 777 Value *[]LabelTextObject `json:"value,omitempty"` 778} 779 780// ListModelInfoResponse ... 781type ListModelInfoResponse struct { 782 autorest.Response `json:"-"` 783 Value *[]ModelInfoResponse `json:"value,omitempty"` 784} 785 786// ListModelTrainingInfo ... 787type ListModelTrainingInfo struct { 788 autorest.Response `json:"-"` 789 Value *[]ModelTrainingInfo `json:"value,omitempty"` 790} 791 792// ListPatternAnyEntityExtractor ... 793type ListPatternAnyEntityExtractor struct { 794 autorest.Response `json:"-"` 795 Value *[]PatternAnyEntityExtractor `json:"value,omitempty"` 796} 797 798// ListPatternFeatureInfo ... 799type ListPatternFeatureInfo struct { 800 autorest.Response `json:"-"` 801 Value *[]PatternFeatureInfo `json:"value,omitempty"` 802} 803 804// ListPatternRuleInfo ... 805type ListPatternRuleInfo struct { 806 autorest.Response `json:"-"` 807 Value *[]PatternRuleInfo `json:"value,omitempty"` 808} 809 810// ListPhraseListFeatureInfo ... 811type ListPhraseListFeatureInfo struct { 812 autorest.Response `json:"-"` 813 Value *[]PhraseListFeatureInfo `json:"value,omitempty"` 814} 815 816// ListPrebuiltDomain ... 817type ListPrebuiltDomain struct { 818 autorest.Response `json:"-"` 819 Value *[]PrebuiltDomain `json:"value,omitempty"` 820} 821 822// ListPrebuiltEntityExtractor ... 823type ListPrebuiltEntityExtractor struct { 824 autorest.Response `json:"-"` 825 Value *[]PrebuiltEntityExtractor `json:"value,omitempty"` 826} 827 828// ListRegexEntityExtractor ... 829type ListRegexEntityExtractor struct { 830 autorest.Response `json:"-"` 831 Value *[]RegexEntityExtractor `json:"value,omitempty"` 832} 833 834// ListString ... 835type ListString struct { 836 autorest.Response `json:"-"` 837 Value *[]string `json:"value,omitempty"` 838} 839 840// ListUUID ... 841type ListUUID struct { 842 autorest.Response `json:"-"` 843 Value *[]uuid.UUID `json:"value,omitempty"` 844} 845 846// ListVersionInfo ... 847type ListVersionInfo struct { 848 autorest.Response `json:"-"` 849 Value *[]VersionInfo `json:"value,omitempty"` 850} 851 852// LuisApp exported Model - An exported LUIS Application. 853type LuisApp struct { 854 autorest.Response `json:"-"` 855 // AdditionalProperties - Unmatched properties from the message are deserialized this collection 856 AdditionalProperties map[string]interface{} `json:""` 857 // Name - The name of the application. 858 Name *string `json:"name,omitempty"` 859 // VersionID - The version ID of the application that was exported. 860 VersionID *string `json:"versionId,omitempty"` 861 // Desc - The description of the application. 862 Desc *string `json:"desc,omitempty"` 863 // Culture - The culture of the application. E.g.: en-us. 864 Culture *string `json:"culture,omitempty"` 865 // Intents - List of intents. 866 Intents *[]HierarchicalModel `json:"intents,omitempty"` 867 // Entities - List of entities. 868 Entities *[]HierarchicalModel `json:"entities,omitempty"` 869 // ClosedLists - List of list entities. 870 ClosedLists *[]ClosedList `json:"closedLists,omitempty"` 871 // Composites - List of composite entities. 872 Composites *[]HierarchicalModel `json:"composites,omitempty"` 873 // PatternAnyEntities - List of Pattern.Any entities. 874 PatternAnyEntities *[]PatternAny `json:"patternAnyEntities,omitempty"` 875 // RegexEntities - List of regular expression entities. 876 RegexEntities *[]RegexEntity `json:"regex_entities,omitempty"` 877 // PrebuiltEntities - List of prebuilt entities. 878 PrebuiltEntities *[]PrebuiltEntity `json:"prebuiltEntities,omitempty"` 879 // RegexFeatures - List of pattern features. 880 RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"` 881 // ModelFeatures - List of model features. 882 ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"` 883 // Patterns - List of patterns. 884 Patterns *[]PatternRule `json:"patterns,omitempty"` 885 // Utterances - List of example utterances. 886 Utterances *[]JSONUtterance `json:"utterances,omitempty"` 887} 888 889// MarshalJSON is the custom marshaler for LuisApp. 890func (la LuisApp) MarshalJSON() ([]byte, error) { 891 objectMap := make(map[string]interface{}) 892 if la.Name != nil { 893 objectMap["name"] = la.Name 894 } 895 if la.VersionID != nil { 896 objectMap["versionId"] = la.VersionID 897 } 898 if la.Desc != nil { 899 objectMap["desc"] = la.Desc 900 } 901 if la.Culture != nil { 902 objectMap["culture"] = la.Culture 903 } 904 if la.Intents != nil { 905 objectMap["intents"] = la.Intents 906 } 907 if la.Entities != nil { 908 objectMap["entities"] = la.Entities 909 } 910 if la.ClosedLists != nil { 911 objectMap["closedLists"] = la.ClosedLists 912 } 913 if la.Composites != nil { 914 objectMap["composites"] = la.Composites 915 } 916 if la.PatternAnyEntities != nil { 917 objectMap["patternAnyEntities"] = la.PatternAnyEntities 918 } 919 if la.RegexEntities != nil { 920 objectMap["regex_entities"] = la.RegexEntities 921 } 922 if la.PrebuiltEntities != nil { 923 objectMap["prebuiltEntities"] = la.PrebuiltEntities 924 } 925 if la.RegexFeatures != nil { 926 objectMap["regex_features"] = la.RegexFeatures 927 } 928 if la.ModelFeatures != nil { 929 objectMap["model_features"] = la.ModelFeatures 930 } 931 if la.Patterns != nil { 932 objectMap["patterns"] = la.Patterns 933 } 934 if la.Utterances != nil { 935 objectMap["utterances"] = la.Utterances 936 } 937 for k, v := range la.AdditionalProperties { 938 objectMap[k] = v 939 } 940 return json.Marshal(objectMap) 941} 942 943// UnmarshalJSON is the custom unmarshaler for LuisApp struct. 944func (la *LuisApp) UnmarshalJSON(body []byte) error { 945 var m map[string]*json.RawMessage 946 err := json.Unmarshal(body, &m) 947 if err != nil { 948 return err 949 } 950 for k, v := range m { 951 switch k { 952 default: 953 if v != nil { 954 var additionalProperties interface{} 955 err = json.Unmarshal(*v, &additionalProperties) 956 if err != nil { 957 return err 958 } 959 if la.AdditionalProperties == nil { 960 la.AdditionalProperties = make(map[string]interface{}) 961 } 962 la.AdditionalProperties[k] = additionalProperties 963 } 964 case "name": 965 if v != nil { 966 var name string 967 err = json.Unmarshal(*v, &name) 968 if err != nil { 969 return err 970 } 971 la.Name = &name 972 } 973 case "versionId": 974 if v != nil { 975 var versionID string 976 err = json.Unmarshal(*v, &versionID) 977 if err != nil { 978 return err 979 } 980 la.VersionID = &versionID 981 } 982 case "desc": 983 if v != nil { 984 var desc string 985 err = json.Unmarshal(*v, &desc) 986 if err != nil { 987 return err 988 } 989 la.Desc = &desc 990 } 991 case "culture": 992 if v != nil { 993 var culture string 994 err = json.Unmarshal(*v, &culture) 995 if err != nil { 996 return err 997 } 998 la.Culture = &culture 999 } 1000 case "intents": 1001 if v != nil { 1002 var intents []HierarchicalModel 1003 err = json.Unmarshal(*v, &intents) 1004 if err != nil { 1005 return err 1006 } 1007 la.Intents = &intents 1008 } 1009 case "entities": 1010 if v != nil { 1011 var entities []HierarchicalModel 1012 err = json.Unmarshal(*v, &entities) 1013 if err != nil { 1014 return err 1015 } 1016 la.Entities = &entities 1017 } 1018 case "closedLists": 1019 if v != nil { 1020 var closedLists []ClosedList 1021 err = json.Unmarshal(*v, &closedLists) 1022 if err != nil { 1023 return err 1024 } 1025 la.ClosedLists = &closedLists 1026 } 1027 case "composites": 1028 if v != nil { 1029 var composites []HierarchicalModel 1030 err = json.Unmarshal(*v, &composites) 1031 if err != nil { 1032 return err 1033 } 1034 la.Composites = &composites 1035 } 1036 case "patternAnyEntities": 1037 if v != nil { 1038 var patternAnyEntities []PatternAny 1039 err = json.Unmarshal(*v, &patternAnyEntities) 1040 if err != nil { 1041 return err 1042 } 1043 la.PatternAnyEntities = &patternAnyEntities 1044 } 1045 case "regex_entities": 1046 if v != nil { 1047 var regexEntities []RegexEntity 1048 err = json.Unmarshal(*v, ®exEntities) 1049 if err != nil { 1050 return err 1051 } 1052 la.RegexEntities = ®exEntities 1053 } 1054 case "prebuiltEntities": 1055 if v != nil { 1056 var prebuiltEntities []PrebuiltEntity 1057 err = json.Unmarshal(*v, &prebuiltEntities) 1058 if err != nil { 1059 return err 1060 } 1061 la.PrebuiltEntities = &prebuiltEntities 1062 } 1063 case "regex_features": 1064 if v != nil { 1065 var regexFeatures []JSONRegexFeature 1066 err = json.Unmarshal(*v, ®exFeatures) 1067 if err != nil { 1068 return err 1069 } 1070 la.RegexFeatures = ®exFeatures 1071 } 1072 case "model_features": 1073 if v != nil { 1074 var modelFeatures []JSONModelFeature 1075 err = json.Unmarshal(*v, &modelFeatures) 1076 if err != nil { 1077 return err 1078 } 1079 la.ModelFeatures = &modelFeatures 1080 } 1081 case "patterns": 1082 if v != nil { 1083 var patterns []PatternRule 1084 err = json.Unmarshal(*v, &patterns) 1085 if err != nil { 1086 return err 1087 } 1088 la.Patterns = &patterns 1089 } 1090 case "utterances": 1091 if v != nil { 1092 var utterances []JSONUtterance 1093 err = json.Unmarshal(*v, &utterances) 1094 if err != nil { 1095 return err 1096 } 1097 la.Utterances = &utterances 1098 } 1099 } 1100 } 1101 1102 return nil 1103} 1104 1105// ModelCreateObject object model for creating a new entity extractor. 1106type ModelCreateObject struct { 1107 // Name - Name of the new entity extractor. 1108 Name *string `json:"name,omitempty"` 1109} 1110 1111// ModelInfo base type used in entity types. 1112type ModelInfo struct { 1113 // ID - The ID of the Entity Model. 1114 ID *uuid.UUID `json:"id,omitempty"` 1115 // Name - Name of the Entity Model. 1116 Name *string `json:"name,omitempty"` 1117 // TypeID - The type ID of the Entity Model. 1118 TypeID *int32 `json:"typeId,omitempty"` 1119 // ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier', 'ReadableTypePatternAnyEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypeRegexEntityExtractor' 1120 ReadableType ReadableType `json:"readableType,omitempty"` 1121} 1122 1123// ModelInfoResponse an application model info. 1124type ModelInfoResponse struct { 1125 // ID - The ID of the Entity Model. 1126 ID *uuid.UUID `json:"id,omitempty"` 1127 // Name - Name of the Entity Model. 1128 Name *string `json:"name,omitempty"` 1129 // TypeID - The type ID of the Entity Model. 1130 TypeID *int32 `json:"typeId,omitempty"` 1131 // ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier', 'ReadableType1PatternAnyEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1RegexEntityExtractor' 1132 ReadableType ReadableType1 `json:"readableType,omitempty"` 1133 Roles *[]EntityRole `json:"roles,omitempty"` 1134 // Children - List of child entities. 1135 Children *[]ChildEntity `json:"children,omitempty"` 1136 // SubLists - List of sublists. 1137 SubLists *[]SubClosedListResponse `json:"subLists,omitempty"` 1138 // CustomPrebuiltDomainName - The domain name. 1139 CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"` 1140 // CustomPrebuiltModelName - The intent name or entity name. 1141 CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"` 1142 // RegexPattern - The Regular Expression entity pattern. 1143 RegexPattern *string `json:"regexPattern,omitempty"` 1144 ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"` 1145} 1146 1147// ModelTrainingDetails model Training Details. 1148type ModelTrainingDetails struct { 1149 // StatusID - The train request status ID. 1150 StatusID *int32 `json:"statusId,omitempty"` 1151 // Status - Possible values include: 'Status1Queued', 'Status1InProgress', 'Status1UpToDate', 'Status1Fail', 'Status1Success' 1152 Status Status1 `json:"status,omitempty"` 1153 // ExampleCount - The count of examples used to train the model. 1154 ExampleCount *int32 `json:"exampleCount,omitempty"` 1155 // TrainingDateTime - When the model was trained. 1156 TrainingDateTime *date.Time `json:"trainingDateTime,omitempty"` 1157 // FailureReason - Reason for the training failure. 1158 FailureReason *string `json:"failureReason,omitempty"` 1159} 1160 1161// ModelTrainingInfo model Training Info. 1162type ModelTrainingInfo struct { 1163 // ModelID - The ID (GUID) of the model. 1164 ModelID *uuid.UUID `json:"modelId,omitempty"` 1165 Details *ModelTrainingDetails `json:"details,omitempty"` 1166} 1167 1168// ModelUpdateObject object model for updating an intent classifier. 1169type ModelUpdateObject struct { 1170 // Name - The entity's new name. 1171 Name *string `json:"name,omitempty"` 1172} 1173 1174// OperationError operation error details when invoking an operation on the API. 1175type OperationError struct { 1176 Code *string `json:"code,omitempty"` 1177 Message *string `json:"message,omitempty"` 1178} 1179 1180// OperationStatus response of an Operation status. 1181type OperationStatus struct { 1182 autorest.Response `json:"-"` 1183 // Code - Status Code. Possible values include: 'Failed', 'FAILED', 'Success' 1184 Code OperationStatusType `json:"code,omitempty"` 1185 // Message - Status details. 1186 Message *string `json:"message,omitempty"` 1187} 1188 1189// PatternAny pattern.Any Entity Extractor. 1190type PatternAny struct { 1191 Name *string `json:"name,omitempty"` 1192 ExplicitList *[]string `json:"explicitList,omitempty"` 1193 Roles *[]string `json:"roles,omitempty"` 1194} 1195 1196// PatternAnyEntityExtractor pattern.Any Entity Extractor. 1197type PatternAnyEntityExtractor struct { 1198 autorest.Response `json:"-"` 1199 // ID - The ID of the Entity Model. 1200 ID *uuid.UUID `json:"id,omitempty"` 1201 // Name - Name of the Entity Model. 1202 Name *string `json:"name,omitempty"` 1203 // TypeID - The type ID of the Entity Model. 1204 TypeID *int32 `json:"typeId,omitempty"` 1205 // ReadableType - Possible values include: 'ReadableType10EntityExtractor', 'ReadableType10HierarchicalEntityExtractor', 'ReadableType10HierarchicalChildEntityExtractor', 'ReadableType10CompositeEntityExtractor', 'ReadableType10ListEntityExtractor', 'ReadableType10PrebuiltEntityExtractor', 'ReadableType10IntentClassifier', 'ReadableType10PatternAnyEntityExtractor', 'ReadableType10ClosedListEntityExtractor', 'ReadableType10RegexEntityExtractor' 1206 ReadableType ReadableType10 `json:"readableType,omitempty"` 1207 Roles *[]EntityRole `json:"roles,omitempty"` 1208 ExplicitList *[]ExplicitListItem `json:"explicitList,omitempty"` 1209} 1210 1211// PatternAnyModelCreateObject model object for creating a Pattern.Any entity model. 1212type PatternAnyModelCreateObject struct { 1213 // Name - The model name. 1214 Name *string `json:"name,omitempty"` 1215 // ExplicitList - The Pattern.Any explicit list. 1216 ExplicitList *[]string `json:"explicitList,omitempty"` 1217} 1218 1219// PatternAnyModelUpdateObject model object for updating a Pattern.Any entity model. 1220type PatternAnyModelUpdateObject struct { 1221 // Name - The model name. 1222 Name *string `json:"name,omitempty"` 1223 // ExplicitList - The Pattern.Any explicit list. 1224 ExplicitList *[]string `json:"explicitList,omitempty"` 1225} 1226 1227// PatternCreateObject object model for creating a Pattern feature. 1228type PatternCreateObject struct { 1229 // Pattern - The Regular Expression to match. 1230 Pattern *string `json:"pattern,omitempty"` 1231 // Name - Name of the feature. 1232 Name *string `json:"name,omitempty"` 1233} 1234 1235// PatternFeatureInfo pattern feature. 1236type PatternFeatureInfo struct { 1237 // Pattern - The Regular Expression to match. 1238 Pattern *string `json:"pattern,omitempty"` 1239 // ID - A six-digit ID used for Features. 1240 ID *int32 `json:"id,omitempty"` 1241 // Name - The name of the Feature. 1242 Name *string `json:"name,omitempty"` 1243 // IsActive - Indicates if the feature is enabled. 1244 IsActive *bool `json:"isActive,omitempty"` 1245} 1246 1247// PatternRule pattern 1248type PatternRule struct { 1249 // Pattern - The pattern text. 1250 Pattern *string `json:"pattern,omitempty"` 1251 // Intent - The intent's name where the pattern belongs to. 1252 Intent *string `json:"intent,omitempty"` 1253} 1254 1255// PatternRuleCreateObject object model for creating a pattern 1256type PatternRuleCreateObject struct { 1257 // Pattern - The pattern text. 1258 Pattern *string `json:"pattern,omitempty"` 1259 // Intent - The intent's name which the pattern belongs to. 1260 Intent *string `json:"intent,omitempty"` 1261} 1262 1263// PatternRuleInfo pattern rule 1264type PatternRuleInfo struct { 1265 autorest.Response `json:"-"` 1266 // ID - The pattern ID. 1267 ID *uuid.UUID `json:"id,omitempty"` 1268 // Pattern - The pattern text. 1269 Pattern *string `json:"pattern,omitempty"` 1270 // Intent - The intent's name where the pattern belongs to. 1271 Intent *string `json:"intent,omitempty"` 1272} 1273 1274// PatternRuleUpdateObject object model for updating a pattern. 1275type PatternRuleUpdateObject struct { 1276 // ID - The pattern ID. 1277 ID *uuid.UUID `json:"id,omitempty"` 1278 // Pattern - The pattern text. 1279 Pattern *string `json:"pattern,omitempty"` 1280 // Intent - The intent's name which the pattern belongs to. 1281 Intent *string `json:"intent,omitempty"` 1282} 1283 1284// PatternUpdateObject object model for updating an existing Pattern feature. 1285type PatternUpdateObject struct { 1286 // Pattern - The Regular Expression to match. 1287 Pattern *string `json:"pattern,omitempty"` 1288 // Name - Name of the feature. 1289 Name *string `json:"name,omitempty"` 1290 // IsActive - Indicates if the Pattern feature is enabled. 1291 IsActive *bool `json:"isActive,omitempty"` 1292} 1293 1294// PersonalAssistantsResponse response containing user's endpoint keys and the endpoint URLs of the 1295// prebuilt Cortana applications. 1296type PersonalAssistantsResponse struct { 1297 autorest.Response `json:"-"` 1298 EndpointKeys *[]uuid.UUID `json:"endpointKeys,omitempty"` 1299 EndpointUrls map[string]*string `json:"endpointUrls"` 1300} 1301 1302// MarshalJSON is the custom marshaler for PersonalAssistantsResponse. 1303func (par PersonalAssistantsResponse) MarshalJSON() ([]byte, error) { 1304 objectMap := make(map[string]interface{}) 1305 if par.EndpointKeys != nil { 1306 objectMap["endpointKeys"] = par.EndpointKeys 1307 } 1308 if par.EndpointUrls != nil { 1309 objectMap["endpointUrls"] = par.EndpointUrls 1310 } 1311 return json.Marshal(objectMap) 1312} 1313 1314// PhraselistCreateObject object model for creating a phraselist model. 1315type PhraselistCreateObject struct { 1316 // Phrases - List of comma-separated phrases that represent the Phraselist. 1317 Phrases *string `json:"phrases,omitempty"` 1318 // Name - The Phraselist name. 1319 Name *string `json:"name,omitempty"` 1320 // IsExchangeable - 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. 1321 IsExchangeable *bool `json:"isExchangeable,omitempty"` 1322} 1323 1324// PhraseListFeatureInfo phraselist Feature. 1325type PhraseListFeatureInfo struct { 1326 autorest.Response `json:"-"` 1327 // Phrases - A list of comma-separated values. 1328 Phrases *string `json:"phrases,omitempty"` 1329 // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. 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. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true. 1330 IsExchangeable *bool `json:"isExchangeable,omitempty"` 1331 // ID - A six-digit ID used for Features. 1332 ID *int32 `json:"id,omitempty"` 1333 // Name - The name of the Feature. 1334 Name *string `json:"name,omitempty"` 1335 // IsActive - Indicates if the feature is enabled. 1336 IsActive *bool `json:"isActive,omitempty"` 1337} 1338 1339// PhraselistUpdateObject object model for updating a Phraselist. 1340type PhraselistUpdateObject struct { 1341 // Phrases - List of comma-separated phrases that represent the Phraselist. 1342 Phrases *string `json:"phrases,omitempty"` 1343 // Name - The Phraselist name. 1344 Name *string `json:"name,omitempty"` 1345 // IsActive - Indicates if the Phraselist is enabled. 1346 IsActive *bool `json:"isActive,omitempty"` 1347 // IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. 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. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true. 1348 IsExchangeable *bool `json:"isExchangeable,omitempty"` 1349} 1350 1351// PrebuiltDomain prebuilt Domain. 1352type PrebuiltDomain struct { 1353 Name *string `json:"name,omitempty"` 1354 Culture *string `json:"culture,omitempty"` 1355 Description *string `json:"description,omitempty"` 1356 Examples *string `json:"examples,omitempty"` 1357 Intents *[]PrebuiltDomainItem `json:"intents,omitempty"` 1358 Entities *[]PrebuiltDomainItem `json:"entities,omitempty"` 1359} 1360 1361// PrebuiltDomainCreateBaseObject a model object containing the name of the custom prebuilt entity and the 1362// name of the domain to which this model belongs. 1363type PrebuiltDomainCreateBaseObject struct { 1364 // DomainName - The domain name. 1365 DomainName *string `json:"domainName,omitempty"` 1366} 1367 1368// PrebuiltDomainCreateObject a prebuilt domain create object containing the name and culture of the 1369// domain. 1370type PrebuiltDomainCreateObject struct { 1371 // DomainName - The domain name. 1372 DomainName *string `json:"domainName,omitempty"` 1373 // Culture - The culture of the new domain. 1374 Culture *string `json:"culture,omitempty"` 1375} 1376 1377// PrebuiltDomainItem ... 1378type PrebuiltDomainItem struct { 1379 Name *string `json:"name,omitempty"` 1380 Description *string `json:"description,omitempty"` 1381 Examples *string `json:"examples,omitempty"` 1382} 1383 1384// PrebuiltDomainModelCreateObject a model object containing the name of the custom prebuilt intent or 1385// entity and the name of the domain to which this model belongs. 1386type PrebuiltDomainModelCreateObject struct { 1387 // DomainName - The domain name. 1388 DomainName *string `json:"domainName,omitempty"` 1389 // ModelName - The intent name or entity name. 1390 ModelName *string `json:"modelName,omitempty"` 1391} 1392 1393// PrebuiltDomainObject ... 1394type PrebuiltDomainObject struct { 1395 DomainName *string `json:"domain_name,omitempty"` 1396 ModelName *string `json:"model_name,omitempty"` 1397} 1398 1399// PrebuiltEntity prebuilt Entity Extractor. 1400type PrebuiltEntity struct { 1401 Name *string `json:"name,omitempty"` 1402 Roles *[]string `json:"roles,omitempty"` 1403} 1404 1405// PrebuiltEntityExtractor prebuilt Entity Extractor. 1406type PrebuiltEntityExtractor struct { 1407 autorest.Response `json:"-"` 1408 // ID - The ID of the Entity Model. 1409 ID *uuid.UUID `json:"id,omitempty"` 1410 // Name - Name of the Entity Model. 1411 Name *string `json:"name,omitempty"` 1412 // TypeID - The type ID of the Entity Model. 1413 TypeID *int32 `json:"typeId,omitempty"` 1414 // ReadableType - Possible values include: 'ReadableType5EntityExtractor', 'ReadableType5HierarchicalEntityExtractor', 'ReadableType5HierarchicalChildEntityExtractor', 'ReadableType5CompositeEntityExtractor', 'ReadableType5ListEntityExtractor', 'ReadableType5PrebuiltEntityExtractor', 'ReadableType5IntentClassifier', 'ReadableType5PatternAnyEntityExtractor', 'ReadableType5ClosedListEntityExtractor', 'ReadableType5RegexEntityExtractor' 1415 ReadableType ReadableType5 `json:"readableType,omitempty"` 1416 Roles *[]EntityRole `json:"roles,omitempty"` 1417} 1418 1419// ProductionOrStagingEndpointInfo ... 1420type ProductionOrStagingEndpointInfo struct { 1421 autorest.Response `json:"-"` 1422 // VersionID - The version ID to publish. 1423 VersionID *string `json:"versionId,omitempty"` 1424 // IsStaging - Indicates if the staging slot should be used, instead of the Production one. 1425 IsStaging *bool `json:"isStaging,omitempty"` 1426 // EndpointURL - The Runtime endpoint URL for this model version. 1427 EndpointURL *string `json:"endpointUrl,omitempty"` 1428 // Region - The target region that the application is published to. 1429 Region *string `json:"region,omitempty"` 1430 // AssignedEndpointKey - The endpoint key. 1431 AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"` 1432 // EndpointRegion - The endpoint's region. 1433 EndpointRegion *string `json:"endpointRegion,omitempty"` 1434 // FailedRegions - Regions where publishing failed. 1435 FailedRegions *string `json:"failedRegions,omitempty"` 1436 // PublishedDateTime - Timestamp when was last published. 1437 PublishedDateTime *string `json:"publishedDateTime,omitempty"` 1438} 1439 1440// PublishSettings the application publish settings. 1441type PublishSettings struct { 1442 autorest.Response `json:"-"` 1443 // ID - The application ID. 1444 ID *uuid.UUID `json:"id,omitempty"` 1445 // IsSentimentAnalysisEnabled - Setting sentiment analysis as true returns the sentiment of the input utterance along with the response 1446 IsSentimentAnalysisEnabled *bool `json:"sentimentAnalysis,omitempty"` 1447 // IsSpeechEnabled - Enables speech priming in your app 1448 IsSpeechEnabled *bool `json:"speech,omitempty"` 1449 // IsSpellCheckerEnabled - Enables spell checking of the utterance. 1450 IsSpellCheckerEnabled *bool `json:"spellChecker,omitempty"` 1451} 1452 1453// PublishSettingUpdateObject object model for updating an application's publish settings. 1454type PublishSettingUpdateObject struct { 1455 // SentimentAnalysis - Setting sentiment analysis as true returns the Sentiment of the input utterance along with the response 1456 SentimentAnalysis *bool `json:"sentimentAnalysis,omitempty"` 1457 // Speech - Setting speech as public enables speech priming in your app 1458 Speech *bool `json:"speech,omitempty"` 1459 // SpellChecker - Setting spell checker as public enables spell checking the input utterance. 1460 SpellChecker *bool `json:"spellChecker,omitempty"` 1461} 1462 1463// ReadCloser ... 1464type ReadCloser struct { 1465 autorest.Response `json:"-"` 1466 Value *io.ReadCloser `json:"value,omitempty"` 1467} 1468 1469// RegexEntity regular Expression Entity Extractor. 1470type RegexEntity struct { 1471 Name *string `json:"name,omitempty"` 1472 RegexPattern *string `json:"regexPattern,omitempty"` 1473 Roles *[]string `json:"roles,omitempty"` 1474} 1475 1476// RegexEntityExtractor regular Expression Entity Extractor. 1477type RegexEntityExtractor struct { 1478 autorest.Response `json:"-"` 1479 // ID - The ID of the Entity Model. 1480 ID *uuid.UUID `json:"id,omitempty"` 1481 // Name - Name of the Entity Model. 1482 Name *string `json:"name,omitempty"` 1483 // TypeID - The type ID of the Entity Model. 1484 TypeID *int32 `json:"typeId,omitempty"` 1485 // ReadableType - Possible values include: 'ReadableType9EntityExtractor', 'ReadableType9HierarchicalEntityExtractor', 'ReadableType9HierarchicalChildEntityExtractor', 'ReadableType9CompositeEntityExtractor', 'ReadableType9ListEntityExtractor', 'ReadableType9PrebuiltEntityExtractor', 'ReadableType9IntentClassifier', 'ReadableType9PatternAnyEntityExtractor', 'ReadableType9ClosedListEntityExtractor', 'ReadableType9RegexEntityExtractor' 1486 ReadableType ReadableType9 `json:"readableType,omitempty"` 1487 Roles *[]EntityRole `json:"roles,omitempty"` 1488 // RegexPattern - The Regular Expression entity pattern. 1489 RegexPattern *string `json:"regexPattern,omitempty"` 1490} 1491 1492// RegexModelCreateObject model object for creating a regular expression entity model. 1493type RegexModelCreateObject struct { 1494 // RegexPattern - The regular expression entity pattern. 1495 RegexPattern *string `json:"regexPattern,omitempty"` 1496 // Name - The model name. 1497 Name *string `json:"name,omitempty"` 1498} 1499 1500// RegexModelUpdateObject model object for updating a regular expression entity model. 1501type RegexModelUpdateObject struct { 1502 // RegexPattern - The regular expression entity pattern. 1503 RegexPattern *string `json:"regexPattern,omitempty"` 1504 // Name - The model name. 1505 Name *string `json:"name,omitempty"` 1506} 1507 1508// SetString ... 1509type SetString struct { 1510 autorest.Response `json:"-"` 1511 Value map[string]*string `json:"value"` 1512} 1513 1514// MarshalJSON is the custom marshaler for SetString. 1515func (ss SetString) MarshalJSON() ([]byte, error) { 1516 objectMap := make(map[string]interface{}) 1517 if ss.Value != nil { 1518 objectMap["value"] = ss.Value 1519 } 1520 return json.Marshal(objectMap) 1521} 1522 1523// String ... 1524type String struct { 1525 autorest.Response `json:"-"` 1526 Value *string `json:"value,omitempty"` 1527} 1528 1529// SubClosedList sublist of items for a list entity. 1530type SubClosedList struct { 1531 // CanonicalForm - The standard form that the list represents. 1532 CanonicalForm *string `json:"canonicalForm,omitempty"` 1533 // List - List of synonym words. 1534 List *[]string `json:"list,omitempty"` 1535} 1536 1537// SubClosedListResponse sublist of items for a list entity. 1538type SubClosedListResponse struct { 1539 // ID - The sublist ID 1540 ID *int32 `json:"id,omitempty"` 1541 // CanonicalForm - The standard form that the list represents. 1542 CanonicalForm *string `json:"canonicalForm,omitempty"` 1543 // List - List of synonym words. 1544 List *[]string `json:"list,omitempty"` 1545} 1546 1547// TaskUpdateObject object model for cloning an application's version. 1548type TaskUpdateObject struct { 1549 // Version - The new version for the cloned model. 1550 Version *string `json:"version,omitempty"` 1551} 1552 1553// UserAccessList list of user permissions. 1554type UserAccessList struct { 1555 autorest.Response `json:"-"` 1556 // Owner - The email address of owner of the application. 1557 Owner *string `json:"owner,omitempty"` 1558 Emails *[]string `json:"emails,omitempty"` 1559} 1560 1561// UserCollaborator ... 1562type UserCollaborator struct { 1563 // Email - The email address of the user. 1564 Email *string `json:"email,omitempty"` 1565} 1566 1567// UUID ... 1568type UUID struct { 1569 autorest.Response `json:"-"` 1570 Value *uuid.UUID `json:"value,omitempty"` 1571} 1572 1573// VersionInfo object model of an application version. 1574type VersionInfo struct { 1575 autorest.Response `json:"-"` 1576 // Version - The version ID. E.g.: "0.1" 1577 Version *string `json:"version,omitempty"` 1578 // CreatedDateTime - The version's creation timestamp. 1579 CreatedDateTime *date.Time `json:"createdDateTime,omitempty"` 1580 // LastModifiedDateTime - Timestamp of the last update. 1581 LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"` 1582 // LastTrainedDateTime - Timestamp of the last time the model was trained. 1583 LastTrainedDateTime *date.Time `json:"lastTrainedDateTime,omitempty"` 1584 // LastPublishedDateTime - Timestamp when was last published. 1585 LastPublishedDateTime *date.Time `json:"lastPublishedDateTime,omitempty"` 1586 // EndpointURL - The Runtime endpoint URL for this model version. 1587 EndpointURL *string `json:"endpointUrl,omitempty"` 1588 // AssignedEndpointKey - The endpoint key. 1589 AssignedEndpointKey map[string]*string `json:"assignedEndpointKey"` 1590 // ExternalAPIKeys - External keys. 1591 ExternalAPIKeys interface{} `json:"externalApiKeys,omitempty"` 1592 // IntentsCount - Number of intents in this model. 1593 IntentsCount *int32 `json:"intentsCount,omitempty"` 1594 // EntitiesCount - Number of entities in this model. 1595 EntitiesCount *int32 `json:"entitiesCount,omitempty"` 1596 // EndpointHitsCount - Number of calls made to this endpoint. 1597 EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"` 1598 // TrainingStatus - The current training status. Possible values include: 'NeedsTraining', 'InProgress', 'Trained' 1599 TrainingStatus TrainingStatus `json:"trainingStatus,omitempty"` 1600} 1601 1602// MarshalJSON is the custom marshaler for VersionInfo. 1603func (vi VersionInfo) MarshalJSON() ([]byte, error) { 1604 objectMap := make(map[string]interface{}) 1605 if vi.Version != nil { 1606 objectMap["version"] = vi.Version 1607 } 1608 if vi.CreatedDateTime != nil { 1609 objectMap["createdDateTime"] = vi.CreatedDateTime 1610 } 1611 if vi.LastModifiedDateTime != nil { 1612 objectMap["lastModifiedDateTime"] = vi.LastModifiedDateTime 1613 } 1614 if vi.LastTrainedDateTime != nil { 1615 objectMap["lastTrainedDateTime"] = vi.LastTrainedDateTime 1616 } 1617 if vi.LastPublishedDateTime != nil { 1618 objectMap["lastPublishedDateTime"] = vi.LastPublishedDateTime 1619 } 1620 if vi.EndpointURL != nil { 1621 objectMap["endpointUrl"] = vi.EndpointURL 1622 } 1623 if vi.AssignedEndpointKey != nil { 1624 objectMap["assignedEndpointKey"] = vi.AssignedEndpointKey 1625 } 1626 if vi.ExternalAPIKeys != nil { 1627 objectMap["externalApiKeys"] = vi.ExternalAPIKeys 1628 } 1629 if vi.IntentsCount != nil { 1630 objectMap["intentsCount"] = vi.IntentsCount 1631 } 1632 if vi.EntitiesCount != nil { 1633 objectMap["entitiesCount"] = vi.EntitiesCount 1634 } 1635 if vi.EndpointHitsCount != nil { 1636 objectMap["endpointHitsCount"] = vi.EndpointHitsCount 1637 } 1638 if vi.TrainingStatus != "" { 1639 objectMap["trainingStatus"] = vi.TrainingStatus 1640 } 1641 return json.Marshal(objectMap) 1642} 1643 1644// WordListBaseUpdateObject object model for updating one of the list entity's sublists. 1645type WordListBaseUpdateObject struct { 1646 // CanonicalForm - The standard form that the list represents. 1647 CanonicalForm *string `json:"canonicalForm,omitempty"` 1648 // List - List of synonym words. 1649 List *[]string `json:"list,omitempty"` 1650} 1651 1652// WordListObject sublist of items for a list entity. 1653type WordListObject struct { 1654 // CanonicalForm - The standard form that the list represents. 1655 CanonicalForm *string `json:"canonicalForm,omitempty"` 1656 // List - List of synonym words. 1657 List *[]string `json:"list,omitempty"` 1658} 1659