CompositeChild.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 
21  public partial class CompositeChild
22  {
26  public CompositeChild() { }
27 
31  public CompositeChild(string type, string value)
32  {
33  Type = type;
34  Value = value;
35  }
36 
40  [JsonProperty(PropertyName = "type")]
41  public string Type { get; set; }
42 
46  [JsonProperty(PropertyName = "value")]
47  public string Value { get; set; }
48 
52  public virtual void Validate()
53  {
54  if (Type == null)
55  {
56  throw new ValidationException(ValidationRules.CannotBeNull, "Type");
57  }
58  if (Value == null)
59  {
60  throw new ValidationException(ValidationRules.CannotBeNull, "Value");
61  }
62  }
63  }
64 }
virtual void Validate()
Validate the object. Throws ValidationException if validation fails.
Child entity in Luis composite entity.
CompositeChild(string type, string value)
Initializes a new instance of the CompositeChild class.
CompositeChild()
Initializes a new instance of the CompositeChild class.