| | 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 |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Azure; |
| | 15 | | using Models; |
| | 16 | | using System.Threading; |
| | 17 | | using System.Threading.Tasks; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Extension methods for SkillsetsOperations. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class SkillsetsOperationsExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Creates a new skillset in a search service or updates the skillset if it |
| | 26 | | /// already exists. |
| | 27 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/update-skillset" /> |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='operations'> |
| | 30 | | /// The operations group for this extension method. |
| | 31 | | /// </param> |
| | 32 | | /// <param name='skillsetName'> |
| | 33 | | /// The name of the skillset to create or update. |
| | 34 | | /// </param> |
| | 35 | | /// <param name='skillset'> |
| | 36 | | /// The skillset containing one or more skills to create or update in a search |
| | 37 | | /// service. |
| | 38 | | /// </param> |
| | 39 | | /// <param name='searchRequestOptions'> |
| | 40 | | /// Additional parameters for the operation |
| | 41 | | /// </param> |
| | 42 | | public static Skillset CreateOrUpdate(this ISkillsetsOperations operations, string skillsetName, Skillset sk |
| | 43 | | { |
| 0 | 44 | | return operations.CreateOrUpdateAsync(skillsetName, skillset, searchRequestOptions).GetAwaiter().GetResu |
| | 45 | | } |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Creates a new skillset in a search service or updates the skillset if it |
| | 49 | | /// already exists. |
| | 50 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/update-skillset" /> |
| | 51 | | /// </summary> |
| | 52 | | /// <param name='operations'> |
| | 53 | | /// The operations group for this extension method. |
| | 54 | | /// </param> |
| | 55 | | /// <param name='skillsetName'> |
| | 56 | | /// The name of the skillset to create or update. |
| | 57 | | /// </param> |
| | 58 | | /// <param name='skillset'> |
| | 59 | | /// The skillset containing one or more skills to create or update in a search |
| | 60 | | /// service. |
| | 61 | | /// </param> |
| | 62 | | /// <param name='searchRequestOptions'> |
| | 63 | | /// Additional parameters for the operation |
| | 64 | | /// </param> |
| | 65 | | /// <param name='cancellationToken'> |
| | 66 | | /// The cancellation token. |
| | 67 | | /// </param> |
| | 68 | | public static async Task<Skillset> CreateOrUpdateAsync(this ISkillsetsOperations operations, string skillset |
| | 69 | | { |
| 0 | 70 | | using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(skillsetName, skillset, search |
| | 71 | | { |
| 0 | 72 | | return _result.Body; |
| | 73 | | } |
| 0 | 74 | | } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Deletes a skillset in a search service. |
| | 78 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/delete-skillset" /> |
| | 79 | | /// </summary> |
| | 80 | | /// <param name='operations'> |
| | 81 | | /// The operations group for this extension method. |
| | 82 | | /// </param> |
| | 83 | | /// <param name='skillsetName'> |
| | 84 | | /// The name of the skillset to delete. |
| | 85 | | /// </param> |
| | 86 | | /// <param name='searchRequestOptions'> |
| | 87 | | /// Additional parameters for the operation |
| | 88 | | /// </param> |
| | 89 | | public static void Delete(this ISkillsetsOperations operations, string skillsetName, SearchRequestOptions se |
| | 90 | | { |
| 70 | 91 | | operations.DeleteAsync(skillsetName, searchRequestOptions).GetAwaiter().GetResult(); |
| 70 | 92 | | } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Deletes a skillset in a search service. |
| | 96 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/delete-skillset" /> |
| | 97 | | /// </summary> |
| | 98 | | /// <param name='operations'> |
| | 99 | | /// The operations group for this extension method. |
| | 100 | | /// </param> |
| | 101 | | /// <param name='skillsetName'> |
| | 102 | | /// The name of the skillset to delete. |
| | 103 | | /// </param> |
| | 104 | | /// <param name='searchRequestOptions'> |
| | 105 | | /// Additional parameters for the operation |
| | 106 | | /// </param> |
| | 107 | | /// <param name='cancellationToken'> |
| | 108 | | /// The cancellation token. |
| | 109 | | /// </param> |
| | 110 | | public static async Task DeleteAsync(this ISkillsetsOperations operations, string skillsetName, SearchReques |
| | 111 | | { |
| 70 | 112 | | (await operations.DeleteWithHttpMessagesAsync(skillsetName, searchRequestOptions, null, cancellationToke |
| 70 | 113 | | } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// Retrieves a skillset in a search service. |
| | 117 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/get-skillset" /> |
| | 118 | | /// </summary> |
| | 119 | | /// <param name='operations'> |
| | 120 | | /// The operations group for this extension method. |
| | 121 | | /// </param> |
| | 122 | | /// <param name='skillsetName'> |
| | 123 | | /// The name of the skillset to retrieve. |
| | 124 | | /// </param> |
| | 125 | | /// <param name='searchRequestOptions'> |
| | 126 | | /// Additional parameters for the operation |
| | 127 | | /// </param> |
| | 128 | | public static Skillset Get(this ISkillsetsOperations operations, string skillsetName, SearchRequestOptions s |
| | 129 | | { |
| 6 | 130 | | return operations.GetAsync(skillsetName, searchRequestOptions).GetAwaiter().GetResult(); |
| | 131 | | } |
| | 132 | |
|
| | 133 | | /// <summary> |
| | 134 | | /// Retrieves a skillset in a search service. |
| | 135 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/get-skillset" /> |
| | 136 | | /// </summary> |
| | 137 | | /// <param name='operations'> |
| | 138 | | /// The operations group for this extension method. |
| | 139 | | /// </param> |
| | 140 | | /// <param name='skillsetName'> |
| | 141 | | /// The name of the skillset to retrieve. |
| | 142 | | /// </param> |
| | 143 | | /// <param name='searchRequestOptions'> |
| | 144 | | /// Additional parameters for the operation |
| | 145 | | /// </param> |
| | 146 | | /// <param name='cancellationToken'> |
| | 147 | | /// The cancellation token. |
| | 148 | | /// </param> |
| | 149 | | public static async Task<Skillset> GetAsync(this ISkillsetsOperations operations, string skillsetName, Searc |
| | 150 | | { |
| 6 | 151 | | using (var _result = await operations.GetWithHttpMessagesAsync(skillsetName, searchRequestOptions, null, |
| | 152 | | { |
| 4 | 153 | | return _result.Body; |
| | 154 | | } |
| 4 | 155 | | } |
| | 156 | |
|
| | 157 | | /// <summary> |
| | 158 | | /// List all skillsets in a search service. |
| | 159 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/list-skillset" /> |
| | 160 | | /// </summary> |
| | 161 | | /// <param name='operations'> |
| | 162 | | /// The operations group for this extension method. |
| | 163 | | /// </param> |
| | 164 | | /// <param name='searchRequestOptions'> |
| | 165 | | /// Additional parameters for the operation |
| | 166 | | /// </param> |
| | 167 | | public static SkillsetListResult List(this ISkillsetsOperations operations, SearchRequestOptions searchReque |
| | 168 | | { |
| 0 | 169 | | return operations.ListAsync(searchRequestOptions).GetAwaiter().GetResult(); |
| | 170 | | } |
| | 171 | |
|
| | 172 | | /// <summary> |
| | 173 | | /// List all skillsets in a search service. |
| | 174 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/list-skillset" /> |
| | 175 | | /// </summary> |
| | 176 | | /// <param name='operations'> |
| | 177 | | /// The operations group for this extension method. |
| | 178 | | /// </param> |
| | 179 | | /// <param name='searchRequestOptions'> |
| | 180 | | /// Additional parameters for the operation |
| | 181 | | /// </param> |
| | 182 | | /// <param name='cancellationToken'> |
| | 183 | | /// The cancellation token. |
| | 184 | | /// </param> |
| | 185 | | public static async Task<SkillsetListResult> ListAsync(this ISkillsetsOperations operations, SearchRequestOp |
| | 186 | | { |
| 0 | 187 | | using (var _result = await operations.ListWithHttpMessagesAsync(searchRequestOptions, null, cancellation |
| | 188 | | { |
| 0 | 189 | | return _result.Body; |
| | 190 | | } |
| 0 | 191 | | } |
| | 192 | |
|
| | 193 | | /// <summary> |
| | 194 | | /// Creates a new skillset in a search service. |
| | 195 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/create-skillset" /> |
| | 196 | | /// </summary> |
| | 197 | | /// <param name='operations'> |
| | 198 | | /// The operations group for this extension method. |
| | 199 | | /// </param> |
| | 200 | | /// <param name='skillset'> |
| | 201 | | /// The skillset containing one or more skills to create in a search service. |
| | 202 | | /// </param> |
| | 203 | | /// <param name='searchRequestOptions'> |
| | 204 | | /// Additional parameters for the operation |
| | 205 | | /// </param> |
| | 206 | | public static Skillset Create(this ISkillsetsOperations operations, Skillset skillset, SearchRequestOptions |
| | 207 | | { |
| 72 | 208 | | return operations.CreateAsync(skillset, searchRequestOptions).GetAwaiter().GetResult(); |
| | 209 | | } |
| | 210 | |
|
| | 211 | | /// <summary> |
| | 212 | | /// Creates a new skillset in a search service. |
| | 213 | | /// <see href="https://docs.microsoft.com/rest/api/searchservice/create-skillset" /> |
| | 214 | | /// </summary> |
| | 215 | | /// <param name='operations'> |
| | 216 | | /// The operations group for this extension method. |
| | 217 | | /// </param> |
| | 218 | | /// <param name='skillset'> |
| | 219 | | /// The skillset containing one or more skills to create in a search service. |
| | 220 | | /// </param> |
| | 221 | | /// <param name='searchRequestOptions'> |
| | 222 | | /// Additional parameters for the operation |
| | 223 | | /// </param> |
| | 224 | | /// <param name='cancellationToken'> |
| | 225 | | /// The cancellation token. |
| | 226 | | /// </param> |
| | 227 | | public static async Task<Skillset> CreateAsync(this ISkillsetsOperations operations, Skillset skillset, Sear |
| | 228 | | { |
| 72 | 229 | | using (var _result = await operations.CreateWithHttpMessagesAsync(skillset, searchRequestOptions, null, |
| | 230 | | { |
| 72 | 231 | | return _result.Body; |
| | 232 | | } |
| 72 | 233 | | } |
| | 234 | |
|
| | 235 | | } |
| | 236 | | } |