Skip to content
Open
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 @@ -46,7 +46,7 @@ public EffectiveRoute()

/// <param name="nextHopType">The type of Azure hop the packet should be sent to.
/// Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;,
/// &#39;VirtualAppliance&#39;, &#39;None&#39;</param>
/// &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;</param>
public EffectiveRoute(string name = default(string), bool? disableBgpRoutePropagation = default(bool?), string source = default(string), string state = default(string), System.Collections.Generic.IList<string> addressPrefix = default(System.Collections.Generic.IList<string>), System.Collections.Generic.IList<string> nextHopIPAddress = default(System.Collections.Generic.IList<string>), string nextHopType = default(string))

{
Expand Down Expand Up @@ -104,7 +104,7 @@ public EffectiveRoute()
public System.Collections.Generic.IList<string> NextHopIPAddress {get; set; }

/// <summary>
/// Gets or sets the type of Azure hop the packet should be sent to. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;
/// Gets or sets the type of Azure hop the packet should be sent to. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "nextHopType")]
public string NextHopType {get; set; }
Expand Down
49 changes: 41 additions & 8 deletions src/Network/Network.Management.Sdk/Generated/Models/Route.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,26 @@ public Route()
/// <param name="addressPrefix">The destination CIDR to which the route applies.
/// </param>

/// <param name="nextHopType">The type of Azure hop the packet should be sent to.
/// <param name="nextHopType">The type of Azure hop the packet should be sent to. When set to
/// &#39;VirtualAppliance&#39;, the &#39;nextHopIpAddress&#39; property is required and
/// &#39;nextHop&#39; must not be set. When set to &#39;VirtualApplianceEcmp&#39;, the
/// &#39;nextHop&#39; property is required and &#39;nextHopIpAddress&#39; must not be set.
/// Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;,
/// &#39;VirtualAppliance&#39;, &#39;None&#39;</param>
/// &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;</param>

/// <param name="nextHopIPAddress">The IP address packets should be forwarded to. Next hop values are only
/// allowed in routes where the next hop type is VirtualAppliance.
/// <param name="nextHopIPAddress">The IP address packets should be forwarded to. Required when nextHopType is
/// &#39;VirtualAppliance&#39;. Must not be set when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;; use the &#39;nextHop&#39; property instead for ECMP routes.
/// </param>

/// <param name="nextHop">The next hop for an ECMP route. Required when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;. Must not be set for other nextHopType values.
/// </param>

/// <param name="hasBgpOverride">A value indicating whether this route overrides overlapping BGP routes
/// regardless of LPM.
/// </param>
public Route(string id = default(string), string name = default(string), string etag = default(string), string type = default(string), string provisioningState = default(string), string addressPrefix = default(string), string nextHopType = default(string), string nextHopIPAddress = default(string), bool? hasBgpOverride = default(bool?))
public Route(string id = default(string), string name = default(string), string etag = default(string), string type = default(string), string provisioningState = default(string), string addressPrefix = default(string), string nextHopType = default(string), string nextHopIPAddress = default(string), RouteNextHopEcmp nextHop = default(RouteNextHopEcmp), bool? hasBgpOverride = default(bool?))

: base(id)
{
Expand All @@ -67,6 +75,7 @@ public Route()
this.AddressPrefix = addressPrefix;
this.NextHopType = nextHopType;
this.NextHopIPAddress = nextHopIPAddress;
this.NextHop = nextHop;
this.HasBgpOverride = hasBgpOverride;
CustomInit();
}
Expand Down Expand Up @@ -110,23 +119,47 @@ public Route()
public string AddressPrefix {get; set; }

/// <summary>
/// Gets or sets the type of Azure hop the packet should be sent to. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;
/// Gets or sets the type of Azure hop the packet should be sent to. When set
/// to &#39;VirtualAppliance&#39;, the &#39;nextHopIpAddress&#39; property is required and
/// &#39;nextHop&#39; must not be set. When set to &#39;VirtualApplianceEcmp&#39;, the
/// &#39;nextHop&#39; property is required and &#39;nextHopIpAddress&#39; must not be set. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.nextHopType")]
public string NextHopType {get; set; }

/// <summary>
/// Gets or sets the IP address packets should be forwarded to. Next hop values
/// are only allowed in routes where the next hop type is VirtualAppliance.
/// Gets or sets the IP address packets should be forwarded to. Required when
/// nextHopType is &#39;VirtualAppliance&#39;. Must not be set when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;; use the &#39;nextHop&#39; property instead for ECMP routes.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.nextHopIpAddress")]
public string NextHopIPAddress {get; set; }

/// <summary>
/// Gets or sets the next hop for an ECMP route. Required when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;. Must not be set for other nextHopType values.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.nextHop")]
public RouteNextHopEcmp NextHop {get; set; }

/// <summary>
/// Gets a value indicating whether this route overrides overlapping BGP routes
/// regardless of LPM.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.hasBgpOverride")]
public bool? HasBgpOverride {get; private set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.NextHop != null)
{
this.NextHop.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.Network.Models
{
using System.Linq;

/// <summary>
/// The next hop for an ECMP route.
/// </summary>
public partial class RouteNextHopEcmp
{
/// <summary>
/// Initializes a new instance of the RouteNextHopEcmp class.
/// </summary>
public RouteNextHopEcmp()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the RouteNextHopEcmp class.
/// </summary>

/// <param name="nextHopIPAddresses">A list of IP addresses for equal-cost multi-path (ECMP) routing. At least
/// two addresses are required. Traffic will be load-balanced across all
/// specified next hop addresses.
/// </param>
public RouteNextHopEcmp(System.Collections.Generic.IList<string> nextHopIPAddresses)
{
this.NextHopIPAddresses = nextHopIPAddresses;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();


/// <summary>
/// Gets or sets a list of IP addresses for equal-cost multi-path (ECMP)
/// routing. At least two addresses are required. Traffic will be load-balanced
/// across all specified next hop addresses.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "nextHopIpAddresses")]
public System.Collections.Generic.IList<string> NextHopIPAddresses {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (this.NextHopIPAddresses == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NextHopIPAddresses");
}
if (this.NextHopIPAddresses != null)
{
if (this.NextHopIPAddresses.Count < 2)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinItems, "NextHopIPAddresses", 2);
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ public static class RouteNextHopType
public const string Internet = "Internet";
public const string VirtualAppliance = "VirtualAppliance";
public const string None = "None";
public const string VirtualApplianceEcmp = "VirtualApplianceEcmp";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ public RoutePropertiesFormat()
/// <param name="addressPrefix">The destination CIDR to which the route applies.
/// </param>

/// <param name="nextHopType">The type of Azure hop the packet should be sent to.
/// <param name="nextHopType">The type of Azure hop the packet should be sent to. When set to
/// &#39;VirtualAppliance&#39;, the &#39;nextHopIpAddress&#39; property is required and
/// &#39;nextHop&#39; must not be set. When set to &#39;VirtualApplianceEcmp&#39;, the
/// &#39;nextHop&#39; property is required and &#39;nextHopIpAddress&#39; must not be set.
/// Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;,
/// &#39;VirtualAppliance&#39;, &#39;None&#39;</param>
/// &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;</param>

/// <param name="nextHopIPAddress">The IP address packets should be forwarded to. Next hop values are only
/// allowed in routes where the next hop type is VirtualAppliance.
/// <param name="nextHopIPAddress">The IP address packets should be forwarded to. Required when nextHopType is
/// &#39;VirtualAppliance&#39;. Must not be set when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;; use the &#39;nextHop&#39; property instead for ECMP routes.
/// </param>

/// <param name="nextHop">The next hop for an ECMP route. Required when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;. Must not be set for other nextHopType values.
/// </param>

/// <param name="provisioningState">The provisioning state of the route resource.
Expand All @@ -42,12 +50,12 @@ public RoutePropertiesFormat()
/// <param name="hasBgpOverride">A value indicating whether this route overrides overlapping BGP routes
/// regardless of LPM.
/// </param>
public RoutePropertiesFormat(string nextHopType, string addressPrefix = default(string), string nextHopIPAddress = default(string), string provisioningState = default(string), bool? hasBgpOverride = default(bool?))

public RoutePropertiesFormat(string nextHopType, string addressPrefix = default(string), string nextHopIPAddress = default(string), RouteNextHopEcmp nextHop = default(RouteNextHopEcmp), string provisioningState = default(string), bool? hasBgpOverride = default(bool?))
{
this.AddressPrefix = addressPrefix;
this.NextHopType = nextHopType;
this.NextHopIPAddress = nextHopIPAddress;
this.NextHop = nextHop;
this.ProvisioningState = provisioningState;
this.HasBgpOverride = hasBgpOverride;
CustomInit();
Expand All @@ -66,18 +74,29 @@ public RoutePropertiesFormat()
public string AddressPrefix {get; set; }

/// <summary>
/// Gets or sets the type of Azure hop the packet should be sent to. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;
/// Gets or sets the type of Azure hop the packet should be sent to. When set
/// to &#39;VirtualAppliance&#39;, the &#39;nextHopIpAddress&#39; property is required and
/// &#39;nextHop&#39; must not be set. When set to &#39;VirtualApplianceEcmp&#39;, the
/// &#39;nextHop&#39; property is required and &#39;nextHopIpAddress&#39; must not be set. Possible values include: &#39;VirtualNetworkGateway&#39;, &#39;VnetLocal&#39;, &#39;Internet&#39;, &#39;VirtualAppliance&#39;, &#39;None&#39;, &#39;VirtualApplianceEcmp&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "nextHopType")]
public string NextHopType {get; set; }

/// <summary>
/// Gets or sets the IP address packets should be forwarded to. Next hop values
/// are only allowed in routes where the next hop type is VirtualAppliance.
/// Gets or sets the IP address packets should be forwarded to. Required when
/// nextHopType is &#39;VirtualAppliance&#39;. Must not be set when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;; use the &#39;nextHop&#39; property instead for ECMP routes.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "nextHopIpAddress")]
public string NextHopIPAddress {get; set; }

/// <summary>
/// Gets or sets the next hop for an ECMP route. Required when nextHopType is
/// &#39;VirtualApplianceEcmp&#39;. Must not be set for other nextHopType values.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "nextHop")]
public RouteNextHopEcmp NextHop {get; set; }

/// <summary>
/// Gets the provisioning state of the route resource. Possible values include: &#39;Failed&#39;, &#39;Succeeded&#39;, &#39;Canceled&#39;, &#39;Creating&#39;, &#39;Updating&#39;, &#39;Deleting&#39;
/// </summary>
Expand All @@ -103,8 +122,10 @@ public virtual void Validate()
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NextHopType");
}



if (this.NextHop != null)
{
this.NextHop.Validate();
}

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
}


string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -362,7 +362,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}

string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -571,7 +571,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}

string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -763,7 +763,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}

string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -966,7 +966,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}

string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1166,7 +1166,7 @@ internal RouteTablesOperations (NetworkManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}

string apiVersion = "2025-05-01";
string apiVersion = "2025-07-01";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Loading
Loading