Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
54aef20
apply the new name and namespace for extension clients, make them pub…
ArcturusZhang Jul 25, 2023
ea2d69b
the armresource parent get and collection is not properly generated i…
ArcturusZhang Jul 25, 2023
d65585d
more fixes on the way
ArcturusZhang Jul 26, 2023
ebb94b4
fix the previous issues we have
ArcturusZhang Jul 26, 2023
7cc4e91
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Jul 26, 2023
2297a0c
fix an issue in resourcemanager
ArcturusZhang Jul 26, 2023
6eb9f18
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Jul 27, 2023
b69f94d
fix an issue of generating extra resource collection entries when not…
ArcturusZhang Jul 27, 2023
89127ca
fix typo in comments
ArcturusZhang Jul 29, 2023
e085c70
change it back to internal
ArcturusZhang Jul 29, 2023
08e4e16
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 2, 2023
c25e907
Revert "change it back to internal"
ArcturusZhang Aug 2, 2023
da37568
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 2, 2023
b3df442
remove the validations in extension method so that it will not block …
ArcturusZhang Aug 2, 2023
0c2915f
remove all the validations in extension methods
ArcturusZhang Aug 2, 2023
d3307ba
regen other project
ArcturusZhang Aug 3, 2023
c086234
move other parameter validations into the mocking extension class
ArcturusZhang Aug 3, 2023
9d6da2a
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 4, 2023
a67ae42
remove the regions because it has some issues sometimes with the remo…
ArcturusZhang Aug 4, 2023
1f5d7b2
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 4, 2023
11bf3bc
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 4, 2023
8c071a3
remove the naming exception
ArcturusZhang Aug 9, 2023
56d97a0
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 14, 2023
8e5eb8f
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 15, 2023
75b4da8
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 15, 2023
8568bcb
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Aug 18, 2023
9e72af6
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Sep 6, 2023
4e4641e
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Sep 25, 2023
4ab1114
refactor class name to unify with others
ArcturusZhang Sep 25, 2023
7859dc1
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Sep 27, 2023
39b4fbe
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Oct 8, 2023
09a5b47
a few refactor
ArcturusZhang Oct 8, 2023
ad65754
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Oct 9, 2023
31ec3e5
some refactor
ArcturusZhang Oct 9, 2023
b48e78f
regenerate
ArcturusZhang Oct 9, 2023
24b387f
add a xml doc paragraph to guide how to mock
ArcturusZhang Oct 9, 2023
97e3611
a refactor to let the getting collection from parent to use Expressions
ArcturusZhang Oct 11, 2023
dd06be4
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 11, 2023
29ee250
add new comment for collection getters
ArcturusZhang Oct 11, 2023
b9340e3
refactor the resource getters in armclient and regenerate
ArcturusZhang Oct 12, 2023
631cb9c
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 12, 2023
d7f5e3d
Revert "Stop using npmrc to consume internal packages (#3809)"
ArcturusZhang Oct 12, 2023
fe7d808
Revert "Revert "Stop using npmrc to consume internal packages (#3809)""
ArcturusZhang Oct 13, 2023
10f01b2
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Oct 13, 2023
2bd783b
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 13, 2023
af72bd9
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 17, 2023
478e666
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Oct 18, 2023
ed0b452
refactor
ArcturusZhang Oct 18, 2023
8881b7f
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 19, 2023
af58885
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 19, 2023
7e1e245
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 23, 2023
0da0b56
update the name change
ArcturusZhang Oct 23, 2023
9a34447
fix test case
ArcturusZhang Oct 23, 2023
9ee42ca
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 24, 2023
0ca10d0
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 25, 2023
1351e3f
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Oct 25, 2023
ee1d023
refactor and fixes after merge
ArcturusZhang Oct 25, 2023
b37d771
refactor
ArcturusZhang Oct 25, 2023
45a558c
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 26, 2023
27b058b
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 27, 2023
fd34428
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 27, 2023
ac1f4ad
a few refactor
ArcturusZhang Oct 27, 2023
9ee9812
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Oct 29, 2023
c632180
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Nov 1, 2023
0256f8c
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Nov 1, 2023
cc34c98
Merge remote-tracking branch 'origin/feature/v3' into make-extensionc…
ArcturusZhang Nov 1, 2023
a2a5b9e
update resourcemanager version
ArcturusZhang Nov 1, 2023
a6b9e8e
Merge branch 'feature/v3' into make-extensionclients-public
ArcturusZhang Nov 2, 2023
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 Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Update="System.Net.ClientModel" Version="1.0.0-beta.1" />
<PackageReference Update="Azure.Core" Version="1.35.0" />
<PackageReference Update="Azure.Core.Experimental" Version="0.1.0-preview.18" />
<PackageReference Update="Azure.ResourceManager" Version="1.6.0" />
<PackageReference Update="Azure.ResourceManager" Version="1.8.0" />
<PackageReference Update="Azure.Core.Expressions.DataFactory" Version="1.0.0-beta.4" />
<PackageReference Update="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
Expand Down

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
@@ -0,0 +1,207 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Sample;

namespace Azure.ResourceManager.Sample.Mocking
{
/// <summary> A class to add extension methods to ArmClient. </summary>
public partial class MockableSampleArmClient : ArmResource
{
/// <summary> Initializes a new instance of the <see cref="MockableSampleArmClient"/> class for mocking. </summary>
protected MockableSampleArmClient()
{
}

/// <summary> Initializes a new instance of the <see cref="MockableSampleArmClient"/> class. </summary>
/// <param name="client"> The client parameters to use in these operations. </param>
/// <param name="id"> The identifier of the resource that is the target of operations. </param>
internal MockableSampleArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}

internal MockableSampleArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
{
}

private string GetApiVersionOrNull(ResourceType resourceType)
{
TryGetApiVersion(resourceType, out string apiVersion);
return apiVersion;
}

/// <summary>
/// Gets an object representing an <see cref="AvailabilitySetResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="AvailabilitySetResource.CreateResourceIdentifier" /> to create an <see cref="AvailabilitySetResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="AvailabilitySetResource" /> object. </returns>
public virtual AvailabilitySetResource GetAvailabilitySetResource(ResourceIdentifier id)
{
AvailabilitySetResource.ValidateResourceId(id);
return new AvailabilitySetResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="ProximityPlacementGroupResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ProximityPlacementGroupResource.CreateResourceIdentifier" /> to create a <see cref="ProximityPlacementGroupResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="ProximityPlacementGroupResource" /> object. </returns>
public virtual ProximityPlacementGroupResource GetProximityPlacementGroupResource(ResourceIdentifier id)
{
ProximityPlacementGroupResource.ValidateResourceId(id);
return new ProximityPlacementGroupResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="DedicatedHostGroupResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DedicatedHostGroupResource.CreateResourceIdentifier" /> to create a <see cref="DedicatedHostGroupResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DedicatedHostGroupResource" /> object. </returns>
public virtual DedicatedHostGroupResource GetDedicatedHostGroupResource(ResourceIdentifier id)
{
DedicatedHostGroupResource.ValidateResourceId(id);
return new DedicatedHostGroupResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="DedicatedHostResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DedicatedHostResource.CreateResourceIdentifier" /> to create a <see cref="DedicatedHostResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DedicatedHostResource" /> object. </returns>
public virtual DedicatedHostResource GetDedicatedHostResource(ResourceIdentifier id)
{
DedicatedHostResource.ValidateResourceId(id);
return new DedicatedHostResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="SshPublicKeyResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="SshPublicKeyResource.CreateResourceIdentifier" /> to create a <see cref="SshPublicKeyResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="SshPublicKeyResource" /> object. </returns>
public virtual SshPublicKeyResource GetSshPublicKeyResource(ResourceIdentifier id)
{
SshPublicKeyResource.ValidateResourceId(id);
return new SshPublicKeyResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineExtensionImageResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineExtensionImageResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineExtensionImageResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineExtensionImageResource" /> object. </returns>
public virtual VirtualMachineExtensionImageResource GetVirtualMachineExtensionImageResource(ResourceIdentifier id)
{
VirtualMachineExtensionImageResource.ValidateResourceId(id);
return new VirtualMachineExtensionImageResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineExtensionResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineExtensionResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineExtensionResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineExtensionResource" /> object. </returns>
public virtual VirtualMachineExtensionResource GetVirtualMachineExtensionResource(ResourceIdentifier id)
{
VirtualMachineExtensionResource.ValidateResourceId(id);
return new VirtualMachineExtensionResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineScaleSetVirtualMachineExtensionResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineScaleSetVirtualMachineExtensionResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineScaleSetVirtualMachineExtensionResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineScaleSetVirtualMachineExtensionResource" /> object. </returns>
public virtual VirtualMachineScaleSetVirtualMachineExtensionResource GetVirtualMachineScaleSetVirtualMachineExtensionResource(ResourceIdentifier id)
{
VirtualMachineScaleSetVirtualMachineExtensionResource.ValidateResourceId(id);
return new VirtualMachineScaleSetVirtualMachineExtensionResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineResource" /> object. </returns>
public virtual VirtualMachineResource GetVirtualMachineResource(ResourceIdentifier id)
{
VirtualMachineResource.ValidateResourceId(id);
return new VirtualMachineResource(Client, id);
}

/// <summary>
/// Gets an object representing an <see cref="ImageResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ImageResource.CreateResourceIdentifier" /> to create an <see cref="ImageResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="ImageResource" /> object. </returns>
public virtual ImageResource GetImageResource(ResourceIdentifier id)
{
ImageResource.ValidateResourceId(id);
return new ImageResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineScaleSetResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineScaleSetResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineScaleSetResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineScaleSetResource" /> object. </returns>
public virtual VirtualMachineScaleSetResource GetVirtualMachineScaleSetResource(ResourceIdentifier id)
{
VirtualMachineScaleSetResource.ValidateResourceId(id);
return new VirtualMachineScaleSetResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineScaleSetExtensionResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineScaleSetExtensionResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineScaleSetExtensionResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineScaleSetExtensionResource" /> object. </returns>
public virtual VirtualMachineScaleSetExtensionResource GetVirtualMachineScaleSetExtensionResource(ResourceIdentifier id)
{
VirtualMachineScaleSetExtensionResource.ValidateResourceId(id);
return new VirtualMachineScaleSetExtensionResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineScaleSetRollingUpgradeResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineScaleSetRollingUpgradeResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineScaleSetRollingUpgradeResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineScaleSetRollingUpgradeResource" /> object. </returns>
public virtual VirtualMachineScaleSetRollingUpgradeResource GetVirtualMachineScaleSetRollingUpgradeResource(ResourceIdentifier id)
{
VirtualMachineScaleSetRollingUpgradeResource.ValidateResourceId(id);
return new VirtualMachineScaleSetRollingUpgradeResource(Client, id);
}

/// <summary>
/// Gets an object representing a <see cref="VirtualMachineScaleSetVmResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="VirtualMachineScaleSetVmResource.CreateResourceIdentifier" /> to create a <see cref="VirtualMachineScaleSetVmResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="VirtualMachineScaleSetVmResource" /> object. </returns>
public virtual VirtualMachineScaleSetVmResource GetVirtualMachineScaleSetVmResource(ResourceIdentifier id)
{
VirtualMachineScaleSetVmResource.ValidateResourceId(id);
return new VirtualMachineScaleSetVmResource(Client, id);
}
}
}
Loading