Skip to content

Type related changes #6

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
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 @@ -50,7 +50,7 @@ public class AzureApplicationGatewayBackendHttpSettingsBase : NetworkBaseCmdlet
Mandatory = false,
HelpMessage = "Request Timeout. Default value 30 seconds.")]
[ValidateNotNullOrEmpty]
public uint RequestTimeout { get; set; }
public int RequestTimeout { get; set; }


[Parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AzureApplicationGatewayConnectionDrainingBase : NetworkBaseCmdlet
Mandatory = true,
HelpMessage = "The number of seconds connection draining is active. Acceptable values are from 1 second to 3600 seconds.")]
[ValidateNotNullOrEmpty]
public uint DrainTimeoutInSec { get; set; }
public int DrainTimeoutInSec { get; set; }

public override void ExecuteCmdlet()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using Microsoft.Azure.Commands.Network.Models;
using System;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Network
Expand Down Expand Up @@ -106,7 +107,15 @@ public PSApplicationGatewayHttpListener NewObject()
httpListener.Name = this.Name;
httpListener.Protocol = this.Protocol;
httpListener.HostName = this.HostName;
httpListener.RequireServerNameIndication = this.RequireServerNameIndication;

if(string.Equals(this.RequireServerNameIndication,"true", StringComparison.OrdinalIgnoreCase))
{
httpListener.RequireServerNameIndication = true;
}
else if(string.Equals(this.RequireServerNameIndication, "false", StringComparison.OrdinalIgnoreCase))
{
httpListener.RequireServerNameIndication = false;
}

if (!string.IsNullOrEmpty(this.FrontendIPConfigurationId))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet
Mandatory = true,
HelpMessage = "Probe interval in seconds. This is the time interval between two consecutive probes")]
[ValidateNotNullOrEmpty]
public uint Interval { get; set; }
public int Interval { get; set; }

[Parameter(
Mandatory = true,
HelpMessage = "Probe timeout in seconds. Probe marked as failed if valid response is not received with this timeout period")]
[ValidateNotNullOrEmpty]
public uint Timeout { get; set; }
public int Timeout { get; set; }

[Parameter(
Mandatory = true,
HelpMessage = "Probe retry count. Backend server is marked down after consecutive probe failure count reaches UnhealthyThreshold")]
[ValidateNotNullOrEmpty]
public uint UnhealthyThreshold { get; set; }
public int UnhealthyThreshold { get; set; }

