| | 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.Management.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 QueryKeysOperations. |
| | 21 | | /// </summary> |
| | 22 | | public static partial class QueryKeysOperationsExtensions |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Generates a new query key for the specified Search service. You can create |
| | 26 | | /// up to 50 query keys per service. |
| | 27 | | /// <see href="https://aka.ms/search-manage" /> |
| | 28 | | /// </summary> |
| | 29 | | /// <param name='operations'> |
| | 30 | | /// The operations group for this extension method. |
| | 31 | | /// </param> |
| | 32 | | /// <param name='resourceGroupName'> |
| | 33 | | /// The name of the resource group within the current subscription. You can |
| | 34 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 35 | | /// </param> |
| | 36 | | /// <param name='searchServiceName'> |
| | 37 | | /// The name of the Azure Cognitive Search service associated with the |
| | 38 | | /// specified resource group. |
| | 39 | | /// </param> |
| | 40 | | /// <param name='name'> |
| | 41 | | /// The name of the new query API key. |
| | 42 | | /// </param> |
| | 43 | | /// <param name='searchManagementRequestOptions'> |
| | 44 | | /// Additional parameters for the operation |
| | 45 | | /// </param> |
| | 46 | | public static QueryKey Create(this IQueryKeysOperations operations, string resourceGroupName, string searchS |
| | 47 | | { |
| 0 | 48 | | return operations.CreateAsync(resourceGroupName, searchServiceName, name, searchManagementRequestOptions |
| | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Generates a new query key for the specified Search service. You can create |
| | 53 | | /// up to 50 query keys per service. |
| | 54 | | /// <see href="https://aka.ms/search-manage" /> |
| | 55 | | /// </summary> |
| | 56 | | /// <param name='operations'> |
| | 57 | | /// The operations group for this extension method. |
| | 58 | | /// </param> |
| | 59 | | /// <param name='resourceGroupName'> |
| | 60 | | /// The name of the resource group within the current subscription. You can |
| | 61 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 62 | | /// </param> |
| | 63 | | /// <param name='searchServiceName'> |
| | 64 | | /// The name of the Azure Cognitive Search service associated with the |
| | 65 | | /// specified resource group. |
| | 66 | | /// </param> |
| | 67 | | /// <param name='name'> |
| | 68 | | /// The name of the new query API key. |
| | 69 | | /// </param> |
| | 70 | | /// <param name='searchManagementRequestOptions'> |
| | 71 | | /// Additional parameters for the operation |
| | 72 | | /// </param> |
| | 73 | | /// <param name='cancellationToken'> |
| | 74 | | /// The cancellation token. |
| | 75 | | /// </param> |
| | 76 | | public static async Task<QueryKey> CreateAsync(this IQueryKeysOperations operations, string resourceGroupNam |
| | 77 | | { |
| 0 | 78 | | using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, searchServiceName, |
| | 79 | | { |
| 0 | 80 | | return _result.Body; |
| | 81 | | } |
| 0 | 82 | | } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Returns the list of query API keys for the given Azure Cognitive Search |
| | 86 | | /// service. |
| | 87 | | /// <see href="https://aka.ms/search-manage" /> |
| | 88 | | /// </summary> |
| | 89 | | /// <param name='operations'> |
| | 90 | | /// The operations group for this extension method. |
| | 91 | | /// </param> |
| | 92 | | /// <param name='resourceGroupName'> |
| | 93 | | /// The name of the resource group within the current subscription. You can |
| | 94 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 95 | | /// </param> |
| | 96 | | /// <param name='searchServiceName'> |
| | 97 | | /// The name of the Azure Cognitive Search service associated with the |
| | 98 | | /// specified resource group. |
| | 99 | | /// </param> |
| | 100 | | /// <param name='searchManagementRequestOptions'> |
| | 101 | | /// Additional parameters for the operation |
| | 102 | | /// </param> |
| | 103 | | public static IPage<QueryKey> ListBySearchService(this IQueryKeysOperations operations, string resourceGroup |
| | 104 | | { |
| 602 | 105 | | return operations.ListBySearchServiceAsync(resourceGroupName, searchServiceName, searchManagementRequest |
| | 106 | | } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Returns the list of query API keys for the given Azure Cognitive Search |
| | 110 | | /// service. |
| | 111 | | /// <see href="https://aka.ms/search-manage" /> |
| | 112 | | /// </summary> |
| | 113 | | /// <param name='operations'> |
| | 114 | | /// The operations group for this extension method. |
| | 115 | | /// </param> |
| | 116 | | /// <param name='resourceGroupName'> |
| | 117 | | /// The name of the resource group within the current subscription. You can |
| | 118 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 119 | | /// </param> |
| | 120 | | /// <param name='searchServiceName'> |
| | 121 | | /// The name of the Azure Cognitive Search service associated with the |
| | 122 | | /// specified resource group. |
| | 123 | | /// </param> |
| | 124 | | /// <param name='searchManagementRequestOptions'> |
| | 125 | | /// Additional parameters for the operation |
| | 126 | | /// </param> |
| | 127 | | /// <param name='cancellationToken'> |
| | 128 | | /// The cancellation token. |
| | 129 | | /// </param> |
| | 130 | | public static async Task<IPage<QueryKey>> ListBySearchServiceAsync(this IQueryKeysOperations operations, str |
| | 131 | | { |
| 602 | 132 | | using (var _result = await operations.ListBySearchServiceWithHttpMessagesAsync(resourceGroupName, search |
| | 133 | | { |
| 602 | 134 | | return _result.Body; |
| | 135 | | } |
| 602 | 136 | | } |
| | 137 | |
|
| | 138 | | /// <summary> |
| | 139 | | /// Deletes the specified query key. Unlike admin keys, query keys are not |
| | 140 | | /// regenerated. The process for regenerating a query key is to delete and then |
| | 141 | | /// recreate it. |
| | 142 | | /// <see href="https://aka.ms/search-manage" /> |
| | 143 | | /// </summary> |
| | 144 | | /// <param name='operations'> |
| | 145 | | /// The operations group for this extension method. |
| | 146 | | /// </param> |
| | 147 | | /// <param name='resourceGroupName'> |
| | 148 | | /// The name of the resource group within the current subscription. You can |
| | 149 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 150 | | /// </param> |
| | 151 | | /// <param name='searchServiceName'> |
| | 152 | | /// The name of the Azure Cognitive Search service associated with the |
| | 153 | | /// specified resource group. |
| | 154 | | /// </param> |
| | 155 | | /// <param name='key'> |
| | 156 | | /// The query key to be deleted. Query keys are identified by value, not by |
| | 157 | | /// name. |
| | 158 | | /// </param> |
| | 159 | | /// <param name='searchManagementRequestOptions'> |
| | 160 | | /// Additional parameters for the operation |
| | 161 | | /// </param> |
| | 162 | | public static void Delete(this IQueryKeysOperations operations, string resourceGroupName, string searchServi |
| | 163 | | { |
| 0 | 164 | | operations.DeleteAsync(resourceGroupName, searchServiceName, key, searchManagementRequestOptions).GetAwa |
| 0 | 165 | | } |
| | 166 | |
|
| | 167 | | /// <summary> |
| | 168 | | /// Deletes the specified query key. Unlike admin keys, query keys are not |
| | 169 | | /// regenerated. The process for regenerating a query key is to delete and then |
| | 170 | | /// recreate it. |
| | 171 | | /// <see href="https://aka.ms/search-manage" /> |
| | 172 | | /// </summary> |
| | 173 | | /// <param name='operations'> |
| | 174 | | /// The operations group for this extension method. |
| | 175 | | /// </param> |
| | 176 | | /// <param name='resourceGroupName'> |
| | 177 | | /// The name of the resource group within the current subscription. You can |
| | 178 | | /// obtain this value from the Azure Resource Manager API or the portal. |
| | 179 | | /// </param> |
| | 180 | | /// <param name='searchServiceName'> |
| | 181 | | /// The name of the Azure Cognitive Search service associated with the |
| | 182 | | /// specified resource group. |
| | 183 | | /// </param> |
| | 184 | | /// <param name='key'> |
| | 185 | | /// The query key to be deleted. Query keys are identified by value, not by |
| | 186 | | /// name. |
| | 187 | | /// </param> |
| | 188 | | /// <param name='searchManagementRequestOptions'> |
| | 189 | | /// Additional parameters for the operation |
| | 190 | | /// </param> |
| | 191 | | /// <param name='cancellationToken'> |
| | 192 | | /// The cancellation token. |
| | 193 | | /// </param> |
| | 194 | | public static async Task DeleteAsync(this IQueryKeysOperations operations, string resourceGroupName, string |
| | 195 | | { |
| 0 | 196 | | (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, searchServiceName, key, searchManagemen |
| 0 | 197 | | } |
| | 198 | |
|
| | 199 | | /// <summary> |
| | 200 | | /// Returns the list of query API keys for the given Azure Cognitive Search |
| | 201 | | /// service. |
| | 202 | | /// <see href="https://aka.ms/search-manage" /> |
| | 203 | | /// </summary> |
| | 204 | | /// <param name='operations'> |
| | 205 | | /// The operations group for this extension method. |
| | 206 | | /// </param> |
| | 207 | | /// <param name='nextPageLink'> |
| | 208 | | /// The NextLink from the previous successful call to List operation. |
| | 209 | | /// </param> |
| | 210 | | /// <param name='searchManagementRequestOptions'> |
| | 211 | | /// Additional parameters for the operation |
| | 212 | | /// </param> |
| | 213 | | public static IPage<QueryKey> ListBySearchServiceNext(this IQueryKeysOperations operations, string nextPageL |
| | 214 | | { |
| 0 | 215 | | return operations.ListBySearchServiceNextAsync(nextPageLink, searchManagementRequestOptions).GetAwaiter( |
| | 216 | | } |
| | 217 | |
|
| | 218 | | /// <summary> |
| | 219 | | /// Returns the list of query API keys for the given Azure Cognitive Search |
| | 220 | | /// service. |
| | 221 | | /// <see href="https://aka.ms/search-manage" /> |
| | 222 | | /// </summary> |
| | 223 | | /// <param name='operations'> |
| | 224 | | /// The operations group for this extension method. |
| | 225 | | /// </param> |
| | 226 | | /// <param name='nextPageLink'> |
| | 227 | | /// The NextLink from the previous successful call to List operation. |
| | 228 | | /// </param> |
| | 229 | | /// <param name='searchManagementRequestOptions'> |
| | 230 | | /// Additional parameters for the operation |
| | 231 | | /// </param> |
| | 232 | | /// <param name='cancellationToken'> |
| | 233 | | /// The cancellation token. |
| | 234 | | /// </param> |
| | 235 | | public static async Task<IPage<QueryKey>> ListBySearchServiceNextAsync(this IQueryKeysOperations operations, |
| | 236 | | { |
| 0 | 237 | | using (var _result = await operations.ListBySearchServiceNextWithHttpMessagesAsync(nextPageLink, searchM |
| | 238 | | { |
| 0 | 239 | | return _result.Body; |
| | 240 | | } |
| 0 | 241 | | } |
| | 242 | |
|
| | 243 | | } |
| | 244 | | } |