| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Search.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Linq; |
| | 16 | |
|
| | 17 | | /// <summary> |
| | 18 | | /// Output field mapping for a skill. |
| | 19 | | /// <see |
| | 20 | | /// href="https://docs.microsoft.com/rest/api/searchservice/naming-rules" |
| | 21 | | /// /> |
| | 22 | | /// </summary> |
| | 23 | | public partial class OutputFieldMappingEntry |
| | 24 | | { |
| | 25 | | /// <summary> |
| | 26 | | /// Initializes a new instance of the OutputFieldMappingEntry class. |
| | 27 | | /// </summary> |
| 262 | 28 | | public OutputFieldMappingEntry() |
| | 29 | | { |
| | 30 | | CustomInit(); |
| 262 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Initializes a new instance of the OutputFieldMappingEntry class. |
| | 35 | | /// </summary> |
| | 36 | | /// <param name="name">The name of the output defined by the |
| | 37 | | /// skill.</param> |
| | 38 | | /// <param name="targetName">The target name of the output. It is |
| | 39 | | /// optional and default to name.</param> |
| 0 | 40 | | public OutputFieldMappingEntry(string name, string targetName = default(string)) |
| | 41 | | { |
| 0 | 42 | | Name = name; |
| 0 | 43 | | TargetName = targetName; |
| | 44 | | CustomInit(); |
| 0 | 45 | | } |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// An initialization method that performs custom operations like setting defaults |
| | 49 | | /// </summary> |
| | 50 | | partial void CustomInit(); |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Gets or sets the name of the output defined by the skill. |
| | 54 | | /// </summary> |
| | 55 | | [JsonProperty(PropertyName = "name")] |
| 742 | 56 | | public string Name { get; set; } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Gets or sets the target name of the output. It is optional and |
| | 60 | | /// default to name. |
| | 61 | | /// </summary> |
| | 62 | | [JsonProperty(PropertyName = "targetName")] |
| 614 | 63 | | public string TargetName { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Validate the object. |
| | 67 | | /// </summary> |
| | 68 | | /// <exception cref="ValidationException"> |
| | 69 | | /// Thrown if validation fails |
| | 70 | | /// </exception> |
| | 71 | | public virtual void Validate() |
| | 72 | | { |
| 128 | 73 | | if (Name == null) |
| | 74 | | { |
| 0 | 75 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | 76 | | } |
| 128 | 77 | | } |
| | 78 | | } |
| | 79 | | } |