Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] Microsoft.Azure.Management.Attestation #489

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IEnumerable<AttestationProvider>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<AttestationProviderListResult>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
Expand Down Expand Up @@ -848,7 +848,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
throw ex;
}
// Create Result
var _result = new AzureOperationResponse<IEnumerable<AttestationProvider>>();
var _result = new AzureOperationResponse<AttestationProviderListResult>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
Expand All @@ -861,7 +861,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<AttestationProvider>>(_responseContent, Client.DeserializationSettings);
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<AttestationProviderListResult>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
Expand Down Expand Up @@ -907,7 +907,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IEnumerable<AttestationProvider>>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<AttestationProviderListResult>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
Expand Down Expand Up @@ -1053,7 +1053,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
throw ex;
}
// Create Result
var _result = new AzureOperationResponse<IEnumerable<AttestationProvider>>();
var _result = new AzureOperationResponse<AttestationProviderListResult>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
Expand All @@ -1066,7 +1066,7 @@ internal AttestationProvidersOperations(AttestationManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<Page1<AttestationProvider>>(_responseContent, Client.DeserializationSettings);
_result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<AttestationProviderListResult>(_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 Down Expand Up @@ -152,7 +150,7 @@ public static void Delete(this IAttestationProvidersOperations operations, strin
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static IEnumerable<AttestationProvider> List(this IAttestationProvidersOperations operations)
public static AttestationProviderListResult List(this IAttestationProvidersOperations operations)
{
return operations.ListAsync().GetAwaiter().GetResult();
}
Expand All @@ -166,7 +164,7 @@ public static IEnumerable<AttestationProvider> List(this IAttestationProvidersOp
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<AttestationProvider>> ListAsync(this IAttestationProvidersOperations operations, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<AttestationProviderListResult> ListAsync(this IAttestationProvidersOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -183,7 +181,7 @@ public static IEnumerable<AttestationProvider> List(this IAttestationProvidersOp
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
public static IEnumerable<AttestationProvider> ListByResourceGroup(this IAttestationProvidersOperations operations, string resourceGroupName)
public static AttestationProviderListResult ListByResourceGroup(this IAttestationProvidersOperations operations, string resourceGroupName)
{
return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
}
Expand All @@ -200,7 +198,7 @@ public static IEnumerable<AttestationProvider> ListByResourceGroup(this IAttesta
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<AttestationProvider>> ListByResourceGroupAsync(this IAttestationProvidersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<AttestationProviderListResult> ListByResourceGroupAsync(this IAttestationProvidersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public partial interface IAttestationProvidersOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IEnumerable<AttestationProvider>>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<AttestationProviderListResult>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Returns attestation providers list in a resource group.
/// </summary>
Expand All @@ -138,6 +138,6 @@ public partial interface IAttestationProvidersOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IEnumerable<AttestationProvider>>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<AttestationProviderListResult>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
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,55 @@
// <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>
/// Attestation Providers List.
/// </summary>
public partial class AttestationProviderListResult
{
/// <summary>
/// Initializes a new instance of the AttestationProviderListResult
/// class.
/// </summary>
public AttestationProviderListResult()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the AttestationProviderListResult
/// class.
/// </summary>
/// <param name="value">Attestation Provider array.</param>
public AttestationProviderListResult(IList<AttestationProvider> value = default(IList<AttestationProvider>))
{
Value = value;
CustomInit();
}

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

/// <summary>
/// Gets or sets attestation Provider array.
/// </summary>
[JsonProperty(PropertyName = "value")]
public IList<AttestationProvider> Value { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ public AttestationServiceCreationParams()
/// class.
/// </summary>
/// <param name="attestationPolicy">Name of attestation policy.</param>
public AttestationServiceCreationParams(string attestationPolicy = default(string))
/// <param name="policySigningCertificates">JSON Web Key Set defining a
/// set of X.509 Certificates that will represent the parent
/// certificate for the signing certificate used for policy
/// operations</param>
public AttestationServiceCreationParams(string attestationPolicy = default(string), JSONWebKeySet policySigningCertificates = default(JSONWebKeySet))
{
AttestationPolicy = attestationPolicy;
PolicySigningCertificates = policySigningCertificates;
CustomInit();
}

Expand All @@ -49,5 +54,13 @@ public AttestationServiceCreationParams()
[JsonProperty(PropertyName = "attestationPolicy")]
public string AttestationPolicy { get; set; }

/// <summary>
/// Gets or sets JSON Web Key Set defining a set of X.509 Certificates
/// that will represent the parent certificate for the signing
/// certificate used for policy operations
/// </summary>
[JsonProperty(PropertyName = "policySigningCertificates")]
public JSONWebKeySet PolicySigningCertificates { get; set; }

}
}
Loading