| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models |
| | 8 | | { |
| | 9 | | using Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Linq; |
| | 12 | |
|
| | 13 | | public partial class SpellingTokenSuggestion |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// Initializes a new instance of the SpellingTokenSuggestion class. |
| | 17 | | /// </summary> |
| 1 | 18 | | public SpellingTokenSuggestion() |
| | 19 | | { |
| | 20 | | CustomInit(); |
| 1 | 21 | | } |
| | 22 | |
|
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the SpellingTokenSuggestion class. |
| | 25 | | /// </summary> |
| 0 | 26 | | public SpellingTokenSuggestion(string suggestion, double? score = default(double?), string pingUrlSuffix = defau |
| | 27 | | { |
| 0 | 28 | | Suggestion = suggestion; |
| 0 | 29 | | Score = score; |
| 0 | 30 | | PingUrlSuffix = pingUrlSuffix; |
| | 31 | | CustomInit(); |
| 0 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// An initialization method that performs custom operations like setting defaults |
| | 36 | | /// </summary> |
| | 37 | | partial void CustomInit(); |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// </summary> |
| | 41 | | [JsonProperty(PropertyName = "suggestion")] |
| 2 | 42 | | public string Suggestion { get; set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// </summary> |
| | 46 | | [JsonProperty(PropertyName = "score")] |
| 2 | 47 | | public double? Score { get; private set; } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// </summary> |
| | 51 | | [JsonProperty(PropertyName = "pingUrlSuffix")] |
| 0 | 52 | | public string PingUrlSuffix { get; private set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Validate the object. |
| | 56 | | /// </summary> |
| | 57 | | /// <exception cref="ValidationException"> |
| | 58 | | /// Thrown if validation fails |
| | 59 | | /// </exception> |
| | 60 | | public virtual void Validate() |
| | 61 | | { |
| 0 | 62 | | if (Suggestion == null) |
| | 63 | | { |
| 0 | 64 | | throw new ValidationException(ValidationRules.CannotBeNull, "Suggestion"); |
| | 65 | | } |
| 0 | 66 | | } |
| | 67 | | } |
| | 68 | | } |