Skip to content

Commit ed311cd

Browse files
JoyerJinNickcandy
andauthored
[Attestation] Remove Microsoft.Azure.Management.Attestation and add Attestation.Management.Sdk generated by autorest powershell (#26194)
* Attestation SDK generated by autorest powershell * test record file update * Update ChangeLog.md * Revert "test record file update" This reverts commit a03c1ec. * test record file update * Revert "test record file update" This reverts commit 7535220. * Update ChangeLog.md --------- Co-authored-by: NanxiangLiu <[email protected]>
1 parent 6f47aeb commit ed311cd

30 files changed

+4353
-16
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<PsModuleName>Attestation</PsModuleName>
4+
</PropertyGroup>
5+
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
6+
<PropertyGroup>
7+
<TargetFramework>netstandard2.0</TargetFramework>
8+
<AssemblyName>Microsoft.Azure.PowerShell.Attestation.Management.Sdk</AssemblyName>
9+
<RootNamespace>Microsoft.Azure.Management.Attestation</RootNamespace>
10+
<NoWarn>$(NoWarn);CS0108;CS1573</NoWarn>
11+
</PropertyGroup>
12+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
13+
</Project>
Lines changed: 345 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,345 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Attestation
7+
{
8+
using System.Linq;
9+
using Microsoft.Rest;
10+
using Microsoft.Rest.Azure;
11+
using Models;
12+
13+
/// <summary>
14+
/// Various APIs for managing resources in attestation service. This primarily
15+
/// encompasses per-tenant instance management.
16+
/// </summary>
17+
public partial class AttestationManagementClient : Microsoft.Rest.ServiceClient<AttestationManagementClient>, IAttestationManagementClient, IAzureClient
18+
{
19+
/// <summary>
20+
/// The base URI of the service.
21+
/// </summary>
22+
public System.Uri BaseUri { get; set; }
23+
/// <summary>
24+
/// Gets or sets json serialization settings.
25+
/// </summary>
26+
public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; }
27+
/// <summary>
28+
/// Gets or sets json deserialization settings.
29+
/// </summary>
30+
public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; }
31+
/// <summary>
32+
/// Credentials needed for the client to connect to Azure.
33+
/// </summary>
34+
public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; }
35+
36+
/// <summary>
37+
/// The API version to use for this operation.
38+
/// </summary>
39+
public string ApiVersion { get; private set; }
40+
41+
/// <summary>
42+
/// The ID of the target subscription.
43+
/// </summary>
44+
public string SubscriptionId { get; set;}
45+
46+
/// <summary>
47+
/// The preferred language for the response.
48+
/// </summary>
49+
public string AcceptLanguage { get; set;}
50+
51+
/// <summary>
52+
/// The retry timeout in seconds for Long Running Operations. Default
53+
/// /// value is 30.
54+
/// </summary>
55+
public int? LongRunningOperationRetryTimeout { get; set;}
56+
57+
/// <summary>
58+
/// Whether a unique x-ms-client-request-id should be generated. When
59+
/// /// set to true a unique x-ms-client-request-id value is generated and
60+
/// /// included in each request. Default is true.
61+
/// </summary>
62+
public bool? GenerateClientRequestId { get; set;}
63+
64+
/// <summary>
65+
/// Gets the IOperations
66+
/// </summary>
67+
public virtual IOperations Operations { get; private set; }
68+
/// <summary>
69+
/// Gets the IAttestationProvidersOperations
70+
/// </summary>
71+
public virtual IAttestationProvidersOperations AttestationProviders { get; private set; }
72+
/// <summary>
73+
/// Initializes a new instance of the AttestationManagementClient class.
74+
/// </summary>
75+
/// <param name='httpClient'>
76+
/// HttpClient to be used
77+
/// </param>
78+
/// <param name='disposeHttpClient'>
79+
/// True: will dispose the provided httpClient on calling AttestationManagementClient.Dispose(). False: will not dispose provided httpClient</param>
80+
protected AttestationManagementClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
81+
{
82+
this.Initialize();
83+
}
84+
/// <summary>
85+
/// Initializes a new instance of the AttestationManagementClient class.
86+
/// </summary>
87+
/// <param name='handlers'>
88+
/// Optional. The delegating handlers to add to the http client pipeline.
89+
/// </param>
90+
protected AttestationManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
91+
{
92+
this.Initialize();
93+
}
94+
/// <summary>
95+
/// Initializes a new instance of the AttestationManagementClient class.
96+
/// </summary>
97+
/// <param name='rootHandler'>
98+
/// Optional. The http client handler used to handle http transport.
99+
/// </param>
100+
/// <param name='handlers'>
101+
/// Optional. The delegating handlers to add to the http client pipeline.
102+
/// </param>
103+
protected AttestationManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
104+
{
105+
this.Initialize();
106+
}
107+
/// <summary>
108+
/// Initializes a new instance of the AttestationManagementClient class.
109+
/// </summary>
110+
/// <param name='baseUri'>
111+
/// Optional. The base URI of the service.
112+
/// </param>
113+
/// <param name='handlers'>
114+
/// Optional. The delegating handlers to add to the http client pipeline.
115+
/// </param>
116+
/// <exception cref="System.ArgumentNullException">
117+
/// Thrown when a required parameter is null
118+
/// </exception>
119+
protected AttestationManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
120+
{
121+
if (baseUri == null)
122+
{
123+
throw new System.ArgumentNullException("baseUri");
124+
}
125+
this.BaseUri = baseUri;
126+
}
127+
/// <summary>
128+
/// Initializes a new instance of the AttestationManagementClient class.
129+
/// </summary>
130+
/// <param name='baseUri'>
131+
/// Optional. The base URI of the service.
132+
/// </param>
133+
/// <param name='rootHandler'>
134+
/// Optional. The http client handler used to handle http transport.
135+
/// </param>
136+
/// <param name='handlers'>
137+
/// Optional. The delegating handlers to add to the http client pipeline.
138+
/// </param>
139+
/// <exception cref="System.ArgumentNullException">
140+
/// Thrown when a required parameter is null
141+
/// </exception>
142+
protected AttestationManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
143+
{
144+
if (baseUri == null)
145+
{
146+
throw new System.ArgumentNullException("baseUri");
147+
}
148+
149+
this.BaseUri = baseUri;
150+
}
151+
/// <summary>
152+
/// Initializes a new instance of the AttestationManagementClient class.
153+
/// </summary>
154+
/// <param name='credentials'>
155+
/// Required. Credentials needed for the client to connect to Azure.
156+
/// </param>
157+
/// <param name='handlers'>
158+
/// Optional. The delegating handlers to add to the http client pipeline.
159+
/// </param>
160+
/// <exception cref="System.ArgumentNullException">
161+
/// Thrown when a required parameter is null
162+
/// </exception>
163+
public AttestationManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
164+
{
165+
if (credentials == null)
166+
{
167+
throw new System.ArgumentNullException("credentials");
168+
}
169+
this.Credentials = credentials;
170+
if (this.Credentials != null)
171+
{
172+
this.Credentials.InitializeServiceClient(this);
173+
}
174+
175+
}
176+
/// <summary>
177+
/// Initializes a new instance of the AttestationManagementClient class.
178+
/// </summary>
179+
/// <param name="credentials">
180+
/// Required. Credentials needed for the client to connect to Azure.
181+
/// </param>
182+
/// <param name='httpClient'>
183+
/// HttpClient to be used
184+
/// </param>
185+
/// <param name='disposeHttpClient'>
186+
/// True: will dispose the provided httpClient on calling AttestationManagementClient.Dispose(). False: will not dispose provided httpClient</param>
187+
/// <exception cref="System.ArgumentNullException">
188+
/// Thrown when a required parameter is null
189+
/// </exception>
190+
public AttestationManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
191+
{
192+
if (credentials == null)
193+
{
194+
throw new System.ArgumentNullException("credentials");
195+
}
196+
this.Credentials = credentials;
197+
if (this.Credentials != null)
198+
{
199+
this.Credentials.InitializeServiceClient(this);
200+
}
201+
202+
}
203+
/// <summary>
204+
/// Initializes a new instance of the AttestationManagementClient class.
205+
/// </summary>
206+
/// <param name="credentials">
207+
/// Required. Credentials needed for the client to connect to Azure.
208+
/// </param>
209+
/// <param name='rootHandler'>
210+
/// Optional. The http client handler used to handle http transport.
211+
/// </param>
212+
/// <param name='handlers'>
213+
/// Optional. The delegating handlers to add to the http client pipeline.
214+
/// </param>
215+
/// <exception cref="System.ArgumentNullException">
216+
/// Thrown when a required parameter is null
217+
/// </exception>
218+
public AttestationManagementClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
219+
{
220+
if (credentials == null)
221+
{
222+
throw new System.ArgumentNullException("credentials");
223+
}
224+
this.Credentials = credentials;
225+
if (this.Credentials != null)
226+
{
227+
this.Credentials.InitializeServiceClient(this);
228+
}
229+
230+
}
231+
/// <summary>
232+
/// Initializes a new instance of the AttestationManagementClient class.
233+
/// </summary>
234+
/// <param name='baseUri'>
235+
/// Optional. The base URI of the service.
236+
/// </param>
237+
/// <param name="credentials">
238+
/// Required. Credentials needed for the client to connect to Azure.
239+
/// </param>
240+
/// <param name='handlers'>
241+
/// Optional. The delegating handlers to add to the http client pipeline.
242+
/// </param>
243+
/// <exception cref="System.ArgumentNullException">
244+
/// Thrown when a required parameter is null
245+
/// </exception>
246+
public AttestationManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
247+
{
248+
if (baseUri == null)
249+
{
250+
throw new System.ArgumentNullException("baseUri");
251+
}
252+
if (credentials == null)
253+
{
254+
throw new System.ArgumentNullException("credentials");
255+
}
256+
this.BaseUri = baseUri;
257+
this.Credentials = credentials;
258+
if (this.Credentials != null)
259+
{
260+
this.Credentials.InitializeServiceClient(this);
261+
}
262+
263+
}
264+
/// <summary>
265+
/// Initializes a new instance of the AttestationManagementClient class.
266+
/// </summary>
267+
/// <param name='baseUri'>
268+
/// Optional. The base URI of the service.
269+
/// </param>
270+
/// <param name="credentials">
271+
/// Required. Credentials needed for the client to connect to Azure.
272+
/// </param>
273+
/// <param name='rootHandler'>
274+
/// Optional. The http client handler used to handle http transport.
275+
/// </param>
276+
/// <exception cref="System.ArgumentNullException">
277+
/// Thrown when a required parameter is null
278+
/// </exception>
279+
public AttestationManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
280+
{
281+
if (baseUri == null)
282+
{
283+
throw new System.ArgumentNullException("baseUri");
284+
}
285+
if (credentials == null)
286+
{
287+
throw new System.ArgumentNullException("credentials");
288+
}
289+
this.BaseUri = baseUri;
290+
this.Credentials = credentials;
291+
if (this.Credentials != null)
292+
{
293+
this.Credentials.InitializeServiceClient(this);
294+
}
295+
296+
}
297+
/// <summary>
298+
/// An optional partial-method to perform custom initialization.
299+
/// </summary>
300+
partial void CustomInitialize();
301+
302+
/// <summary>
303+
/// Initializes client properties.
304+
/// </summary>
305+
private void Initialize()
306+
{
307+
this.Operations = new Operations(this);
308+
this.AttestationProviders = new AttestationProvidersOperations(this);
309+
this.BaseUri = new System.Uri("https://management.azure.com");
310+
this.ApiVersion = "2018-09-01-preview";
311+
this.AcceptLanguage = "en-US";
312+
this.LongRunningOperationRetryTimeout = 30;
313+
this.GenerateClientRequestId = true;
314+
SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings
315+
{
316+
Formatting = Newtonsoft.Json.Formatting.Indented,
317+
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
318+
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
319+
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
320+
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
321+
ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
322+
Converters = new System.Collections.Generic.List<Newtonsoft.Json.JsonConverter>
323+
{
324+
new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
325+
}
326+
};
327+
SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
328+
DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
329+
{
330+
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
331+
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
332+
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
333+
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
334+
ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
335+
Converters = new System.Collections.Generic.List<Newtonsoft.Json.JsonConverter>
336+
{
337+
new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
338+
}
339+
};
340+
CustomInitialize();
341+
DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter());
342+
DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());
343+
}
344+
}
345+
}

0 commit comments

Comments
 (0)