Skip to content

Commit

Permalink
Generated from ba2bfe74bad69d5419a8966d712ebb7fbee44941
Browse files Browse the repository at this point in the history
removed pageable
  • Loading branch information
SDK Automation committed Aug 31, 2019
1 parent 4e12e1c commit 2b236d2
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public partial interface IOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IEnumerable<OperationsDefinition>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<OperationList>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Attestation.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// List of supported operations.
/// </summary>
public partial class OperationList
{
/// <summary>
/// Initializes a new instance of the OperationList class.
/// </summary>
public OperationList()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the OperationList class.
/// </summary>
/// <param name="value">List of supported operations.</param>
public OperationList(IList<OperationsDefinition> value = default(IList<OperationsDefinition>))
{
Value = value;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets list of supported operations.
/// </summary>
[JsonProperty(PropertyName = "value")]
public IList<OperationsDefinition> Value { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal Operations(AttestationManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IEnumerable<OperationsDefinition>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<OperationList>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
Expand Down Expand Up @@ -181,7 +181,7 @@ internal Operations(AttestationManagementClient client)
throw ex;
}
// Create Result
var _result = new AzureOperationResponse<IEnumerable<OperationsDefinition>>();
var _result = new AzureOperationResponse<OperationList>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
Expand All @@ -194,7 +194,7 @@ internal Operations(AttestationManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<OperationsDefinition>>(_responseContent, Client.DeserializationSettings);
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<OperationList>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ namespace Microsoft.Azure.Management.Attestation
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -29,7 +27,7 @@ public static partial class OperationsExtensions
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static IEnumerable<OperationsDefinition> List(this IOperations operations)
public static OperationList List(this IOperations operations)
{
return operations.ListAsync().GetAwaiter().GetResult();
}
Expand All @@ -43,7 +41,7 @@ public static IEnumerable<OperationsDefinition> List(this IOperations operations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<OperationsDefinition>> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<OperationList> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,5 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_AttestationMana
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "[email protected]";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/attestation/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "76c353d92b8037fe1e02c36deeb06d78d284e5d7";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

0 comments on commit 2b236d2

Please sign in to comment.