| | 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 Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// A skill to split a string into chunks of text. |
| | 20 | | /// <see |
| | 21 | | /// href="https://docs.microsoft.com/azure/search/cognitive-search-skill-textsplit" |
| | 22 | | /// /> |
| | 23 | | /// </summary> |
| | 24 | | [Newtonsoft.Json.JsonObject("#Microsoft.Skills.Text.SplitSkill")] |
| | 25 | | public partial class SplitSkill : Skill |
| | 26 | | { |
| | 27 | | /// <summary> |
| | 28 | | /// Initializes a new instance of the SplitSkill class. |
| | 29 | | /// </summary> |
| 10 | 30 | | public SplitSkill() |
| | 31 | | { |
| | 32 | | CustomInit(); |
| 10 | 33 | | } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Initializes a new instance of the SplitSkill class. |
| | 37 | | /// </summary> |
| | 38 | | /// <param name="inputs">Inputs of the skills could be a column in the |
| | 39 | | /// source data set, or the output of an upstream skill.</param> |
| | 40 | | /// <param name="outputs">The output of a skill is either a field in a |
| | 41 | | /// search index, or a value that can be consumed as an input by |
| | 42 | | /// another skill.</param> |
| | 43 | | /// <param name="name">The name of the skill which uniquely identifies |
| | 44 | | /// it within the skillset. A skill with no name defined will be given |
| | 45 | | /// a default name of its 1-based index in the skills array, prefixed |
| | 46 | | /// with the character '#'.</param> |
| | 47 | | /// <param name="description">The description of the skill which |
| | 48 | | /// describes the inputs, outputs, and usage of the skill.</param> |
| | 49 | | /// <param name="context">Represents the level at which operations take |
| | 50 | | /// place, such as the document root or document content (for example, |
| | 51 | | /// /document or /document/content). The default is /document.</param> |
| | 52 | | /// <param name="defaultLanguageCode">A value indicating which language |
| | 53 | | /// code to use. Default is en. Possible values include: 'da', 'de', |
| | 54 | | /// 'en', 'es', 'fi', 'fr', 'it', 'ko', 'pt'</param> |
| | 55 | | /// <param name="textSplitMode">A value indicating which split mode to |
| | 56 | | /// perform. Possible values include: 'pages', 'sentences'</param> |
| | 57 | | /// <param name="maximumPageLength">The desired maximum page length. |
| | 58 | | /// Default is 10000.</param> |
| | 59 | | public SplitSkill(IList<InputFieldMappingEntry> inputs, IList<OutputFieldMappingEntry> outputs, string name = de |
| 10 | 60 | | : base(inputs, outputs, name, description, context) |
| | 61 | | { |
| 10 | 62 | | DefaultLanguageCode = defaultLanguageCode; |
| 10 | 63 | | TextSplitMode = textSplitMode; |
| 10 | 64 | | MaximumPageLength = maximumPageLength; |
| | 65 | | CustomInit(); |
| 10 | 66 | | } |
| | 67 | |
|
| | 68 | | /// <summary> |
| | 69 | | /// An initialization method that performs custom operations like setting defaults |
| | 70 | | /// </summary> |
| | 71 | | partial void CustomInit(); |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Gets or sets a value indicating which language code to use. Default |
| | 75 | | /// is en. Possible values include: 'da', 'de', 'en', 'es', 'fi', 'fr', |
| | 76 | | /// 'it', 'ko', 'pt' |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "defaultLanguageCode")] |
| 58 | 79 | | public SplitSkillLanguage? DefaultLanguageCode { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets a value indicating which split mode to perform. |
| | 83 | | /// Possible values include: 'pages', 'sentences' |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "textSplitMode")] |
| 60 | 86 | | public TextSplitMode? TextSplitMode { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets or sets the desired maximum page length. Default is 10000. |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "maximumPageLength")] |
| 50 | 92 | | public int? MaximumPageLength { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Validate the object. |
| | 96 | | /// </summary> |
| | 97 | | /// <exception cref="Rest.ValidationException"> |
| | 98 | | /// Thrown if validation fails |
| | 99 | | /// </exception> |
| | 100 | | public override void Validate() |
| | 101 | | { |
| 10 | 102 | | base.Validate(); |
| 10 | 103 | | } |
| | 104 | | } |
| | 105 | | } |