Skip to content

Reorder child resource output #596

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

Merged
merged 1 commit into from
Jul 14, 2015
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSBackendAddressPool : PSChildResource
{
[JsonProperty(Order = 1)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does making every property Order=1 change the behavior? Do you have a test for the new serialization?

public List<PSResourceId> BackendIpConfigurations { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> LoadBalancingRules { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,25 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSFrontendIPConfiguration : PSChildResource
{
[JsonProperty(Order = 1)]
public string PrivateIpAddress { get; set; }

[JsonProperty(Order = 1)]
public string PrivateIpAllocationMethod { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId Subnet { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId PublicIpAddress { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> InboundNatRules { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> LoadBalancingRules { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,28 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSInboundNatRule : PSChildResource
{
[JsonProperty(Order = 1)]
public PSResourceId FrontendIPConfiguration { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId BackendIPConfiguration { get; set; }

[JsonProperty(Order = 1)]
public string Protocol { get; set; }

[JsonProperty(Order = 1)]
public int FrontendPort { get; set; }

[JsonProperty(Order = 1)]
public int BackendPort { get; set; }

[JsonProperty(Order = 1)]
public int? IdleTimeoutInMinutes { get; set; }

[JsonProperty(Order = 1)]
public bool EnableFloatingIP { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,34 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSLoadBalancingRule : PSChildResource
{
[JsonProperty(Order = 1)]
public PSResourceId FrontendIPConfiguration { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId BackendAddressPool { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId Probe { get; set; }

[JsonProperty(Order = 1)]
public string Protocol { get; set; }

[JsonProperty(Order = 1)]
public int FrontendPort { get; set; }

[JsonProperty(Order = 1)]
public int BackendPort { get; set; }

[JsonProperty(Order = 1)]
public int? IdleTimeoutInMinutes { get; set; }

[JsonProperty(Order = 1)]
public string LoadDistribution { get; set; }

[JsonProperty(Order = 1)]
public bool EnableFloatingIP { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSNetworkInterfaceIpConfiguration : PSChildResource
{
[JsonProperty(Order = 1)]
public string PrivateIpAddress { get; set; }

[JsonProperty(Order = 1)]
public string PrivateIpAllocationMethod { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId Subnet { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId PublicIpAddress { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> LoadBalancerBackendAddressPools { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> LoadBalancerInboundNatRules { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,25 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSProbe : PSChildResource
{
[JsonProperty(Order = 1)]
public List<PSResourceId> LoadBalancingRules { get; set; }

[JsonProperty(Order = 1)]
public string Protocol { get; set; }

[JsonProperty(Order = 1)]
public int Port { get; set; }

[JsonProperty(Order = 1)]
public int IntervalInSeconds { get; set; }

[JsonProperty(Order = 1)]
public int NumberOfProbes { get; set; }

[JsonProperty(Order = 1)]
public string RequestPath { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@

namespace Microsoft.Azure.Commands.Network.Models
{
using Newtonsoft.Json;

public class PSRoute : PSChildResource
{
[JsonProperty(Order = 1)]
public string AddressPrefix { get; set; }


[JsonProperty(Order = 1)]
public string NextHopType { get; set; }

[JsonProperty(Order = 1)]
public string NextHopIpAddress { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,38 @@

namespace Microsoft.Azure.Commands.Network.Models
{
using Newtonsoft.Json;

public class PSSecurityRule : PSChildResource
{
[JsonProperty(Order = 1)]
public string Description { get; set; }

[JsonProperty(Order = 1)]
public string Protocol { get; set; }

[JsonProperty(Order = 1)]
public string SourcePortRange { get; set; }

[JsonProperty(Order = 1)]
public string DestinationPortRange { get; set; }

[JsonProperty(Order = 1)]
public string SourceAddressPrefix { get; set; }

[JsonProperty(Order = 1)]
public string DestinationAddressPrefix { get; set; }

[JsonProperty(Order = 1)]
public string Access { get; set; }

[JsonProperty(Order = 1)]
public int Priority { get; set; }

[JsonProperty(Order = 1)]
public string Direction { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ namespace Microsoft.Azure.Commands.Network.Models

public class PSSubnet : PSChildResource
{
[JsonProperty(Order = 1)]
public string AddressPrefix { get; set; }

[JsonProperty(Order = 1)]
public List<PSResourceId> IpConfigurations { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId NetworkSecurityGroup { get; set; }

[JsonProperty(Order = 1)]
public PSResourceId RouteTable { get; set; }

[JsonProperty(Order = 1)]
public string ProvisioningState { get; set; }

[JsonIgnore]
Expand Down