Skip to content

Commit

Permalink
protected internal; full subresource namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeming Liu committed Apr 21, 2021
1 parent e808485 commit 4419c6e
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class SubResource
{
/// <summary> Initializes a new instance of SubResource. </summary>
/// <param name="id"> ARM resource Id. </param>
internal SubResource(string id)
protected internal SubResource(string id)
{
Id = id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial class SubResourceReadOnly
{
/// <summary> Initializes a new instance of SubResourceReadOnly. </summary>
/// <param name="id"> ARM resource Id. </param>
internal SubResourceReadOnly(string id)
protected internal SubResourceReadOnly(string id)
{
Id = id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ public int? PlatformFaultDomainCount
}

/// <summary> A list of references to all virtual machines in the availability set. </summary>
public IList<SubResource> VirtualMachines
public IList<Azure.ResourceManager.Compute.Models.SubResource> VirtualMachines
{
get => Model.VirtualMachines;
}

/// <summary> Specifies information about the proximity placement group that the availability set should be assigned to. &lt;br&gt;&lt;br&gt;Minimum api-version: 2018-04-01. </summary>
public SubResource ProximityPlacementGroup
public Azure.ResourceManager.Compute.Models.SubResource ProximityPlacementGroup
{
get => Model.ProximityPlacementGroup;
set => Model.ProximityPlacementGroup = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public VirtualMachineData(Azure.ResourceManager.Compute.Models.VirtualMachine vm
public string ProvisioningState => Model.ProvisioningState;

/// <summary> Specifies information about the dedicated host that the virtual machine resides in. &lt;br&gt;&lt;br&gt;Minimum api-version: 2018-10-01. </summary>
public SubResource Host
public Azure.ResourceManager.Compute.Models.SubResource Host
{
get => Model.Host;
set => Model.Host = value;
Expand Down Expand Up @@ -59,21 +59,21 @@ public VirtualMachinePriorityTypes? Priority
}

/// <summary> Specifies information about the proximity placement group that the virtual machine should be assigned to. &lt;br&gt;&lt;br&gt;Minimum api-version: 2018-04-01. </summary>
public SubResource ProximityPlacementGroup
public Azure.ResourceManager.Compute.Models.SubResource ProximityPlacementGroup
{
get => Model.ProximityPlacementGroup;
set => Model.ProximityPlacementGroup = value;
}

/// <summary> Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. &lt;br&gt;&lt;br&gt;This property cannot exist along with a non-null properties.availabilitySet reference. &lt;br&gt;&lt;br&gt;Minimum api‐version: 2019‐03‐01. </summary>
public SubResource VirtualMachineScaleSet
public Azure.ResourceManager.Compute.Models.SubResource VirtualMachineScaleSet
{
get => Model.VirtualMachineScaleSet;
set => Model.VirtualMachineScaleSet = value;
}

/// <summary> Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). &lt;br&gt;&lt;br&gt; For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) &lt;br&gt;&lt;br&gt; Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. &lt;br&gt;&lt;br&gt;This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. </summary>
public SubResource AvailabilitySet
public Azure.ResourceManager.Compute.Models.SubResource AvailabilitySet
{
get => Model.AvailabilitySet;
set => Model.AvailabilitySet = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ await Operations.StartCreateOrUpdateAsync(Id.ResourceGroupName, name, resourceDe
/// <returns> Object used to create a <see cref="VirtualMachine"/>. </returns>
public VirtualMachineModelBuilder Construct(string hostName, string adminUser, string adminPassword, ResourceIdentifier networkInterfaceId, ResourceIdentifier availabilitySetId, LocationData location = null)
{
var parent = GetParentResource<ResourceGroup, ResourceGroupResourceIdentifier,ResourceGroupOperations>();
var parent = GetParentResource<ResourceGroup, ResourceGroupResourceIdentifier, ResourceGroupOperations>();
var vm = new Azure.ResourceManager.Compute.Models.VirtualMachine(location ?? parent.Data.Location)
{
NetworkProfile = new NetworkProfile(),
Expand All @@ -138,7 +138,7 @@ public VirtualMachineModelBuilder Construct(string hostName, string adminUser, s
},
},
HardwareProfile = new HardwareProfile() { VmSize = VirtualMachineSizeTypes.StandardB1Ms },
AvailabilitySet = new SubResource() { Id = availabilitySetId }
AvailabilitySet = new Azure.ResourceManager.Compute.Models.SubResource() { Id = availabilitySetId }
};
vm.NetworkProfile.NetworkInterfaces.Add(new NetworkInterfaceReference() { Id = networkInterfaceId });

Expand Down Expand Up @@ -230,7 +230,7 @@ public AsyncPageable<VirtualMachine> ListAsync(string nameFilter, int? top = nul
/// <inheritdoc />
public override ArmResponse<VirtualMachine> Get(string virtualMachineName, CancellationToken cancellationToken = default)
{
return new PhArmResponse<VirtualMachine, Azure.ResourceManager.Compute.Models.VirtualMachine>(Operations.Get(Id.ResourceGroupName, virtualMachineName, cancellationToken),
return new PhArmResponse<VirtualMachine, Azure.ResourceManager.Compute.Models.VirtualMachine>(Operations.Get(Id.ResourceGroupName, virtualMachineName, cancellationToken),
v => new VirtualMachine(Parent, new VirtualMachineData(v)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public NetworkInterfaceData(Azure.ResourceManager.Network.Models.NetworkInterfac
/// <summary>
/// Gets the reference to a linked virtual machine.
/// </summary>
public SubResource VirtualMachine => Model.VirtualMachine;
public Azure.ResourceManager.Network.Models.SubResource VirtualMachine => Model.VirtualMachine;

/// <summary>
/// Gets the reference to the linked NetworkSecurityGroup resource.
Expand All @@ -68,7 +68,7 @@ public IList<NetworkInterfaceIPConfiguration> IpConfigurations
/// <summary>
/// Gets a list of TapConfigurations of the newtork interface.
/// </summary>
public IReadOnlyList<NetworkInterfaceTapConfiguration> TapConfigurations=> Model.TapConfigurations;
public IReadOnlyList<NetworkInterfaceTapConfiguration> TapConfigurations => Model.TapConfigurations;

/// <summary>
/// Gets or sets the DNS settings in network interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public string IpAddress
}

/// <summary> The Public IP Prefix this Public IP Address should be allocated from. </summary>
public SubResource PublicIPPrefix
public Azure.ResourceManager.Network.Models.SubResource PublicIPPrefix
{
get => Model.PublicIPPrefix;
set => Model.PublicIPPrefix = value;
Expand Down
20 changes: 10 additions & 10 deletions sdk/resourcemanager/Proto.Client/network/Placeholder/SubnetData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@

namespace Proto.Network
{
/// <summary>
/// <summary>
/// A class representing the subnet data model.
/// </summary>
public class SubnetData : ProxyResource<ResourceGroupResourceIdentifier, Azure.ResourceManager.Network.Models.Subnet>
{
/// <summary>
/// Initializes a new instance of the <see cref="SubnetData"/> class.
/// <summary>
/// Initializes a new instance of the <see cref="SubnetData"/> class.
/// </summary>
public SubnetData(Azure.ResourceManager.Network.Models.Subnet sub) : base(sub.Id, sub)
{
}

/// <summary>
/// Gets the subnet id.
/// Gets the subnet id.
///</summary>
public override string Name => Model.Name;

/// <summary>
/// The provisioning state of the subnet resource.
/// <summary>
/// The provisioning state of the subnet resource.
/// </summary>
public ProvisioningState? ProvisioningState => Model.ProvisioningState;

/// <summary>
/// <summary>
/// A read-only string identifying the intention use for this subnet based on delegations and other user-defined properties.
/// </summary>
public string Purpose => Model.Purpose;
Expand All @@ -44,7 +44,7 @@ public IList<Delegation> Delegations
public IReadOnlyList<ResourceNavigationLink> ResourceNavigationLinks => Model.ResourceNavigationLinks;

/// <summary> Array of IpAllocation which reference this subnet. </summary>
public IList<SubResource> IpAllocations
public IList<Azure.ResourceManager.Network.Models.SubResource> IpAllocations
{
get => Model.IpAllocations;
}
Expand All @@ -70,9 +70,9 @@ public IList<ServiceEndpointPropertiesFormat> ServiceEndpoints
{
get => Model.ServiceEndpoints;
}

/// <summary> Nat gateway associated with this subnet. </summary>
public SubResource NatGateway
public Azure.ResourceManager.Network.Models.SubResource NatGateway
{
get => Model.NatGateway;
set => Model.NatGateway = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public bool? EnableVmProtection
}

/// <summary> The DDoS protection plan associated with the virtual network. </summary>
public SubResource DdosProtectionPlan
public Azure.ResourceManager.Network.Models.SubResource DdosProtectionPlan

{
get => Model.DdosProtectionPlan;
Expand All @@ -94,7 +94,7 @@ public VirtualNetworkBgpCommunities BgpCommunities
}

/// <summary> Array of IpAllocation which reference this VNET. </summary>
public IList<SubResource> IpAllocations
public IList<Azure.ResourceManager.Network.Models.SubResource> IpAllocations
{
get => Model.IpAllocations;
}
Expand Down

0 comments on commit 4419c6e

Please sign in to comment.