Skip to content

Commit

Permalink
Updated Management.ResourceManager sdk models and tests for new api v…
Browse files Browse the repository at this point in the history
…ersion. (#7419)

* updated tests for new api version.

* Fixed merging of couple of models and a record file.

* minor: adjusted whitepacing

* Fixed test.

* updated .csproj, .props and assembly info.

* reverting proj version to 2.4.0-preview as it is the latest.

* updated generate.ps1 and resources_resource-manager.txt tracking file.

* updated generate.ps1 as suggested.

* updated generate.ps1 as suggested.

* correct the line that needs to be commented out
  • Loading branch information
sandipsh authored and isra-fel committed Sep 6, 2019
1 parent 424b020 commit 554d96c
Show file tree
Hide file tree
Showing 28 changed files with 53,959 additions and 9,498 deletions.
6 changes: 3 additions & 3 deletions eng/mgmt/mgmtmetadata/resources_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resources/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-resources-2019-07 --csharp.output-folder=C:\code\temp\sdk-generated-cs
2019-08-16 17:54:31 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/resources/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-policy-2019-06 --csharp.output-folder=E:\azure-sdk-for-net\sdk\resources\Microsoft.Azure.Management.Resource\src\Generated
2019-09-04 17:54:17 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 23326b92394ef630c59833f27e512544162ef4dd
Commit: d547b7794cad660fd3cceee790e407a4d534308c
AutoRest information
Requested version: latest
Bootstrapper version: [email protected]
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>Features_2015-12-01;ManagementLinkClient_2016-09-01;Resources_2016-09-01;Authorization_2016-09-01;Authorization_2018-05-01;Management_2018-05-01;PolicyClient_2018-05-01;Management_2019-07-01;ResourceManagementClient_2019-07-01;Resources_2019-07-01;SubscriptionClient_2016-06-01;</AzureApiTag>
<AzureApiTag>Features_2015-12-01;ManagementLinkClient_2016-09-01;Resources_2016-09-01;Authorization_2016-09-01;Authorization_2019-06-01;Management_2019-06-01;PolicyClient_2019-06-01;Management_2019-07-01;ResourceManagementClient_2019-07-01;Resources_2019-07-01;SubscriptionClient_2016-06-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the resource group, which is
/// everything in the unfiltered list except those applied to resources
/// contained within the resource group. If $filter=policyDefinitionId
/// eq '{value}' is provided, the returned list includes only policy
/// assignments that apply to the resource group and assign the policy
/// definition whose id is {value}.
/// eq '{value}' is provided, the returned list includes all policy
/// assignments of the policy definition whose id is {value} that apply
/// to the resource group.
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group that contains policy assignments.
Expand Down Expand Up @@ -200,17 +200,17 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the resource, which is everything
/// in the unfiltered list except those applied to resources contained
/// within the resource. If $filter=policyDefinitionId eq '{value}' is
/// provided, the returned list includes only policy assignments that
/// apply to the resource and assign the policy definition whose id is
/// {value}. Three parameters plus the resource name are used to
/// identify a specific resource. If the resource is not part of a
/// parent resource (the more common case), the parent resource path
/// should not be provided (or provided as ''). For example a web app
/// could be specified as ({resourceProviderNamespace} ==
/// 'Microsoft.Web', {parentResourcePath} == '', {resourceType} ==
/// 'sites', {resourceName} == 'MyWebApp'). If the resource is part of
/// a parent resource, then all parameters should be provided. For
/// example a virtual machine DNS name could be specified as
/// provided, the returned list includes all policy assignments of the
/// policy definition whose id is {value} that apply to the resource.
/// Three parameters plus the resource name are used to identify a
/// specific resource. If the resource is not part of a parent resource
/// (the more common case), the parent resource path should not be
/// provided (or provided as ''). For example a web app could be
/// specified as ({resourceProviderNamespace} == 'Microsoft.Web',
/// {parentResourcePath} == '', {resourceType} == 'sites',
/// {resourceName} == 'MyWebApp'). If the resource is part of a parent
/// resource, then all parameters should be provided. For example a
/// virtual machine DNS name could be specified as
/// ({resourceProviderNamespace} == 'Microsoft.Compute',
/// {parentResourcePath} == 'virtualMachines/MyVirtualMachine',
/// {resourceType} == 'domainNames', {resourceName} ==
Expand Down Expand Up @@ -273,9 +273,8 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the subscription, which is
/// everything in the unfiltered list except those applied to objects
/// contained within the subscription. If $filter=policyDefinitionId eq
/// '{value}' is provided, the returned list includes only policy
/// assignments that apply to the subscription and assign the policy
/// definition whose id is {value}.
/// '{value}' is provided, the returned list includes all policy
/// assignments of the policy definition whose id is {value}.
/// </remarks>
/// <param name='odataQuery'>
/// OData parameters to apply to the operation.
Expand Down Expand Up @@ -424,9 +423,9 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the resource group, which is
/// everything in the unfiltered list except those applied to resources
/// contained within the resource group. If $filter=policyDefinitionId
/// eq '{value}' is provided, the returned list includes only policy
/// assignments that apply to the resource group and assign the policy
/// definition whose id is {value}.
/// eq '{value}' is provided, the returned list includes all policy
/// assignments of the policy definition whose id is {value} that apply
/// to the resource group.
/// </remarks>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
Expand Down Expand Up @@ -463,17 +462,17 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the resource, which is everything
/// in the unfiltered list except those applied to resources contained
/// within the resource. If $filter=policyDefinitionId eq '{value}' is
/// provided, the returned list includes only policy assignments that
/// apply to the resource and assign the policy definition whose id is
/// {value}. Three parameters plus the resource name are used to
/// identify a specific resource. If the resource is not part of a
/// parent resource (the more common case), the parent resource path
/// should not be provided (or provided as ''). For example a web app
/// could be specified as ({resourceProviderNamespace} ==
/// 'Microsoft.Web', {parentResourcePath} == '', {resourceType} ==
/// 'sites', {resourceName} == 'MyWebApp'). If the resource is part of
/// a parent resource, then all parameters should be provided. For
/// example a virtual machine DNS name could be specified as
/// provided, the returned list includes all policy assignments of the
/// policy definition whose id is {value} that apply to the resource.
/// Three parameters plus the resource name are used to identify a
/// specific resource. If the resource is not part of a parent resource
/// (the more common case), the parent resource path should not be
/// provided (or provided as ''). For example a web app could be
/// specified as ({resourceProviderNamespace} == 'Microsoft.Web',
/// {parentResourcePath} == '', {resourceType} == 'sites',
/// {resourceName} == 'MyWebApp'). If the resource is part of a parent
/// resource, then all parameters should be provided. For example a
/// virtual machine DNS name could be specified as
/// ({resourceProviderNamespace} == 'Microsoft.Compute',
/// {parentResourcePath} == 'virtualMachines/MyVirtualMachine',
/// {resourceType} == 'domainNames', {resourceName} ==
Expand Down Expand Up @@ -518,9 +517,8 @@ public partial interface IPolicyAssignmentsOperations
/// policy assignments that apply to the subscription, which is
/// everything in the unfiltered list except those applied to objects
/// contained within the subscription. If $filter=policyDefinitionId eq
/// '{value}' is provided, the returned list includes only policy
/// assignments that apply to the subscription and assign the policy
/// definition whose id is {value}.
/// '{value}' is provided, the returned list includes all policy
/// assignments of the policy definition whose id is {value}.
/// </remarks>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// <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.ResourceManager.Models
{

/// <summary>
/// Defines values for EnforcementMode.
/// </summary>
public static class EnforcementMode
{
/// <summary>
/// The policy effect is enforced during resource creation or update.
/// </summary>
public const string Default = "Default";
/// <summary>
/// The policy effect is not enforced during resource creation or
/// update.
/// </summary>
public const string DoNotEnforce = "DoNotEnforce";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public PolicyAssignment()
/// <param name="description">This message will be part of response in
/// case of policy violation.</param>
/// <param name="metadata">The policy assignment metadata.</param>
/// <param name="enforcementMode">The policy assignment enforcement
/// mode. Possible values are Default and DoNotEnforce. Possible values
/// include: 'Default', 'DoNotEnforce'</param>
/// <param name="id">The ID of the policy assignment.</param>
/// <param name="type">The type of the policy assignment.</param>
/// <param name="name">The name of the policy assignment.</param>
Expand All @@ -55,7 +58,7 @@ public PolicyAssignment()
/// required when utilizing managed identity.</param>
/// <param name="identity">The managed identity associated with the
/// policy assignment.</param>
public PolicyAssignment(string displayName = default(string), string policyDefinitionId = default(string), string scope = default(string), IList<string> notScopes = default(IList<string>), object parameters = default(object), string description = default(string), object metadata = default(object), string id = default(string), string type = default(string), string name = default(string), PolicySku sku = default(PolicySku), string location = default(string), Identity identity = default(Identity))
public PolicyAssignment(string displayName = default(string), string policyDefinitionId = default(string), string scope = default(string), IList<string> notScopes = default(IList<string>), object parameters = default(object), string description = default(string), object metadata = default(object), string enforcementMode = default(string), string id = default(string), string type = default(string), string name = default(string), PolicySku sku = default(PolicySku), string location = default(string), Identity identity = default(Identity))
{
DisplayName = displayName;
PolicyDefinitionId = policyDefinitionId;
Expand All @@ -64,6 +67,7 @@ public PolicyAssignment()
Parameters = parameters;
Description = description;
Metadata = metadata;
EnforcementMode = enforcementMode;
Id = id;
Type = type;
Name = name;
Expand Down Expand Up @@ -122,6 +126,14 @@ public PolicyAssignment()
[JsonProperty(PropertyName = "properties.metadata")]
public object Metadata { get; set; }

/// <summary>
/// Gets or sets the policy assignment enforcement mode. Possible
/// values are Default and DoNotEnforce. Possible values include:
/// 'Default', 'DoNotEnforce'
/// </summary>
[JsonProperty(PropertyName = "properties.enforcementMode")]
public string EnforcementMode { get; set; }

/// <summary>
/// Gets the ID of the policy assignment.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ public PolicyDefinition()
/// <param name="policyType">The type of policy definition. Possible
/// values are NotSpecified, BuiltIn, and Custom. Possible values
/// include: 'NotSpecified', 'BuiltIn', 'Custom'</param>
/// <param name="mode">The policy definition mode. Possible values are
/// NotSpecified, Indexed, and All. Possible values include:
/// 'NotSpecified', 'Indexed', 'All'</param>
/// <param name="mode">The policy definition mode. Some examples are
/// All, Indexed, Microsoft.KeyVault.Data.</param>
/// <param name="displayName">The display name of the policy
/// definition.</param>
/// <param name="description">The policy definition
Expand Down Expand Up @@ -80,9 +79,8 @@ public PolicyDefinition()
public string PolicyType { get; set; }

/// <summary>
/// Gets or sets the policy definition mode. Possible values are
/// NotSpecified, Indexed, and All. Possible values include:
/// 'NotSpecified', 'Indexed', 'All'
/// Gets or sets the policy definition mode. Some examples are All,
/// Indexed, Microsoft.KeyVault.Data.
/// </summary>
[JsonProperty(PropertyName = "properties.mode")]
public string Mode { get; set; }
Expand Down
Loading

0 comments on commit 554d96c

Please sign in to comment.