Skip to content

Commit

Permalink
.NET SDK Resource Provider:'PolicyInsights'
Browse files Browse the repository at this point in the history
REST Spec PR 'Azure/azure-rest-api-specs#5389'
REST Spec PR Author 'sarangan12'
REST Spec PR Last commit
  • Loading branch information
adxsdknet committed Mar 14, 2019
1 parent ff8cdb9 commit 49d1872
Show file tree
Hide file tree
Showing 12 changed files with 295 additions and 41 deletions.
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-04-04;PolicyInsights_2018-07-01-preview;</AzureApiTag>
<AzureApiTag>PolicyInsights_2018-07-01-preview;PolicyInsights_2018-04-04;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// <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 Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Evaluation details of policy language expressions.
/// </summary>
public partial class ExpressionEvaluationDetails
{
/// <summary>
/// Initializes a new instance of the ExpressionEvaluationDetails
/// class.
/// </summary>
public ExpressionEvaluationDetails()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ExpressionEvaluationDetails
/// class.
/// </summary>
/// <param name="result">Evaluation result.</param>
/// <param name="expression">Expression evaluated.</param>
/// <param name="path">Property path if the expression is a field or an
/// alias.</param>
/// <param name="expressionValue">Value of the expression.</param>
/// <param name="targetValue">Target value to be compared with the
/// expression value.</param>
/// <param name="operatorProperty">Operator to compare the expression
/// value and the target value.</param>
public ExpressionEvaluationDetails(string result = default(string), string expression = default(string), string path = default(string), string expressionValue = default(string), string targetValue = default(string), string operatorProperty = default(string))
{
Result = result;
Expression = expression;
Path = path;
ExpressionValue = expressionValue;
TargetValue = targetValue;
OperatorProperty = operatorProperty;
CustomInit();
}

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

/// <summary>
/// Gets or sets evaluation result.
/// </summary>
[JsonProperty(PropertyName = "result")]
public string Result { get; set; }

/// <summary>
/// Gets or sets expression evaluated.
/// </summary>
[JsonProperty(PropertyName = "expression")]
public string Expression { get; set; }

/// <summary>
/// Gets or sets property path if the expression is a field or an
/// alias.
/// </summary>
[JsonProperty(PropertyName = "path")]
public string Path { get; set; }

/// <summary>
/// Gets or sets value of the expression.
/// </summary>
[JsonProperty(PropertyName = "expressionValue")]
public string ExpressionValue { get; set; }

/// <summary>
/// Gets or sets target value to be compared with the expression value.
/// </summary>
[JsonProperty(PropertyName = "targetValue")]
public string TargetValue { get; set; }

/// <summary>
/// Gets or sets operator to compare the expression value and the
/// target value.
/// </summary>
[JsonProperty(PropertyName = "operator")]
public string OperatorProperty { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// <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 Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Evaluation details of IfNotExists effect.
/// </summary>
public partial class IfNotExistsEvaluationDetails
{
/// <summary>
/// Initializes a new instance of the IfNotExistsEvaluationDetails
/// class.
/// </summary>
public IfNotExistsEvaluationDetails()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the IfNotExistsEvaluationDetails
/// class.
/// </summary>
/// <param name="resourceId">ID of the last evaluated resource for
/// IfNotExists effect.</param>
/// <param name="totalResources">Total number of resources to which the
/// existence condition is applicable.</param>
public IfNotExistsEvaluationDetails(string resourceId = default(string), int? totalResources = default(int?))
{
ResourceId = resourceId;
TotalResources = totalResources;
CustomInit();
}

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

/// <summary>
/// Gets or sets ID of the last evaluated resource for IfNotExists
/// effect.
/// </summary>
[JsonProperty(PropertyName = "resourceId")]
public string ResourceId { get; set; }

/// <summary>
/// Gets or sets total number of resources to which the existence
/// condition is applicable.
/// </summary>
[JsonProperty(PropertyName = "totalResources")]
public int? TotalResources { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// <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 Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// Policy evaluation details.
/// </summary>
public partial class PolicyEvaluationDetails
{
/// <summary>
/// Initializes a new instance of the PolicyEvaluationDetails class.
/// </summary>
public PolicyEvaluationDetails()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the PolicyEvaluationDetails class.
/// </summary>
/// <param name="evaluatedExpressions">Details of the evaluated
/// expressions.</param>
/// <param name="ifNotExistsDetails">Evaluation details of IfNotExists
/// effect.</param>
public PolicyEvaluationDetails(IList<ExpressionEvaluationDetails> evaluatedExpressions = default(IList<ExpressionEvaluationDetails>), IfNotExistsEvaluationDetails ifNotExistsDetails = default(IfNotExistsEvaluationDetails))
{
EvaluatedExpressions = evaluatedExpressions;
IfNotExistsDetails = ifNotExistsDetails;
CustomInit();
}

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

/// <summary>
/// Gets or sets details of the evaluated expressions.
/// </summary>
[JsonProperty(PropertyName = "evaluatedExpressions")]
public IList<ExpressionEvaluationDetails> EvaluatedExpressions { get; set; }

/// <summary>
/// Gets or sets evaluation details of IfNotExists effect.
/// </summary>
[JsonProperty(PropertyName = "ifNotExistsDetails")]
public IfNotExistsEvaluationDetails IfNotExistsDetails { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public PolicyEvent()
/// category, if the policy assignment is for a policy set.</param>
/// <param name="policySetDefinitionParameters">Policy set definition
/// parameters, if the policy assignment is for a policy set.</param>
/// <param name="managementGroupIds">Comma seperated list of management
/// <param name="managementGroupIds">Comma separated list of management
/// group IDs, which represent the hierarchy of the management groups
/// the resource is under.</param>
/// <param name="policyDefinitionReferenceId">Reference ID for the
Expand Down Expand Up @@ -291,7 +291,7 @@ public PolicyEvent()
public string PolicySetDefinitionParameters { get; set; }

/// <summary>
/// Gets or sets comma seperated list of management group IDs, which
/// Gets or sets comma separated list of management group IDs, which
/// represent the hierarchy of the management groups the resource is
/// under.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ public PolicyState()
/// category, if the policy assignment is for a policy set.</param>
/// <param name="policySetDefinitionParameters">Policy set definition
/// parameters, if the policy assignment is for a policy set.</param>
/// <param name="managementGroupIds">Comma seperated list of management
/// <param name="managementGroupIds">Comma separated list of management
/// group IDs, which represent the hierarchy of the management groups
/// the resource is under.</param>
/// <param name="policyDefinitionReferenceId">Reference ID for the
/// policy definition inside the policy set, if the policy assignment
/// is for a policy set.</param>
public PolicyState(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string odataid = default(string), string odatacontext = default(string), System.DateTime? timestamp = default(System.DateTime?), string resourceId = default(string), string policyAssignmentId = default(string), string policyDefinitionId = default(string), string effectiveParameters = default(string), bool? isCompliant = default(bool?), string subscriptionId = default(string), string resourceType = default(string), string resourceLocation = default(string), string resourceGroup = default(string), string resourceTags = default(string), string policyAssignmentName = default(string), string policyAssignmentOwner = default(string), string policyAssignmentParameters = default(string), string policyAssignmentScope = default(string), string policyDefinitionName = default(string), string policyDefinitionAction = default(string), string policyDefinitionCategory = default(string), string policySetDefinitionId = default(string), string policySetDefinitionName = default(string), string policySetDefinitionOwner = default(string), string policySetDefinitionCategory = default(string), string policySetDefinitionParameters = default(string), string managementGroupIds = default(string), string policyDefinitionReferenceId = default(string))
/// <param name="complianceState">Compliance state of the
/// resource.</param>
/// <param name="policyEvaluationDetails">Policy evaluation
/// details.</param>
public PolicyState(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string odataid = default(string), string odatacontext = default(string), System.DateTime? timestamp = default(System.DateTime?), string resourceId = default(string), string policyAssignmentId = default(string), string policyDefinitionId = default(string), string effectiveParameters = default(string), bool? isCompliant = default(bool?), string subscriptionId = default(string), string resourceType = default(string), string resourceLocation = default(string), string resourceGroup = default(string), string resourceTags = default(string), string policyAssignmentName = default(string), string policyAssignmentOwner = default(string), string policyAssignmentParameters = default(string), string policyAssignmentScope = default(string), string policyDefinitionName = default(string), string policyDefinitionAction = default(string), string policyDefinitionCategory = default(string), string policySetDefinitionId = default(string), string policySetDefinitionName = default(string), string policySetDefinitionOwner = default(string), string policySetDefinitionCategory = default(string), string policySetDefinitionParameters = default(string), string managementGroupIds = default(string), string policyDefinitionReferenceId = default(string), string complianceState = default(string), PolicyEvaluationDetails policyEvaluationDetails = default(PolicyEvaluationDetails))
{
AdditionalProperties = additionalProperties;
Odataid = odataid;
Expand Down Expand Up @@ -110,6 +114,8 @@ public PolicyState()
PolicySetDefinitionParameters = policySetDefinitionParameters;
ManagementGroupIds = managementGroupIds;
PolicyDefinitionReferenceId = policyDefinitionReferenceId;
ComplianceState = complianceState;
PolicyEvaluationDetails = policyEvaluationDetails;
CustomInit();
}

Expand Down Expand Up @@ -284,7 +290,7 @@ public PolicyState()
public string PolicySetDefinitionParameters { get; set; }

/// <summary>
/// Gets or sets comma seperated list of management group IDs, which
/// Gets or sets comma separated list of management group IDs, which
/// represent the hierarchy of the management groups the resource is
/// under.
/// </summary>
Expand All @@ -298,5 +304,17 @@ public PolicyState()
[JsonProperty(PropertyName = "policyDefinitionReferenceId")]
public string PolicyDefinitionReferenceId { get; set; }

/// <summary>
/// Gets or sets compliance state of the resource.
/// </summary>
[JsonProperty(PropertyName = "complianceState")]
public string ComplianceState { get; set; }

/// <summary>
/// Gets or sets policy evaluation details.
/// </summary>
[JsonProperty(PropertyName = "policyEvaluationDetails")]
public PolicyEvaluationDetails PolicyEvaluationDetails { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public QueryOptions()
/// request time.</param>
/// <param name="apply">OData apply expression for
/// aggregations.</param>
public QueryOptions(int? top = default(int?), string filter = default(string), string orderBy = default(string), string select = default(string), System.DateTime? fromProperty = default(System.DateTime?), System.DateTime? to = default(System.DateTime?), string apply = default(string))
/// <param name="expand">The $expand query parameter. For example, to
/// expand policyEvaluationDetails, use
/// $expand=policyEvaluationDetails</param>
public QueryOptions(int? top = default(int?), string filter = default(string), string orderBy = default(string), string select = default(string), System.DateTime? fromProperty = default(System.DateTime?), System.DateTime? to = default(System.DateTime?), string apply = default(string), string expand = default(string))
{
Top = top;
Filter = filter;
Expand All @@ -55,6 +58,7 @@ public QueryOptions()
FromProperty = fromProperty;
To = to;
Apply = apply;
Expand = expand;
CustomInit();
}

Expand Down Expand Up @@ -113,5 +117,12 @@ public QueryOptions()
[Newtonsoft.Json.JsonIgnore]
public string Apply { get; set; }

/// <summary>
/// Gets or sets the $expand query parameter. For example, to expand
/// policyEvaluationDetails, use $expand=policyEvaluationDetails
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public string Expand { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Remediation()
/// <param name="filters">The filters that will be applied to determine
/// which resources to remediate.</param>
/// <param name="deploymentStatus">The deployment status summary for
/// all deplyoments created by the remediation.</param>
/// all deployments created by the remediation.</param>
/// <param name="id">The ID of the remediation.</param>
/// <param name="type">The type of the remediation.</param>
/// <param name="name">The name of the remediation.</param>
Expand Down Expand Up @@ -113,7 +113,7 @@ public Remediation()
public RemediationFilters Filters { get; set; }

/// <summary>
/// Gets or sets the deployment status summary for all deplyoments
/// Gets or sets the deployment status summary for all deployments
/// created by the remediation.
/// </summary>
[JsonProperty(PropertyName = "properties.deploymentStatus")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.PolicyInsights.Models
using System.Linq;

/// <summary>
/// The deployment status summary for all deplyoments created by the
/// The deployment status summary for all deployments created by the
/// remediation.
/// </summary>
public partial class RemediationDeploymentSummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ internal Operations(PolicyInsightsClient client)
/// </return>
public async Task<AzureOperationResponse<OperationsListResults>> ListWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
string apiVersion = "2018-04-04";
string apiVersion = "2018-07-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Loading

0 comments on commit 49d1872

Please sign in to comment.