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

Update SubResourceWriterable to WriteableSubResource #1249

Merged
Show file tree
Hide file tree
Changes from 3 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. &lt;br&gt;&lt;br&gt; NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. </summary>
public partial class DiskEncryptionSetParameters : SubResourceWritable
public partial class DiskEncryptionSetParameters : WritableSubResource
{
/// <summary> Initializes a new instance of DiskEncryptionSetParameters. </summary>
public DiskEncryptionSetParameters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. </summary>
public partial class ImageReference : SubResourceWritable
public partial class ImageReference : WritableSubResource
{
/// <summary> Initializes a new instance of ImageReference. </summary>
public ImageReference()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> The parameters of a managed disk. </summary>
public partial class ManagedDiskParameters : SubResourceWritable
public partial class ManagedDiskParameters : WritableSubResource
{
/// <summary> Initializes a new instance of ManagedDiskParameters. </summary>
public ManagedDiskParameters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes a network interface reference. </summary>
public partial class NetworkInterfaceReference : SubResourceWritable
public partial class NetworkInterfaceReference : WritableSubResource
{
/// <summary> Initializes a new instance of NetworkInterfaceReference. </summary>
public NetworkInterfaceReference()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> The SubResourceWithColocationStatus. </summary>
public partial class SubResourceWithColocationStatus : SubResourceWritable
public partial class SubResourceWithColocationStatus : WritableSubResource
{
/// <summary> Initializes a new instance of SubResourceWithColocationStatus. </summary>
public SubResourceWithColocationStatus()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Output of virtual machine capture operation. </summary>
public partial class VirtualMachineCaptureResult : SubResourceWritable
public partial class VirtualMachineCaptureResult : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineCaptureResult. </summary>
public VirtualMachineCaptureResult()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Virtual machine image resource information. </summary>
public partial class VirtualMachineImageResource : SubResourceWritable
public partial class VirtualMachineImageResource : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineImageResource. </summary>
/// <param name="name"> The name of the resource. </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes a virtual machine scale set network profile&apos;s IP configuration. </summary>
public partial class VirtualMachineScaleSetIPConfiguration : SubResourceWritable
public partial class VirtualMachineScaleSetIPConfiguration : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineScaleSetIPConfiguration. </summary>
/// <param name="name"> The IP configuration name. </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes a virtual machine scale set network profile&apos;s network configurations. </summary>
public partial class VirtualMachineScaleSetNetworkConfiguration : SubResourceWritable
public partial class VirtualMachineScaleSetNetworkConfiguration : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineScaleSetNetworkConfiguration. </summary>
/// <param name="name"> The network configuration name. </param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes a virtual machine scale set network profile&apos;s IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network. </summary>
public partial class VirtualMachineScaleSetUpdateIPConfiguration : SubResourceWritable
public partial class VirtualMachineScaleSetUpdateIPConfiguration : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateIPConfiguration. </summary>
public VirtualMachineScaleSetUpdateIPConfiguration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Azure.ResourceManager.Sample
{
/// <summary> Describes a virtual machine scale set network profile&apos;s network configurations. </summary>
public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : SubResourceWritable
public partial class VirtualMachineScaleSetUpdateNetworkConfiguration : WritableSubResource
{
/// <summary> Initializes a new instance of VirtualMachineScaleSetUpdateNetworkConfiguration. </summary>
public VirtualMachineScaleSetUpdateNetworkConfiguration()
Expand Down
2 changes: 1 addition & 1 deletion src/AutoRest.CSharp/AutoRest.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Azure.Core" Version="1.14.0" />
<PackageReference Include="Azure.Core.Experimental" Version="0.1.0-preview.12" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210512.2" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210517.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0-1.final" />
<PackageReference Include="YamlDotNet" Version="8.1.2" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/AutoRest.CSharp/Common/AutoRest/Plugins/CSharpProj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class CSharpProj : IPlugin

private string _armCsProjContent = @"
<ItemGroup>
<PackageReference Include=""Azure.ResourceManager.Core"" Version=""1.0.0-alpha.20210512.2"" />
<PackageReference Include=""Azure.ResourceManager.Core"" Version=""1.0.0-alpha.20210517.1"" />
</ItemGroup>
";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal static Type GetResourceIdentifierType(this OperationGroup operation, Mg
return typeof(SubscriptionResourceIdentifier);
else if (operation.IsTenantResource(config))
return typeof(TenantResourceIdentifier);
else if (!skipResourceIdentifier && (IsSubclassOf(GetObjectTypeBase(mgmtObjectType), typeof(SubResource)) || IsSubclassOf(GetObjectTypeBase(mgmtObjectType), typeof(SubResourceWritable))))
else if (!skipResourceIdentifier && (IsSubclassOf(GetObjectTypeBase(mgmtObjectType), typeof(SubResource)) || IsSubclassOf(GetObjectTypeBase(mgmtObjectType), typeof(WritableSubResource))))
return typeof(ResourceIdentifier);
else
return typeof(ResourceGroupResourceIdentifier);
Expand Down
2 changes: 1 addition & 1 deletion test/AutoRest.Shared.Tests/AutoRest.Shared.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210512.2" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210517.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="Azure.Core" Version="1.14" />
<PackageReference Include="Azure.Core.Experimental" Version="0.1.0-preview.12" />
<PackageReference Include="Azure.Identity" Version="1.0.0" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210512.2" />
<PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210517.1" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ExactMatchInheritanceTests()
[TestCase(typeof(Resource<ResourceGroupResourceIdentifier>), typeof(ExactMatchModel1Data))]
[TestCase(typeof(TrackedResource<ResourceGroupResourceIdentifier>), typeof(ExactMatchModel5Data))]
[TestCase(typeof(SubResource), typeof(ExactMatchModel6))]
[TestCase(typeof(SubResourceWritable), typeof(ExactMatchModel8))]
[TestCase(typeof(WritableSubResource), typeof(ExactMatchModel8))]
[TestCase(typeof(ExactMatchModel7), typeof(ExactMatchModel2))]
[TestCase(typeof(ExactMatchModel8), typeof(ExactMatchModel3Data))]
[TestCase(typeof(ExactMatchModel9), typeof(ExactMatchModel4))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace ExactMatchInheritance
{
/// <summary> The ExactMatchModel8. </summary>
public partial class ExactMatchModel8 : SubResourceWritable
public partial class ExactMatchModel8 : WritableSubResource
{
/// <summary> Initializes a new instance of ExactMatchModel8. </summary>
public ExactMatchModel8()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace ResourceIdentifierChooser
{
/// <summary> A class representing the ResourceLevel data model. </summary>
public partial class ResourceLevelData : SubResourceWritable
public partial class ResourceLevelData : WritableSubResource
{
/// <summary> Initializes a new instance of ResourceLevelData. </summary>
public ResourceLevelData()
Expand Down