EntityRecommendation.cs
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See License.txt in the project root for
3 // license information.
4 //
5 // Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
6 // Changes may cause incorrect behavior and will be lost if the code is
7 // regenerated.
8 
9 namespace Microsoft.Bot.Builder.Luis.Models
10 {
11  using System;
12  using System.Linq;
13  using System.Collections.Generic;
14  using Newtonsoft.Json;
15  using Microsoft.Rest;
16  using Microsoft.Rest.Serialization;
17 
22  public partial class EntityRecommendation
23  {
27  public EntityRecommendation() { }
28 
32  public EntityRecommendation(string type, string role = default(string), string entity = default(string), int? startIndex = default(int?), int? endIndex = default(int?), double? score = default(double?), IDictionary<string, string> resolution = default(IDictionary<string, string>))
33  {
34  Role = role;
35  Entity = entity;
36  Type = type;
37  StartIndex = startIndex;
38  EndIndex = endIndex;
39  Score = score;
40  Resolution = resolution;
41  }
42 
46  [JsonProperty(PropertyName = "role")]
47  public string Role { get; set; }
48 
52  [JsonProperty(PropertyName = "entity")]
53  public string Entity { get; set; }
54 
58  [JsonProperty(PropertyName = "type")]
59  public string Type { get; set; }
60 
64  [JsonProperty(PropertyName = "startIndex")]
65  public int? StartIndex { get; set; }
66 
70  [JsonProperty(PropertyName = "endIndex")]
71  public int? EndIndex { get; set; }
72 
76  [JsonProperty(PropertyName = "score")]
77  public double? Score { get; set; }
78 
84  [JsonProperty(PropertyName = "resolution")]
85  public IDictionary<string, string> Resolution { get; set; }
86 
90  public virtual void Validate()
91  {
92  if (Type == null)
93  {
94  throw new ValidationException(ValidationRules.CannotBeNull, "Type");
95  }
96  }
97  }
98 }
EntityRecommendation()
Initializes a new instance of the EntityRecommendation class.
EntityRecommendation(string type, string role=default(string), string entity=default(string), int?startIndex=default(int?), int?endIndex=default(int?), double?score=default(double?), IDictionary< string, string > resolution=default(IDictionary< string, string >))
Initializes a new instance of the EntityRecommendation class.
virtual void Validate()
Validate the object. Throws ValidationException if validation fails.