[Parameter(
Mandatory = false,
Expand All @@ -72,7 +72,7 @@ public class AzureApplicationGatewayProbeConfigBase : NetworkBaseCmdlet
Mandatory = false,
HelpMessage = "Minimum number of servers that are always marked healthy. Default value is 0")]
[ValidateRange(0, int.MaxValue)]
public uint MinServers { get; set; }
public int MinServers { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,18 +395,18 @@ public static void Initialize()
});
cfg.CreateMap<CNM.PSApplicationGatewayPathRule, MNM.ApplicationGatewayPathRule>();
cfg.CreateMap<CNM.PSApplicationGatewayUrlPathMap, MNM.ApplicationGatewayUrlPathMap>();
cfg.CreateMap<CNM.PSApplicationGatewayProbe, MNM.ApplicationGatewayProbe>();
cfg.CreateMap<CNM.PSApplicationGatewayProbeHealthResponseMatch, MNM.ApplicationGatewayProbeHealthResponseMatch>();
cfg.CreateMap<CNM.PSApplicationGatewayProbe, MNM.ApplicationGatewayProbe>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendAddress, MNM.ApplicationGatewayBackendAddress>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendAddressPool, MNM.ApplicationGatewayBackendAddressPool>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendHttpSettings, MNM.ApplicationGatewayBackendHttpSettings>();
cfg.CreateMap<CNM.PSApplicationGatewayFrontendIPConfiguration, MNM.ApplicationGatewayFrontendIPConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewayFrontendPort, MNM.ApplicationGatewayFrontendPort>();
cfg.CreateMap<CNM.PSApplicationGatewaySslCertificate, MNM.ApplicationGatewaySslCertificate>();
cfg.CreateMap<CNM.PSApplicationGatewayHttpListener, MNM.ApplicationGatewayHttpListener>();
cfg.CreateMap<CNM.PSApplicationGatewayIPConfiguration, MNM.ApplicationGatewayIPConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewayRequestRoutingRule, MNM.ApplicationGatewayRequestRoutingRule>();
cfg.CreateMap<CNM.PSApplicationGatewayRedirectConfiguration, MNM.ApplicationGatewayRedirectConfiguration>();
cfg.CreateMap<CNM.PSApplicationGatewaySslCertificate, MNM.ApplicationGatewaySslCertificate>();
cfg.CreateMap<CNM.PSApplicationGatewayAuthenticationCertificate, MNM.ApplicationGatewayAuthenticationCertificate>();
cfg.CreateMap<CNM.PSBackendAddressPool, MNM.BackendAddressPool>();
cfg.CreateMap<CNM.PSApplicationGatewayBackendHealth, MNM.ApplicationGatewayBackendHealth>();
Expand Down Expand Up @@ -435,18 +435,18 @@ public static void Initialize()
});
cfg.CreateMap<MNM.ApplicationGatewayPathRule, CNM.PSApplicationGatewayPathRule>();
cfg.CreateMap<MNM.ApplicationGatewayUrlPathMap, CNM.PSApplicationGatewayUrlPathMap>();
cfg.CreateMap<MNM.ApplicationGatewayProbe, CNM.PSApplicationGatewayProbe>();
cfg.CreateMap<MNM.ApplicationGatewayProbeHealthResponseMatch, CNM.PSApplicationGatewayProbeHealthResponseMatch>();
cfg.CreateMap<MNM.ApplicationGatewayProbe, CNM.PSApplicationGatewayProbe>();
cfg.CreateMap<MNM.ApplicationGatewayBackendAddress, CNM.PSApplicationGatewayBackendAddress>();
cfg.CreateMap<MNM.ApplicationGatewayBackendAddressPool, CNM.PSApplicationGatewayBackendAddressPool>();
cfg.CreateMap<MNM.ApplicationGatewayBackendHttpSettings, CNM.PSApplicationGatewayBackendHttpSettings>();
cfg.CreateMap<MNM.ApplicationGatewayFrontendIPConfiguration, CNM.PSApplicationGatewayFrontendIPConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewaySslCertificate, CNM.PSApplicationGatewaySslCertificate>();
cfg.CreateMap<MNM.ApplicationGatewayFrontendPort, CNM.PSApplicationGatewayFrontendPort>();
cfg.CreateMap<MNM.ApplicationGatewayHttpListener, CNM.PSApplicationGatewayHttpListener>();
cfg.CreateMap<MNM.ApplicationGatewayIPConfiguration, CNM.PSApplicationGatewayIPConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewayRequestRoutingRule, CNM.PSApplicationGatewayRequestRoutingRule>();
cfg.CreateMap<MNM.ApplicationGatewayRedirectConfiguration, CNM.PSApplicationGatewayRedirectConfiguration>();
cfg.CreateMap<MNM.ApplicationGatewaySslCertificate, CNM.PSApplicationGatewaySslCertificate>();
cfg.CreateMap<MNM.ApplicationGatewayAuthenticationCertificate, CNM.PSApplicationGatewayAuthenticationCertificate>();
cfg.CreateMap<MNM.BackendAddressPool, CNM.PSBackendAddressPool>();
cfg.CreateMap<MNM.ApplicationGatewayBackendHealth, CNM.PSApplicationGatewayBackendHealth>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class NewAzureLocalNetworkGatewayCommand : LocalNetworkGatewayBaseCmdlet
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The local network gateway's ASN")]
public uint Asn { get; set; }
public long Asn { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class SetAzureLocalNetworkGatewayCommand : LocalNetworkGatewayBaseCmdlet
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The local network gateway's ASN")]
public uint Asn { get; set; }
public long Asn { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PSApplicationGatewayBackendHttpSettings : PSChildResource
public int Port { get; set; }
public string Protocol { get; set; }
public string CookieBasedAffinity { get; set; }
public uint RequestTimeout { get; set; }
public int RequestTimeout { get; set; }
public PSApplicationGatewayConnectionDraining ConnectionDraining { get; set; }
public PSResourceId Probe { get; set; }
public List<PSResourceId> AuthenticationCertificates { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ namespace Microsoft.Azure.Commands.Network.Models
public class PSApplicationGatewayConnectionDraining
{
public bool Enabled { get; set; }
public uint DrainTimeoutInSec { get; set; }
public int DrainTimeoutInSec { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PSApplicationGatewayHttpListener : PSChildResource
public string Protocol { get; set; }
public string HostName { get; set; }
public PSResourceId SslCertificate { get; set; }
public string RequireServerNameIndication { get; set; }
public bool RequireServerNameIndication { get; set; }
public string ProvisioningState { get; set; }
public string Type { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public class PSApplicationGatewayProbe : PSChildResource
public string Protocol { get; set; }
public string Host { get; set; }
public string Path { get; set; }
public uint Interval { get; set; }
public uint Timeout { get; set; }
public uint UnhealthyThreshold { get; set; }
public int? Interval { get; set; }
public int? Timeout { get; set; }
public int? UnhealthyThreshold { get; set; }
public bool? PickHostNameFromBackendHttpSettings { get; set; }
public uint? MinServers { get; set; }
public int? MinServers { get; set; }
public PSApplicationGatewayProbeHealthResponseMatch Match { get; set; }
public string ProvisioningState { get; set; }
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ namespace Microsoft.Azure.Commands.Network.Models
{
public class PSConnectionResetSharedKey
{
public uint KeyLength { get; set; }
public int KeyLength { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class PSIpFlowVerify
public string Direction { get; set; }
public string LocalIPAddress { get; set; }
public string LocalPort { get; set; }
public uint Protocol { get; set; }
public uint RemoteIPAddress { get; set; }
public uint RemotePort { get; set; }
public int Protocol { get; set; }
public int RemoteIPAddress { get; set; }
public int RemotePort { get; set; }
public string TargetNicResourceId { get; set; }
public string TargetResourceId { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
public partial class PSVirtualNetworkUsage
{
public string Id { get; set; }
public long CurrentValue { get; set; }
public long Limit { get; set; }
public double CurrentValue { get; set; }
public double Limit { get; set; }
public string Unit { get; set; }
public PSUsageName Name { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public class NewAzureVirtualNetworkGatewayCommand : VirtualNetworkGatewayBaseCmd
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The virtual network gateway's ASN for BGP over VPN")]
public uint Asn { get; set; }
public long Asn { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class SetAzureVirtualNetworkGatewayCommand : VirtualNetworkGatewayBaseCmd
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The virtual network gateway's ASN, used to set up BGP sessions inside IPsec tunnels")]
public uint Asn { get; set; }
public long Asn { get; set; }

[Parameter(
Mandatory = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ResetAzureVirtualNetworkGatewayConnectionSharedKeyCommand : Virtual
ValueFromPipelineByPropertyName = true,
HelpMessage = "The virtual network connection reset shared key length")]
[ValidateNotNullOrEmpty]
public uint KeyLength { get; set; }
public int KeyLength { get; set; }

[Parameter(
Mandatory = false,
Expand Down