Skip to content

Commit 22cbbd1

Browse files
Migrate Search SDK from autorest.csharp to autorest.powershell (#22880)
Co-authored-by: Yabo Hu <[email protected]>
1 parent 8560100 commit 22cbbd1

File tree

103 files changed

+14137
-14818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+14137
-14818
lines changed

src/Search/Search.Management.Sdk/Generated/AdminKeysOperations.cs

Lines changed: 155 additions & 137 deletions
Large diffs are not rendered by default.
Lines changed: 93 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,112 @@
1-
// <auto-generated>
21
// 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-
//
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
63
// 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-
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
115
namespace Microsoft.Azure.Management.Search
126
{
13-
using Microsoft.Rest;
147
using Microsoft.Rest.Azure;
158
using Models;
16-
using System.Threading;
17-
using System.Threading.Tasks;
189

1910
/// <summary>
20-
/// Extension methods for AdminKeysOperations.
11+
/// Extension methods for AdminKeysOperations
2112
/// </summary>
2213
public static partial class AdminKeysOperationsExtensions
2314
{
24-
/// <summary>
25-
/// Gets the primary and secondary admin API keys for the specified Azure
26-
/// Cognitive Search 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='searchManagementRequestOptions'>
41-
/// Additional parameters for the operation
42-
/// </param>
43-
public static AdminKeyResult Get(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
44-
{
45-
return operations.GetAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult();
46-
}
15+
/// <summary>
16+
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
17+
/// </summary>
18+
/// <param name='operations'>
19+
/// The operations group for this extension method.
20+
/// </param>
21+
/// <param name='searchManagementRequestOptions'>
22+
///
23+
/// </param>
24+
/// <param name='resourceGroupName'>
25+
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
26+
/// </param>
27+
/// <param name='searchServiceName'>
28+
/// The name of the Azure Cognitive Search service associated with the specified resource group.
29+
/// </param>
30+
public static AdminKeyResult Get(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
31+
{
32+
return ((IAdminKeysOperations)operations).GetAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult();
33+
}
4734

48-
/// <summary>
49-
/// Gets the primary and secondary admin API keys for the specified Azure
50-
/// Cognitive Search service.
51-
/// <see href="https://aka.ms/search-manage" />
52-
/// </summary>
53-
/// <param name='operations'>
54-
/// The operations group for this extension method.
55-
/// </param>
56-
/// <param name='resourceGroupName'>
57-
/// The name of the resource group within the current subscription. You can
58-
/// obtain this value from the Azure Resource Manager API or the portal.
59-
/// </param>
60-
/// <param name='searchServiceName'>
61-
/// The name of the Azure Cognitive Search service associated with the
62-
/// specified resource group.
63-
/// </param>
64-
/// <param name='searchManagementRequestOptions'>
65-
/// Additional parameters for the operation
66-
/// </param>
67-
/// <param name='cancellationToken'>
68-
/// The cancellation token.
69-
/// </param>
70-
public static async Task<AdminKeyResult> GetAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
35+
/// <summary>
36+
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
37+
/// </summary>
38+
/// <param name='operations'>
39+
/// The operations group for this extension method.
40+
/// </param>
41+
/// <param name='searchManagementRequestOptions'>
42+
///
43+
/// </param>
44+
/// <param name='resourceGroupName'>
45+
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
46+
/// </param>
47+
/// <param name='searchServiceName'>
48+
/// The name of the Azure Cognitive Search service associated with the specified resource group.
49+
/// </param>
50+
/// <param name='cancellationToken'>
51+
/// The cancellation token.
52+
/// </param>
53+
public static async System.Threading.Tasks.Task<AdminKeyResult> GetAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
54+
{
55+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
7156
{
72-
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
73-
{
74-
return _result.Body;
75-
}
57+
return _result.Body;
7658
}
59+
}
60+
/// <summary>
61+
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
62+
/// </summary>
63+
/// <param name='operations'>
64+
/// The operations group for this extension method.
65+
/// </param>
66+
/// <param name='searchManagementRequestOptions'>
67+
///
68+
/// </param>
69+
/// <param name='resourceGroupName'>
70+
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
71+
/// </param>
72+
/// <param name='searchServiceName'>
73+
/// The name of the Azure Cognitive Search service associated with the specified resource group.
74+
/// </param>
75+
/// <param name='keyKind'>
76+
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
77+
/// </param>
78+
public static AdminKeyResult Regenerate(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
79+
{
80+
return ((IAdminKeysOperations)operations).RegenerateAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).GetAwaiter().GetResult();
81+
}
7782

78-
/// <summary>
79-
/// Regenerates either the primary or secondary admin API key. You can only
80-
/// regenerate one key at a time.
81-
/// <see href="https://aka.ms/search-manage" />
82-
/// </summary>
83-
/// <param name='operations'>
84-
/// The operations group for this extension method.
85-
/// </param>
86-
/// <param name='resourceGroupName'>
87-
/// The name of the resource group within the current subscription. You can
88-
/// obtain this value from the Azure Resource Manager API or the portal.
89-
/// </param>
90-
/// <param name='searchServiceName'>
91-
/// The name of the Azure Cognitive Search service associated with the
92-
/// specified resource group.
93-
/// </param>
94-
/// <param name='keyKind'>
95-
/// Specifies which key to regenerate. Valid values include 'primary' and
96-
/// 'secondary'. Possible values include: 'Primary', 'Secondary'
97-
/// </param>
98-
/// <param name='searchManagementRequestOptions'>
99-
/// Additional parameters for the operation
100-
/// </param>
101-
public static AdminKeyResult Regenerate(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
83+
/// <summary>
84+
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
85+
/// </summary>
86+
/// <param name='operations'>
87+
/// The operations group for this extension method.
88+
/// </param>
89+
/// <param name='searchManagementRequestOptions'>
90+
///
91+
/// </param>
92+
/// <param name='resourceGroupName'>
93+
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
94+
/// </param>
95+
/// <param name='searchServiceName'>
96+
/// The name of the Azure Cognitive Search service associated with the specified resource group.
97+
/// </param>
98+
/// <param name='keyKind'>
99+
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
100+
/// </param>
101+
/// <param name='cancellationToken'>
102+
/// The cancellation token.
103+
/// </param>
104+
public static async System.Threading.Tasks.Task<AdminKeyResult> RegenerateAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
105+
{
106+
using (var _result = await operations.RegenerateWithHttpMessagesAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
102107
{
103-
return operations.RegenerateAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).GetAwaiter().GetResult();
108+
return _result.Body;
104109
}
105-
106-
/// <summary>
107-
/// Regenerates either the primary or secondary admin API key. You can only
108-
/// regenerate one key at a time.
109-
/// <see href="https://aka.ms/search-manage" />
110-
/// </summary>
111-
/// <param name='operations'>
112-
/// The operations group for this extension method.
113-
/// </param>
114-
/// <param name='resourceGroupName'>
115-
/// The name of the resource group within the current subscription. You can
116-
/// obtain this value from the Azure Resource Manager API or the portal.
117-
/// </param>
118-
/// <param name='searchServiceName'>
119-
/// The name of the Azure Cognitive Search service associated with the
120-
/// specified resource group.
121-
/// </param>
122-
/// <param name='keyKind'>
123-
/// Specifies which key to regenerate. Valid values include 'primary' and
124-
/// 'secondary'. Possible values include: 'Primary', 'Secondary'
125-
/// </param>
126-
/// <param name='searchManagementRequestOptions'>
127-
/// Additional parameters for the operation
128-
/// </param>
129-
/// <param name='cancellationToken'>
130-
/// The cancellation token.
131-
/// </param>
132-
public static async Task<AdminKeyResult> RegenerateAsync(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
133-
{
134-
using (var _result = await operations.RegenerateWithHttpMessagesAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false))
135-
{
136-
return _result.Body;
137-
}
138-
}
139-
110+
}
140111
}
141112
}

0 commit comments

Comments
 (0)