Skip to content
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
2 changes: 1 addition & 1 deletion src/SDKs/PolicyInsights/Management/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>PolicyInsights_2018-07-01-preview;PolicyInsights_2018-04-04;</AzureApiTag>
<AzureApiTag>PolicyInsights_2018-07-01-preview;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public partial interface IPolicyInsightsClient : System.IDisposable
/// </summary>
ServiceClientCredentials Credentials { get; }

/// <summary>
/// Client Api Version.
/// </summary>
string ApiVersion { get; }

/// <summary>
/// The preferred language for the response.
/// </summary>
Expand Down

Large diffs are not rendered by default.

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.PolicyInsights.Models
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;

/// <summary>
/// Defines a page in Azure responses.
/// </summary>
/// <typeparam name="T">Type of the page content items</typeparam>
[JsonObject]
public class Page1<T> : IPage<T>
{
/// <summary>
/// Gets the link to the next page.
/// </summary>
[JsonProperty("@odata.nextLink")]
public string NextPageLink { get; private set; }

[JsonProperty("value")]
private IList<T> Items{ get; set; }

/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>A an enumerator that can be used to iterate through the collection.</returns>
public IEnumerator<T> GetEnumerator()
{
return Items == null ? System.Linq.Enumerable.Empty<T>().GetEnumerator() : Items.GetEnumerator();
}

/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>A an enumerator that can be used to iterate through the collection.</returns>
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ public PolicyStatesQueryResults()
/// <param name="odatacount">OData entity count; represents the number
/// of policy state records returned.</param>
/// <param name="value">Query results.</param>
public PolicyStatesQueryResults(string odatacontext = default(string), int? odatacount = default(int?), IList<PolicyState> value = default(IList<PolicyState>))
/// <param name="odatanextLink">Odata next link, used to get the next
/// set of records.</param>
public PolicyStatesQueryResults(string odatacontext = default(string), int? odatacount = default(int?), IList<PolicyState> value = default(IList<PolicyState>), string odatanextLink = default(string))
{
Odatacontext = odatacontext;
Odatacount = odatacount;
Value = value;
OdatanextLink = odatanextLink;
CustomInit();
}

Expand Down Expand Up @@ -70,6 +73,12 @@ public PolicyStatesQueryResults()
[JsonProperty(PropertyName = "value")]
public IList<PolicyState> Value { get; set; }

/// <summary>
/// Gets or sets odata next link, used to get the next set of records.
/// </summary>
[JsonProperty(PropertyName = "@odata.nextLink")]
public string OdatanextLink { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,38 @@ internal Operations(PolicyInsightsClient client)
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="ValidationException">
/// Thrown when a required parameter is null
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<OperationsListResults>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
string apiVersion = "2018-07-01-preview";
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.PolicyInsights/operations").ToString();
List<string> _queryParameters = new List<string>();
if (apiVersion != null)
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
if (_queryParameters.Count > 0)
{
Expand Down
Loading