Skip to content

Commit b694151

Browse files
committed
.NET SDK Resource Provider:'Billing'
REST Spec PR 'Azure/azure-rest-api-specs#5475' REST Spec PR Author 'msft-adrianma' REST Spec PR Last commit
1 parent 20e1b9f commit b694151

6 files changed

+8
-166
lines changed

src/SDKs/Billing/Management.Billing/Generated/IInvoiceSectionsByBillingAccountNameOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public partial interface IInvoiceSectionsByBillingAccountNameOperations
4747
/// <exception cref="Microsoft.Rest.ValidationException">
4848
/// Thrown when a required parameter is null
4949
/// </exception>
50-
Task<AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsByBillingAccountNameListHeaders>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
50+
Task<AzureOperationResponse<InvoiceSectionListResult>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
5151
}
5252
}

src/SDKs/Billing/Management.Billing/Generated/IInvoiceSectionsWithCreateSubscriptionPermissionOperations.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ public partial interface IInvoiceSectionsWithCreateSubscriptionPermissionOperati
4848
/// <exception cref="Microsoft.Rest.ValidationException">
4949
/// Thrown when a required parameter is null
5050
/// </exception>
51-
Task<AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsWithCreateSubscriptionPermissionListHeaders>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
51+
Task<AzureOperationResponse<InvoiceSectionListResult>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
5252
}
5353
}

src/SDKs/Billing/Management.Billing/Generated/InvoiceSectionsByBillingAccountNameOperations.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal InvoiceSectionsByBillingAccountNameOperations(BillingManagementClient c
8080
/// <return>
8181
/// A response object containing the response body and response headers.
8282
/// </return>
83-
public async Task<AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsByBillingAccountNameListHeaders>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
83+
public async Task<AzureOperationResponse<InvoiceSectionListResult>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
8484
{
8585
if (Client.ApiVersion == null)
8686
{
@@ -173,7 +173,7 @@ internal InvoiceSectionsByBillingAccountNameOperations(BillingManagementClient c
173173
HttpStatusCode _statusCode = _httpResponse.StatusCode;
174174
cancellationToken.ThrowIfCancellationRequested();
175175
string _responseContent = null;
176-
if ((int)_statusCode != 200 && (int)_statusCode != 202)
176+
if ((int)_statusCode != 200)
177177
{
178178
var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
179179
try
@@ -203,7 +203,7 @@ internal InvoiceSectionsByBillingAccountNameOperations(BillingManagementClient c
203203
throw ex;
204204
}
205205
// Create Result
206-
var _result = new AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsByBillingAccountNameListHeaders>();
206+
var _result = new AzureOperationResponse<InvoiceSectionListResult>();
207207
_result.Request = _httpRequest;
208208
_result.Response = _httpResponse;
209209
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -228,19 +228,6 @@ internal InvoiceSectionsByBillingAccountNameOperations(BillingManagementClient c
228228
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
229229
}
230230
}
231-
try
232-
{
233-
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<InvoiceSectionsByBillingAccountNameListHeaders>(JsonSerializer.Create(Client.DeserializationSettings));
234-
}
235-
catch (JsonException ex)
236-
{
237-
_httpRequest.Dispose();
238-
if (_httpResponse != null)
239-
{
240-
_httpResponse.Dispose();
241-
}
242-
throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
243-
}
244231
if (_shouldTrace)
245232
{
246233
ServiceClientTracing.Exit(_invocationId, _result);

src/SDKs/Billing/Management.Billing/Generated/InvoiceSectionsWithCreateSubscriptionPermissionOperations.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal InvoiceSectionsWithCreateSubscriptionPermissionOperations(BillingManage
8080
/// <return>
8181
/// A response object containing the response body and response headers.
8282
/// </return>
83-
public async Task<AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsWithCreateSubscriptionPermissionListHeaders>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
83+
public async Task<AzureOperationResponse<InvoiceSectionListResult>> ListWithHttpMessagesAsync(string billingAccountName, string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
8484
{
8585
if (Client.ApiVersion == null)
8686
{
@@ -173,7 +173,7 @@ internal InvoiceSectionsWithCreateSubscriptionPermissionOperations(BillingManage
173173
HttpStatusCode _statusCode = _httpResponse.StatusCode;
174174
cancellationToken.ThrowIfCancellationRequested();
175175
string _responseContent = null;
176-
if ((int)_statusCode != 200 && (int)_statusCode != 202)
176+
if ((int)_statusCode != 200)
177177
{
178178
var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
179179
try
@@ -203,7 +203,7 @@ internal InvoiceSectionsWithCreateSubscriptionPermissionOperations(BillingManage
203203
throw ex;
204204
}
205205
// Create Result
206-
var _result = new AzureOperationResponse<InvoiceSectionListResult,InvoiceSectionsWithCreateSubscriptionPermissionListHeaders>();
206+
var _result = new AzureOperationResponse<InvoiceSectionListResult>();
207207
_result.Request = _httpRequest;
208208
_result.Response = _httpResponse;
209209
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -228,19 +228,6 @@ internal InvoiceSectionsWithCreateSubscriptionPermissionOperations(BillingManage
228228
throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
229229
}
230230
}
231-
try
232-
{
233-
_result.Headers = _httpResponse.GetHeadersAsJson().ToObject<InvoiceSectionsWithCreateSubscriptionPermissionListHeaders>(JsonSerializer.Create(Client.DeserializationSettings));
234-
}
235-
catch (JsonException ex)
236-
{
237-
_httpRequest.Dispose();
238-
if (_httpResponse != null)
239-
{
240-
_httpResponse.Dispose();
241-
}
242-
throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
243-
}
244231
if (_shouldTrace)
245232
{
246233
ServiceClientTracing.Exit(_invocationId, _result);

src/SDKs/Billing/Management.Billing/Generated/Models/InvoiceSectionsByBillingAccountNameListHeaders.cs

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/SDKs/Billing/Management.Billing/Generated/Models/InvoiceSectionsWithCreateSubscriptionPermissionListHeaders.cs

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)