diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/api/Azure.ResourceManager.ManagedNetworkFabric.netstandard2.0.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/api/Azure.ResourceManager.ManagedNetworkFabric.netstandard2.0.cs index a3fef0710db2f..2d886a02c5f60 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/api/Azure.ResourceManager.ManagedNetworkFabric.netstandard2.0.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/api/Azure.ResourceManager.ManagedNetworkFabric.netstandard2.0.cs @@ -17,10 +17,16 @@ protected AccessControlListCollection() { } } public partial class AccessControlListData : Azure.ResourceManager.Models.TrackedResourceData { - public AccessControlListData(Azure.Core.AzureLocation location, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily addressFamily, System.Collections.Generic.IEnumerable conditions) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily AddressFamily { get { throw null; } set { } } + public AccessControlListData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public System.Uri AclsUri { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList Conditions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? ConfigurationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? DefaultAction { get { throw null; } set { } } + public System.Collections.Generic.IList DynamicMatchConfigurations { get { throw null; } } + public System.DateTimeOffset? LastSyncedOn { get { throw null; } } + public System.Collections.Generic.IList MatchConfigurations { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } } public partial class AccessControlListResource : Azure.ResourceManager.ArmResource @@ -38,10 +44,16 @@ protected AccessControlListResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ManagedNetworkFabric.Models.AccessControlListPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ManagedNetworkFabric.Models.AccessControlListPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.AccessControlListPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.AccessControlListPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ExternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -61,14 +73,16 @@ protected ExternalNetworkCollection() { } public partial class ExternalNetworkData : Azure.ResourceManager.Models.ResourceData { public ExternalNetworkData(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList DisabledOnResources { get { throw null; } } - public string ExportRoutePolicyId { get { throw null; } set { } } - public string ImportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy ExportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportRoutePolicyId { get { throw null; } set { } } public string NetworkToNetworkInterconnectId { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPropertiesOptionAProperties OptionAProperties { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties OptionBProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.L3OptionBProperties OptionBProperties { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption PeeringOption { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } } @@ -78,23 +92,17 @@ public partial class ExternalNetworkResource : Azure.ResourceManager.ArmResource protected ExternalNetworkResource() { } public virtual Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation ClearArpEntries(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearArpEntriesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearIPv6Neighbors(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearIPv6NeighborsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateBfdForBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateBfdForBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateStaticRouteBfdAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class InternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -114,20 +122,23 @@ protected InternalNetworkCollection() { } public partial class InternalNetworkData : Azure.ResourceManager.Models.ResourceData { public InternalNetworkData(int vlanId) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList BfdDisabledOnResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList BfdForStaticRoutesDisabledOnResources { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration BgpConfiguration { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList BgpDisabledOnResources { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPropertiesBgpConfiguration BgpConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } public System.Collections.Generic.IList ConnectedIPv4Subnets { get { throw null; } } public System.Collections.Generic.IList ConnectedIPv6Subnets { get { throw null; } } - public System.Collections.Generic.IReadOnlyList DisabledOnResources { get { throw null; } } - public string ExportRoutePolicyId { get { throw null; } set { } } - public string ImportRoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy ExportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Extension? Extension { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportRoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled? IsMonitoringEnabled { get { throw null; } set { } } public int? Mtu { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration StaticRouteConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPropertiesStaticRouteConfiguration StaticRouteConfiguration { get { throw null; } set { } } public int VlanId { get { throw null; } set { } } } public partial class InternalNetworkResource : Azure.ResourceManager.ArmResource @@ -136,25 +147,108 @@ public partial class InternalNetworkResource : Azure.ResourceManager.ArmResource protected InternalNetworkResource() { } public virtual Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation ClearArpEntries(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearArpEntriesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearIPv6Neighbors(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearIPv6NeighborsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateBfdForBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateBfdForBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateBfdForStaticRouteAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateBfdForStaticRouteAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateStaticRouteBfdAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class InternetGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected InternetGatewayCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string internetGatewayName, Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string internetGatewayName, Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class InternetGatewayData : Azure.ResourceManager.Models.TrackedResourceData + { + public InternetGatewayData(Azure.Core.AzureLocation location, Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType typePropertiesType, Azure.Core.ResourceIdentifier networkFabricControllerId) : base (default(Azure.Core.AzureLocation)) { } + public string Annotation { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier InternetGatewayRuleId { get { throw null; } set { } } + public string IPv4Address { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkFabricControllerId { get { throw null; } set { } } + public int? Port { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType TypePropertiesType { get { throw null; } set { } } + } + public partial class InternetGatewayResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected InternetGatewayResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string internetGatewayName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class InternetGatewayRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected InternetGatewayRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string internetGatewayRuleName, Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string internetGatewayRuleName, Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class InternetGatewayRuleData : Azure.ResourceManager.Models.TrackedResourceData + { + public InternetGatewayRuleData(Azure.Core.AzureLocation location, Azure.ResourceManager.ManagedNetworkFabric.Models.RuleProperties ruleProperties) : base (default(Azure.Core.AzureLocation)) { } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList InternetGatewayIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RuleProperties RuleProperties { get { throw null; } set { } } + } + public partial class InternetGatewayRuleResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected InternetGatewayRuleResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string internetGatewayRuleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRulePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRulePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class IPCommunityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -174,11 +268,11 @@ protected IPCommunityCollection() { } public partial class IPCommunityData : Azure.ResourceManager.Models.TrackedResourceData { public IPCommunityData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? Action { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList CommunityMembers { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPCommunityRules { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList WellKnownCommunities { get { throw null; } } } public partial class IPCommunityResource : Azure.ResourceManager.ArmResource { @@ -217,11 +311,12 @@ protected IPExtendedCommunityCollection() { } } public partial class IPExtendedCommunityData : Azure.ResourceManager.Models.TrackedResourceData { - public IPExtendedCommunityData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? Action { get { throw null; } set { } } + public IPExtendedCommunityData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable ipExtendedCommunityRules) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPExtendedCommunityRules { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList RouteTargets { get { throw null; } } } public partial class IPExtendedCommunityResource : Azure.ResourceManager.ArmResource { @@ -260,9 +355,11 @@ protected IPPrefixCollection() { } } public partial class IPPrefixData : Azure.ResourceManager.Models.TrackedResourceData { - public IPPrefixData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable ipPrefixRules) : base (default(Azure.Core.AzureLocation)) { } + public IPPrefixData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList IPPrefixRules { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPPrefixRules { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } } public partial class IPPrefixResource : Azure.ResourceManager.ArmResource @@ -302,14 +399,14 @@ protected L2IsolationDomainCollection() { } } public partial class L2IsolationDomainData : Azure.ResourceManager.Models.TrackedResourceData { - public L2IsolationDomainData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public L2IsolationDomainData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId, int vlanId) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList DisabledOnResources { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } public int? Mtu { get { throw null; } set { } } - public string NetworkFabricId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public int? VlanId { get { throw null; } set { } } + public int VlanId { get { throw null; } set { } } } public partial class L2IsolationDomainResource : Azure.ResourceManager.ArmResource { @@ -319,25 +416,23 @@ protected L2IsolationDomainResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearArpTable(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearArpTableAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearNeighborTable(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearNeighborTableAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CommitConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CommitConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l2IsolationDomainName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation> GetArpEntries(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetArpEntriesAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.L2IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.L2IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class L3IsolationDomainCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -356,15 +451,13 @@ protected L3IsolationDomainCollection() { } } public partial class L3IsolationDomainData : Azure.ResourceManager.Models.TrackedResourceData { - public L3IsolationDomainData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public L3IsolationDomainData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.AggregateRouteConfiguration AggregateRouteConfiguration { get { throw null; } set { } } public string Annotation { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList DisabledOnResources { get { throw null; } } - public string NetworkFabricId { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList OptionBDisabledOnResources { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet? RedistributeConnectedSubnets { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute? RedistributeStaticRoutes { get { throw null; } set { } } @@ -377,10 +470,8 @@ protected L3IsolationDomainResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearArpTable(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearArpTableAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation ClearNeighborTable(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ClearNeighborTableAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CommitConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CommitConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -397,11 +488,11 @@ protected L3IsolationDomainResource() { } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateOptionBAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateOptionBAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class ManagedNetworkFabricExtensions { @@ -413,6 +504,18 @@ public static partial class ManagedNetworkFabricExtensions public static Azure.AsyncPageable GetAccessControlListsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkResource GetExternalNetworkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkResource GetInternalNetworkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetInternetGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetInternetGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayResource GetInternetGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetInternetGatewayRule(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetInternetGatewayRuleAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleResource GetInternetGatewayRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleCollection GetInternetGatewayRules(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetInternetGatewayRules(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetInternetGatewayRulesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayCollection GetInternetGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetInternetGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetInternetGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.IPCommunityCollection GetIPCommunities(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetIPCommunities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetIPCommunitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -443,6 +546,12 @@ public static partial class ManagedNetworkFabricExtensions public static Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainCollection GetL3IsolationDomains(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetL3IsolationDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetL3IsolationDomainsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNeighborGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNeighborGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupResource GetNeighborGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupCollection GetNeighborGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNeighborGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNeighborGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetNetworkDevice(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkDeviceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkDeviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceResource GetNetworkDeviceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -470,16 +579,30 @@ public static partial class ManagedNetworkFabricExtensions public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuResource GetNetworkFabricSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuCollection GetNetworkFabricSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceResource GetNetworkInterfaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkPacketBroker(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkPacketBrokerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerResource GetNetworkPacketBrokerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerCollection GetNetworkPacketBrokers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkPacketBrokers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkPacketBrokersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetNetworkRack(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkRackAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackResource GetNetworkRackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackCollection GetNetworkRacks(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkRacks(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNetworkRacksAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetNetworkRackSku(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetNetworkRackSkuAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackSkuResource GetNetworkRackSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackSkuCollection GetNetworkRackSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.Response GetNetworkTap(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkTapAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapResource GetNetworkTapResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkTapRule(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkTapRuleAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleResource GetNetworkTapRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleCollection GetNetworkTapRules(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkTapRules(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkTapRulesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapCollection GetNetworkTaps(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkTaps(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkTapsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectResource GetNetworkToNetworkInterconnectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyCollection GetRoutePolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetRoutePolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -488,6 +611,50 @@ public static partial class ManagedNetworkFabricExtensions public static System.Threading.Tasks.Task> GetRoutePolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyResource GetRoutePolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } + public partial class NeighborGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeighborGroupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neighborGroupName, Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neighborGroupName, Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeighborGroupData : Azure.ResourceManager.Models.TrackedResourceData + { + public NeighborGroupData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupDestination Destination { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList NetworkTapIds { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkTapRuleIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NeighborGroupResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeighborGroupResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string neighborGroupName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NetworkDeviceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NetworkDeviceCollection() { } @@ -506,9 +673,13 @@ protected NetworkDeviceCollection() { } public partial class NetworkDeviceData : Azure.ResourceManager.Models.TrackedResourceData { public NetworkDeviceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } public string HostName { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType? NetworkDeviceRole { get { throw null; } set { } } + public string ManagementIPv4Address { get { throw null; } } + public string ManagementIPv6Address { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole? NetworkDeviceRole { get { throw null; } } public string NetworkDeviceSku { get { throw null; } set { } } public string NetworkRackId { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } @@ -526,29 +697,25 @@ protected NetworkDeviceResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkDeviceName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation GenerateSupportPackage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GenerateSupportPackageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkInterface(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkInterfaceAsync(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceCollection GetNetworkInterfaces() { throw null; } - public virtual Azure.ResourceManager.ArmOperation GetStatus(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetStatusAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Reboot(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RebootAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reboot(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.RebootProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RebootAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.RebootProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RefreshConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RestoreConfig(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RestoreConfigAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDevicePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateDeviceAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateDeviceAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDevicePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdatePowerCycle(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdatePowerCycleProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdatePowerCycleAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdatePowerCycleProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersionProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersionProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Upgrade(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersion body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersion body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class NetworkDeviceSkuCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -567,7 +734,6 @@ public partial class NetworkDeviceSkuData : Azure.ResourceManager.Models.Resourc { public NetworkDeviceSkuData(string model) { } public System.Collections.Generic.IList Interfaces { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceLimits Limits { get { throw null; } set { } } public string Manufacturer { get { throw null; } set { } } public string Model { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } @@ -619,16 +785,18 @@ public partial class NetworkFabricControllerData : Azure.ResourceManager.Models. public NetworkFabricControllerData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public string Annotation { get { throw null; } set { } } public System.Collections.Generic.IList InfrastructureExpressRouteConnections { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.InfrastructureServices InfrastructureServices { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ControllerServices InfrastructureServices { get { throw null; } } public string IPv4AddressSpace { get { throw null; } set { } } public string IPv6AddressSpace { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled? IsWorkloadManagementNetworkEnabled { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ManagedResourceGroupConfiguration ManagedResourceGroupConfiguration { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList NetworkFabricIds { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState? OperationalState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkFabricIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku? NfcSku { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList TenantInternetGatewayIds { get { throw null; } } public System.Collections.Generic.IList WorkloadExpressRouteConnections { get { throw null; } } public bool? WorkloadManagementNetwork { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.WorkloadServices WorkloadServices { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ControllerServices WorkloadServices { get { throw null; } } } public partial class NetworkFabricControllerResource : Azure.ResourceManager.ArmResource { @@ -641,10 +809,6 @@ protected NetworkFabricControllerResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkFabricControllerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DisableWorkloadManagementNetwork(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DisableWorkloadManagementNetworkAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation EnableWorkloadManagementNetwork(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task EnableWorkloadManagementNetworkAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -656,22 +820,24 @@ protected NetworkFabricControllerResource() { } } public partial class NetworkFabricData : Azure.ResourceManager.Models.TrackedResourceData { - public NetworkFabricData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public NetworkFabricData(Azure.Core.AzureLocation location, string networkFabricSku, Azure.Core.ResourceIdentifier networkFabricControllerId, int serverCountPerRack, string ipv4Prefix, long fabricASN, Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration terminalServerConfiguration, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfigurationProperties managementNetworkConfiguration) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public int? FabricASN { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public long FabricASN { get { throw null; } set { } } + public string FabricVersion { get { throw null; } } public string IPv4Prefix { get { throw null; } set { } } public string IPv6Prefix { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList L2IsolationDomains { get { throw null; } } public System.Collections.Generic.IReadOnlyList L3IsolationDomains { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfiguration ManagementNetworkConfiguration { get { throw null; } set { } } - public string NetworkFabricControllerId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfigurationProperties ManagementNetworkConfiguration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkFabricControllerId { get { throw null; } set { } } public string NetworkFabricSku { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState? OperationalState { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } public int? RackCount { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Racks { get { throw null; } } - public string RouterId { get { throw null; } } - public int? ServerCountPerRack { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList RouterIds { get { throw null; } } + public int ServerCountPerRack { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration TerminalServerConfiguration { get { throw null; } set { } } } public partial class NetworkFabricResource : Azure.ResourceManager.ArmResource @@ -682,24 +848,38 @@ protected NetworkFabricResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CommitConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CommitConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkFabricName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Deprovision(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeprovisionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deprovision(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeprovisionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkToNetworkInterconnect(string networkToNetworkInterconnectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkToNetworkInterconnectAsync(string networkToNetworkInterconnectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectCollection GetNetworkToNetworkInterconnects() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Provision(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ProvisionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetTopology(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTopologyAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Provision(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ProvisionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RefreshConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateInfraManagementBfdConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateInfraManagementBfdConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateWorkloadManagementBfdConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateWorkloadManagementBfdConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Upgrade(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersion body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateVersion body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class NetworkFabricSkuCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -717,12 +897,12 @@ protected NetworkFabricSkuCollection() { } public partial class NetworkFabricSkuData : Azure.ResourceManager.Models.ResourceData { public NetworkFabricSkuData() { } - public System.Uri DetailsUri { get { throw null; } } + public string Details { get { throw null; } } public int? MaxComputeRacks { get { throw null; } set { } } - public string MaxSupportedVer { get { throw null; } } - public string MinSupportedVer { get { throw null; } } + public int? MaximumServerCount { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public string TypePropertiesType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedVersions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType? TypePropertiesType { get { throw null; } } } public partial class NetworkFabricSkuResource : Azure.ResourceManager.ArmResource { @@ -752,7 +932,7 @@ protected NetworkInterfaceCollection() { } public partial class NetworkInterfaceData : Azure.ResourceManager.Models.ResourceData { public NetworkInterfaceData() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } public string ConnectedTo { get { throw null; } } public Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType? InterfaceType { get { throw null; } } @@ -772,13 +952,56 @@ protected NetworkInterfaceResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation GetStatus(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetStatusAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkInterfacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkInterfacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetworkPacketBrokerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkPacketBrokerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkPacketBrokerName, Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkPacketBrokerName, Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string networkPacketBrokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetworkPacketBrokerData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkPacketBrokerData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public System.Collections.Generic.IReadOnlyList NeighborGroupIds { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkDeviceIds { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList NetworkTapIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SourceInterfaceIds { get { throw null; } } + } + public partial class NetworkPacketBrokerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkPacketBrokerResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkPacketBrokerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkPacketBrokerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkPacketBrokerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NetworkRackCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NetworkRackCollection() { } @@ -796,11 +1019,11 @@ protected NetworkRackCollection() { } } public partial class NetworkRackData : Azure.ResourceManager.Models.TrackedResourceData { - public NetworkRackData(Azure.Core.AzureLocation location, string networkRackSku, string networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public NetworkRackData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId) : base (default(Azure.Core.AzureLocation)) { } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList NetworkDevices { get { throw null; } } - public string NetworkFabricId { get { throw null; } set { } } - public string NetworkRackSku { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList NetworkDevices { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType? NetworkRackType { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } } public partial class NetworkRackResource : Azure.ResourceManager.ArmResource @@ -823,38 +1046,112 @@ protected NetworkRackResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class NetworkRackSkuCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected NetworkRackSkuCollection() { } - public virtual Azure.Response Exists(string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string networkRackSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public partial class NetworkTapCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkTapCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkTapName, Azure.ResourceManager.ManagedNetworkFabric.NetworkTapData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkTapName, Azure.ResourceManager.ManagedNetworkFabric.NetworkTapData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string networkTapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class NetworkRackSkuData : Azure.ResourceManager.Models.ResourceData + public partial class NetworkTapData : Azure.ResourceManager.Models.TrackedResourceData { - public NetworkRackSkuData(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName roleName) { } - public int? MaximumServerCount { get { throw null; } set { } } - public int? MaximumStorageCount { get { throw null; } set { } } - public int? MaximumUplinks { get { throw null; } set { } } - public System.Collections.Generic.IList NetworkDevices { get { throw null; } } + public NetworkTapData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkPacketBrokerId, System.Collections.Generic.IEnumerable destinations) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkPacketBrokerId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType? PollingType { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName RoleName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SourceTapRuleId { get { throw null; } } } - public partial class NetworkRackSkuResource : Azure.ResourceManager.ArmResource + public partial class NetworkTapResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected NetworkRackSkuResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkRackSkuData Data { get { throw null; } } + protected NetworkTapResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkTapData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string networkRackSkuName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkTapName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkTapRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkTapRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkTapRuleName, Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkTapRuleName, Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string networkTapRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetworkTapRuleData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkTapRuleData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? ConfigurationType { get { throw null; } set { } } + public System.Collections.Generic.IList DynamicMatchConfigurations { get { throw null; } } + public System.DateTimeOffset? LastSyncedOn { get { throw null; } } + public System.Collections.Generic.IList MatchConfigurations { get { throw null; } } + public string NetworkTapId { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond? PollingIntervalInSeconds { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Uri TapRulesUri { get { throw null; } set { } } + } + public partial class NetworkTapRuleResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkTapRuleResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkTapRuleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResyncAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapRulePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapRulePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class NetworkToNetworkInterconnectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -873,14 +1170,20 @@ protected NetworkToNetworkInterconnectCollection() { } } public partial class NetworkToNetworkInterconnectData : Azure.ResourceManager.Models.ResourceData { - public NetworkToNetworkInterconnectData() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? IsManagementType { get { throw null; } set { } } + public NetworkToNetworkInterconnectData(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty useOptionB) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicyInformation ExportRoutePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicyInformation ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType? IsManagementType { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration Layer2Configuration { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3Configuration Layer3Configuration { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.NniType? NniType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NpbStaticRouteConfiguration NpbStaticRouteConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration OptionBLayer3Configuration { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? UseOptionB { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty UseOptionB { get { throw null; } set { } } } public partial class NetworkToNetworkInterconnectResource : Azure.ResourceManager.ArmResource { @@ -893,8 +1196,12 @@ protected NetworkToNetworkInterconnectResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateNpbStaticRouteBfdAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateNpbStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class RoutePolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -913,8 +1220,13 @@ protected RoutePolicyCollection() { } } public partial class RoutePolicyData : Azure.ResourceManager.Models.TrackedResourceData { - public RoutePolicyData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable statements) : base (default(Azure.Core.AzureLocation)) { } + public RoutePolicyData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType? AddressFamilyType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? DefaultAction { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Statements { get { throw null; } } } @@ -926,6 +1238,8 @@ protected RoutePolicyResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CommitConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CommitConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string routePolicyName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -936,29 +1250,91 @@ protected RoutePolicyResource() { } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeState body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class AccessControlListConditionProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource + public partial class AccessControlListAction + { + public AccessControlListAction() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType? AclActionType { get { throw null; } set { } } + public string CounterName { get { throw null; } set { } } + } + public partial class AccessControlListMatchCondition : Azure.ResourceManager.ManagedNetworkFabric.Models.CommonMatchConditions + { + public AccessControlListMatchCondition() { } + public System.Collections.Generic.IList DscpMarkings { get { throw null; } } + public System.Collections.Generic.IList EtherTypes { get { throw null; } } + public System.Collections.Generic.IList Fragments { get { throw null; } } + public System.Collections.Generic.IList IPLengths { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AccessControlListPortCondition PortCondition { get { throw null; } set { } } + public System.Collections.Generic.IList TtlValues { get { throw null; } } + } + public partial class AccessControlListMatchConfiguration { - public AccessControlListConditionProperties(int sequenceNumber, Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType action, string destinationAddress, string destinationPort, string sourceAddress, string sourcePort, int protocol) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType Action { get { throw null; } set { } } - public string DestinationAddress { get { throw null; } set { } } - public string DestinationPort { get { throw null; } set { } } - public int Protocol { get { throw null; } set { } } - public int SequenceNumber { get { throw null; } set { } } - public string SourceAddress { get { throw null; } set { } } - public string SourcePort { get { throw null; } set { } } + public AccessControlListMatchConfiguration() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType? IPAddressType { get { throw null; } set { } } + public System.Collections.Generic.IList MatchConditions { get { throw null; } } + public string MatchConfigurationName { get { throw null; } set { } } + public long? SequenceNumber { get { throw null; } set { } } } - public partial class AccessControlListPatch + public partial class AccessControlListPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public AccessControlListPatch() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily? AddressFamily { get { throw null; } set { } } + public System.Uri AclsUri { get { throw null; } set { } } public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList Conditions { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? ConfigurationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? DefaultAction { get { throw null; } set { } } + public System.Collections.Generic.IList DynamicMatchConfigurations { get { throw null; } } + public System.Collections.Generic.IList MatchConfigurations { get { throw null; } } + } + public partial class AccessControlListPortCondition : Azure.ResourceManager.ManagedNetworkFabric.Models.PortCondition + { + public AccessControlListPortCondition(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol layer4Protocol) : base (default(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol)) { } + public System.Collections.Generic.IList Flags { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AclActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AclActionType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType Count { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType Drop { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType Log { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Action : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Action(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Action Allow { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Action Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.Action other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.Action left, Azure.ResourceManager.ManagedNetworkFabric.Models.Action right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.Action (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.Action left, Azure.ResourceManager.ManagedNetworkFabric.Models.Action right) { throw null; } + public override string ToString() { throw null; } } public partial class ActionIPCommunityProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.IPCommunityAddOperationProperties { @@ -973,21 +1349,21 @@ public ActionIPExtendedCommunityProperties() { } public System.Collections.Generic.IList SetIPExtendedCommunityIds { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AddressFamily : System.IEquatable + public readonly partial struct AddressFamilyType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AddressFamily(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily IPv4 { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily IPv6 { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily other) { throw null; } + public AddressFamilyType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType IPv4 { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType IPv6 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily left, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily left, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType left, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType left, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -996,8 +1372,10 @@ public ActionIPExtendedCommunityProperties() { } private readonly object _dummy; private readonly int _dummyPrimitive; public AdministrativeState(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState Disable { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState Enable { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState Disabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState Enabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState MAT { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState RMA { get { throw null; } } public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1010,7 +1388,7 @@ public ActionIPExtendedCommunityProperties() { } } public partial class AggregateRoute { - public AggregateRoute() { } + public AggregateRoute(string prefix) { } public string Prefix { get { throw null; } set { } } } public partial class AggregateRouteConfiguration @@ -1044,71 +1422,86 @@ public AnnotationResource() { } } public static partial class ArmManagedNetworkFabricModelFactory { - public static Azure.ResourceManager.ManagedNetworkFabric.AccessControlListData AccessControlListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily addressFamily = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily), System.Collections.Generic.IEnumerable conditions = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ARPProperties ARPProperties(string address = null, string age = null, string macAddress = null, string @interface = null, string state = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), int? interval = default(int?), int? multiplier = default(int?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration BgpConfiguration(string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? defaultRouteOriginate = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty?), int? allowAS = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride? allowASOverride = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride?), int? fabricASN = default(int?), int peerASN = 0, System.Collections.Generic.IEnumerable ipv4ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv6ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv4NeighborAddress = null, System.Collections.Generic.IEnumerable ipv6NeighborAddress = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkData ExternalNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, string networkToNetworkInterconnectId = null, System.Collections.Generic.IEnumerable disabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption), Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties optionBProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPropertiesOptionAProperties optionAProperties = null, string importRoutePolicyId = null, string exportRoutePolicyId = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPropertiesOptionAProperties ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = default(int?), int? vlanId = default(int?), int? fabricASN = default(int?), int? peerASN = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.FabricBfdConfiguration FabricBfdConfiguration(int? interval = default(int?), int? multiplier = default(int?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.GetDeviceStatusProperties GetDeviceStatusProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus operationalStatus = default(Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus), Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState powerCycleState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState), string serialNumber = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.InfrastructureServices InfrastructureServices(System.Collections.Generic.IEnumerable ipv4AddressSpaces = null, System.Collections.Generic.IEnumerable ipv6AddressSpaces = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceStatus InterfaceStatus(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), string operationalStatus = null, string phyStatus = null, string transceiverStatus = null, string connectedTo = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkData InternalNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, int? mtu = default(int?), System.Collections.Generic.IEnumerable connectedIPv4Subnets = null, System.Collections.Generic.IEnumerable connectedIPv6Subnets = null, Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration staticRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration bgpConfiguration = null, string importRoutePolicyId = null, string exportRoutePolicyId = null, System.Collections.Generic.IEnumerable disabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), System.Collections.Generic.IEnumerable bgpDisabledOnResources = null, System.Collections.Generic.IEnumerable bfdDisabledOnResources = null, System.Collections.Generic.IEnumerable bfdForStaticRoutesDisabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), int vlanId = 0) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPCommunityData IPCommunityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? action = default(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType?), System.Collections.Generic.IEnumerable wellKnownCommunities = null, System.Collections.Generic.IEnumerable communityMembers = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityData IPExtendedCommunityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? action = default(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType?), System.Collections.Generic.IEnumerable routeTargets = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPPrefixData IPPrefixData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable ipPrefixRules = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainData L2IsolationDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, string networkFabricId = null, int? vlanId = default(int?), int? mtu = default(int?), System.Collections.Generic.IEnumerable disabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainData L3IsolationDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet? redistributeConnectedSubnets = default(Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet?), Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute? redistributeStaticRoutes = default(Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute?), Azure.ResourceManager.ManagedNetworkFabric.Models.AggregateRouteConfiguration aggregateRouteConfiguration = null, string description = null, Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy = null, string networkFabricId = null, System.Collections.Generic.IEnumerable disabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), System.Collections.Generic.IEnumerable optionBDisabledOnResources = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(string exportRoutePolicyId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration Layer2Configuration(int? portCount = default(int?), int mtu = 0, System.Collections.Generic.IEnumerable interfaces = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3Configuration Layer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, string importRoutePolicyId = null, string exportRoutePolicyId = null, int? peerASN = default(int?), int? vlanId = default(int?), int? fabricASN = default(int?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3OptionAProperties Layer3OptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = default(int?), int? vlanId = default(int?), int? fabricASN = default(int?), int? peerASN = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborAddress NeighborAddress(string address = null, string operationalState = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceData NetworkDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, string hostName = null, string serialNumber = null, string version = null, string networkDeviceSku = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType? networkDeviceRole = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), string networkRackId = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceSkuData NetworkDeviceSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string model = null, string manufacturer = null, System.Collections.Generic.IEnumerable supportedVersions = null, Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceLimits limits = null, System.Collections.Generic.IEnumerable supportedRoleTypes = null, System.Collections.Generic.IEnumerable interfaces = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricControllerData NetworkFabricControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable infrastructureExpressRouteConnections = null, System.Collections.Generic.IEnumerable workloadExpressRouteConnections = null, Azure.ResourceManager.ManagedNetworkFabric.Models.InfrastructureServices infrastructureServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.WorkloadServices workloadServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, System.Collections.Generic.IEnumerable networkFabricIds = null, bool? workloadManagementNetwork = default(bool?), string ipv4AddressSpace = null, string ipv6AddressSpace = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState? operationalState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricData NetworkFabricData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable racks = null, System.Collections.Generic.IEnumerable l2IsolationDomains = null, System.Collections.Generic.IEnumerable l3IsolationDomains = null, string networkFabricSku = null, int? rackCount = default(int?), int? serverCountPerRack = default(int?), string ipv4Prefix = null, string ipv6Prefix = null, string routerId = null, int? fabricASN = default(int?), string networkFabricControllerId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration terminalServerConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfiguration managementNetworkConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState? operationalState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuData NetworkFabricSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string typePropertiesType = null, int? maxComputeRacks = default(int?), string minSupportedVer = null, string maxSupportedVer = null, System.Uri detailsUri = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceData NetworkInterfaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, string physicalIdentifier = null, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), string connectedTo = null, Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType? interfaceType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType?), string ipv4Address = null, string ipv6Address = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData NetworkRackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, string networkRackSku = null, string networkFabricId = null, System.Collections.Generic.IEnumerable networkDevices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackSkuData NetworkRackSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName roleName = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName), int? maximumServerCount = default(int?), int? maximumStorageCount = default(int?), int? maximumUplinks = default(int?), System.Collections.Generic.IEnumerable networkDevices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectData NetworkToNetworkInterconnectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NniType? nniType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NniType?), Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? isManagementType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty?), Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? useOptionB = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty?), Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration layer2Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3Configuration layer3Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyData RoutePolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable statements = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.SupportPackageProperties SupportPackageProperties(string supportPackageURL = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration TerminalServerConfiguration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, string networkDeviceId = null, string username = null, string password = null, string serialNumber = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties VpnConfigurationProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState?), string networkToNetworkInterconnectId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOptionBProperties optionBProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOptionAProperties optionAProperties = null) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.WorkloadServices WorkloadServices(System.Collections.Generic.IEnumerable ipv4AddressSpaces = null, System.Collections.Generic.IEnumerable ipv6AddressSpaces = null) { throw null; } - } - public partial class ARPProperties - { - internal ARPProperties() { } - public string Address { get { throw null; } } - public string Age { get { throw null; } } - public string Interface { get { throw null; } } - public string MacAddress { get { throw null; } } - public string State { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.AccessControlListData AccessControlListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? configurationType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType?), System.Uri aclsUri = null, Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? defaultAction = default(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType?), System.Collections.Generic.IEnumerable matchConfigurations = null, System.Collections.Generic.IEnumerable dynamicMatchConfigurations = null, System.DateTimeOffset? lastSyncedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration(Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState?), int? intervalInMilliSeconds = default(int?), int? multiplier = default(int?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration BgpConfiguration(string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? defaultRouteOriginate = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty?), int? allowAS = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride? allowASOverride = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride?), long? fabricASN = default(long?), long? peerASN = default(long?), System.Collections.Generic.IEnumerable ipv4ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv6ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv4NeighborAddress = null, System.Collections.Generic.IEnumerable ipv6NeighborAddress = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.CommonPostActionResponseForDeviceUpdate CommonPostActionResponseForDeviceUpdate(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), System.Collections.Generic.IEnumerable successfulDevices = null, System.Collections.Generic.IEnumerable failedDevices = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.CommonPostActionResponseForStateUpdate CommonPostActionResponseForStateUpdate(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ControllerServices ControllerServices(System.Collections.Generic.IEnumerable ipv4AddressSpaces = null, System.Collections.Generic.IEnumerable ipv6AddressSpaces = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ErrorResponse ErrorResponse(Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkData ExternalNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, Azure.Core.ResourceIdentifier importRoutePolicyId = null, Azure.Core.ResourceIdentifier exportRoutePolicyId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy importRoutePolicy = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy exportRoutePolicy = null, string networkToNetworkInterconnectId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption), Azure.ResourceManager.ManagedNetworkFabric.Models.L3OptionBProperties optionBProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPropertiesOptionAProperties optionAProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPatchPropertiesOptionAProperties ExternalNetworkPatchPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = default(int?), int? vlanId = default(int?), long? fabricASN = default(long?), long? peerASN = default(long?), Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.Core.ResourceIdentifier ingressAclId = null, Azure.Core.ResourceIdentifier egressAclId = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPropertiesOptionAProperties ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = default(int?), int? vlanId = default(int?), long? fabricASN = default(long?), long? peerASN = default(long?), Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.Core.ResourceIdentifier ingressAclId = null, Azure.Core.ResourceIdentifier egressAclId = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkData InternalNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, int? mtu = default(int?), System.Collections.Generic.IEnumerable connectedIPv4Subnets = null, System.Collections.Generic.IEnumerable connectedIPv6Subnets = null, Azure.Core.ResourceIdentifier importRoutePolicyId = null, Azure.Core.ResourceIdentifier exportRoutePolicyId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy importRoutePolicy = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy exportRoutePolicy = null, Azure.Core.ResourceIdentifier ingressAclId = null, Azure.Core.ResourceIdentifier egressAclId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled? isMonitoringEnabled = default(Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled?), Azure.ResourceManager.ManagedNetworkFabric.Models.Extension? extension = default(Azure.ResourceManager.ManagedNetworkFabric.Models.Extension?), int vlanId = 0, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPropertiesBgpConfiguration bgpConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkPropertiesBgpConfiguration InternalNetworkPropertiesBgpConfiguration(string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? defaultRouteOriginate = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty?), int? allowAS = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride? allowASOverride = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride?), long? fabricASN = default(long?), long? peerASN = default(long?), System.Collections.Generic.IEnumerable ipv4ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv6ListenRangePrefixes = null, System.Collections.Generic.IEnumerable ipv4NeighborAddress = null, System.Collections.Generic.IEnumerable ipv6NeighborAddress = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayData InternetGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.Core.ResourceIdentifier internetGatewayRuleId = null, string ipv4Address = null, int? port = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType typePropertiesType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType), Azure.Core.ResourceIdentifier networkFabricControllerId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.InternetGatewayRuleData InternetGatewayRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.RuleProperties ruleProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), System.Collections.Generic.IEnumerable internetGatewayIds = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.IPCommunityData IPCommunityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable ipCommunityRules = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityData IPExtendedCommunityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable ipExtendedCommunityRules = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.IPPrefixData IPPrefixData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable ipPrefixRules = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainData L2IsolationDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.Core.ResourceIdentifier networkFabricId = null, int vlanId = 0, int? mtu = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainData L3IsolationDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet? redistributeConnectedSubnets = default(Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet?), Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute? redistributeStaticRoutes = default(Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute?), Azure.ResourceManager.ManagedNetworkFabric.Models.AggregateRouteConfiguration aggregateRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy = null, Azure.Core.ResourceIdentifier networkFabricId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborAddress NeighborAddress(string address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NeighborGroupData NeighborGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupDestination destination = null, System.Collections.Generic.IEnumerable networkTapIds = null, System.Collections.Generic.IEnumerable networkTapRuleIds = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceData NetworkDeviceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, string hostName = null, string serialNumber = null, string version = null, string networkDeviceSku = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole? networkDeviceRole = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole?), string networkRackId = null, string managementIPv4Address = null, string managementIPv6Address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceSkuData NetworkDeviceSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string model = null, string manufacturer = null, System.Collections.Generic.IEnumerable supportedVersions = null, System.Collections.Generic.IEnumerable supportedRoleTypes = null, System.Collections.Generic.IEnumerable interfaces = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricControllerData NetworkFabricControllerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, System.Collections.Generic.IEnumerable infrastructureExpressRouteConnections = null, System.Collections.Generic.IEnumerable workloadExpressRouteConnections = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ControllerServices infrastructureServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ControllerServices workloadServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, System.Collections.Generic.IEnumerable networkFabricIds = null, bool? workloadManagementNetwork = default(bool?), Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled? isWorkloadManagementNetworkEnabled = default(Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled?), System.Collections.Generic.IEnumerable tenantInternetGatewayIds = null, string ipv4AddressSpace = null, string ipv6AddressSpace = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku? nfcSku = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricData NetworkFabricData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, string networkFabricSku = null, string fabricVersion = null, System.Collections.Generic.IEnumerable routerIds = null, Azure.Core.ResourceIdentifier networkFabricControllerId = null, int? rackCount = default(int?), int serverCountPerRack = 0, string ipv4Prefix = null, string ipv6Prefix = null, long fabricASN = (long)0, Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration terminalServerConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfigurationProperties managementNetworkConfiguration = null, System.Collections.Generic.IEnumerable racks = null, System.Collections.Generic.IEnumerable l2IsolationDomains = null, System.Collections.Generic.IEnumerable l3IsolationDomains = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuData NetworkFabricSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType? typePropertiesType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType?), int? maxComputeRacks = default(int?), int? maximumServerCount = default(int?), System.Collections.Generic.IEnumerable supportedVersions = null, string details = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceData NetworkInterfaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string annotation = null, string physicalIdentifier = null, string connectedTo = null, Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType? interfaceType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType?), string ipv4Address = null, string ipv6Address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkPacketBrokerData NetworkPacketBrokerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier networkFabricId = null, System.Collections.Generic.IEnumerable networkDeviceIds = null, System.Collections.Generic.IEnumerable sourceInterfaceIds = null, System.Collections.Generic.IEnumerable networkTapIds = null, System.Collections.Generic.IEnumerable neighborGroupIds = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData NetworkRackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType? networkRackType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType?), Azure.Core.ResourceIdentifier networkFabricId = null, System.Collections.Generic.IEnumerable networkDevices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapData NetworkTapData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.Core.ResourceIdentifier networkPacketBrokerId = null, Azure.Core.ResourceIdentifier sourceTapRuleId = null, System.Collections.Generic.IEnumerable destinations = null, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType? pollingType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType?), Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleData NetworkTapRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? configurationType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType?), System.Uri tapRulesUri = null, System.Collections.Generic.IEnumerable matchConfigurations = null, System.Collections.Generic.IEnumerable dynamicMatchConfigurations = null, string networkTapId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond? pollingIntervalInSeconds = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond?), System.DateTimeOffset? lastSyncedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkToNetworkInterconnectData NetworkToNetworkInterconnectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NniType? nniType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NniType?), Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType? isManagementType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType?), Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty useOptionB = default(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty), Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration layer2Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NpbStaticRouteConfiguration npbStaticRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicyInformation importRoutePolicy = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicyInformation exportRoutePolicy = null, Azure.Core.ResourceIdentifier egressAclId = null, Azure.Core.ResourceIdentifier ingressAclId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPatch NetworkToNetworkInterconnectPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration layer2Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBLayer3Configuration optionBLayer3Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NpbStaticRouteConfiguration npbStaticRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicyInformation importRoutePolicy = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicyInformation exportRoutePolicy = null, Azure.Core.ResourceIdentifier egressAclId = null, Azure.Core.ResourceIdentifier ingressAclId = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, long? peerASN = default(long?), int? vlanId = default(int?), long? fabricASN = default(long?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBLayer3Configuration OptionBLayer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, long? peerASN = default(long?), int? vlanId = default(int?), long? fabricASN = default(long?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyData RoutePolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? defaultAction = default(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType?), System.Collections.Generic.IEnumerable statements = null, Azure.Core.ResourceIdentifier networkFabricId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType? addressFamilyType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType?), Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration TerminalServerConfiguration(string username = null, string password = null, string serialNumber = null, string networkDeviceId = null, string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationResponse ValidateConfigurationResponse(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState?), System.Uri uri = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties VpnConfigurationProperties(Azure.Core.ResourceIdentifier networkToNetworkInterconnectId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState?), Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption), Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties optionBProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPropertiesOptionAProperties optionAProperties = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BfdAdministrativeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BfdAdministrativeState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState Disabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState Enabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState MAT { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState RMA { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState right) { throw null; } + public override string ToString() { throw null; } } public partial class BfdConfiguration { public BfdConfiguration() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public int? Interval { get { throw null; } } - public int? Multiplier { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdAdministrativeState? AdministrativeState { get { throw null; } } + public int? IntervalInMilliSeconds { get { throw null; } set { } } + public int? Multiplier { get { throw null; } set { } } } public partial class BgpConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource { - public BgpConfiguration(int peerASN) { } + public BgpConfiguration() { } public int? AllowAS { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride? AllowASOverride { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? DefaultRouteOriginate { get { throw null; } set { } } - public int? FabricASN { get { throw null; } } + public long? FabricASN { get { throw null; } } public System.Collections.Generic.IList IPv4ListenRangePrefixes { get { throw null; } } public System.Collections.Generic.IList IPv4NeighborAddress { get { throw null; } } public System.Collections.Generic.IList IPv6ListenRangePrefixes { get { throw null; } } public System.Collections.Generic.IList IPv6NeighborAddress { get { throw null; } } - public int PeerASN { get { throw null; } set { } } + public long? PeerASN { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BooleanEnumProperty : System.IEquatable @@ -1128,6 +1521,32 @@ public BgpConfiguration(int peerASN) { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty left, Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty right) { throw null; } public override string ToString() { throw null; } } + public partial class CommonDynamicMatchConfiguration + { + public CommonDynamicMatchConfiguration() { } + public System.Collections.Generic.IList IPGroups { get { throw null; } } + public System.Collections.Generic.IList PortGroups { get { throw null; } } + public System.Collections.Generic.IList VlanGroups { get { throw null; } } + } + public partial class CommonMatchConditions + { + public CommonMatchConditions() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchCondition IPCondition { get { throw null; } set { } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VlanMatchCondition VlanMatchCondition { get { throw null; } set { } } + } + public partial class CommonPostActionResponseForDeviceUpdate : Azure.ResourceManager.ManagedNetworkFabric.Models.ErrorResponse + { + internal CommonPostActionResponseForDeviceUpdate() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList FailedDevices { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SuccessfulDevices { get { throw null; } } + } + public partial class CommonPostActionResponseForStateUpdate : Azure.ResourceManager.ManagedNetworkFabric.Models.ErrorResponse + { + internal CommonPostActionResponseForStateUpdate() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CommunityActionType : System.IEquatable { @@ -1155,6 +1574,7 @@ public BgpConfiguration(int peerASN) { } public static Azure.ResourceManager.ManagedNetworkFabric.Models.Condition EqualTo { get { throw null; } } public static Azure.ResourceManager.ManagedNetworkFabric.Models.Condition GreaterThanOrEqualTo { get { throw null; } } public static Azure.ResourceManager.ManagedNetworkFabric.Models.Condition LesserThanOrEqualTo { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Condition Range { get { throw null; } } public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.Condition other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1166,28 +1586,113 @@ public BgpConfiguration(int peerASN) { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ConditionActionType : System.IEquatable + public readonly partial struct ConfigurationState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ConditionActionType(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType Allow { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType Deny { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType other) { throw null; } + public ConfigurationState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Accepted { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState DeferredControl { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Deprovisioned { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Deprovisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState ErrorDeprovisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState ErrorProvisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Failed { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Provisioned { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Rejected { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConditionActionType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType File { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType Inline { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType right) { throw null; } public override string ToString() { throw null; } } public partial class ConnectedSubnet : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource { - public ConnectedSubnet() { } + public ConnectedSubnet(string prefix) { } public string Prefix { get { throw null; } set { } } } + public partial class ConnectedSubnetRoutePolicy + { + public ConnectedSubnetRoutePolicy() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.L3ExportRoutePolicy ExportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportRoutePolicyId { get { throw null; } set { } } + } + public partial class ControllerServices + { + internal ControllerServices() { } + public System.Collections.Generic.IReadOnlyList IPv4AddressSpaces { get { throw null; } } + public System.Collections.Generic.IReadOnlyList IPv6AddressSpaces { get { throw null; } } + } + public partial class DestinationProperties + { + public DestinationProperties() { } + public Azure.Core.ResourceIdentifier DestinationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DestinationTapRuleId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType? DestinationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainProperties IsolationDomainProperties { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DestinationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DestinationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType Direct { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType IsolationDomain { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeviceAdministrativeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeviceAdministrativeState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState GracefulQuarantine { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState Quarantine { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState Resync { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState RMA { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState right) { throw null; } + public override string ToString() { throw null; } + } public partial class DeviceInterfaceProperties { public DeviceInterfaceProperties() { } @@ -1195,86 +1700,187 @@ public DeviceInterfaceProperties() { } public string InterfaceType { get { throw null; } set { } } public System.Collections.Generic.IList SupportedConnectorTypes { get { throw null; } } } - public partial class DeviceLimits + public partial class EnableDisableOnResources { - public DeviceLimits() { } - public int? MaxBidirectionalForwardingDetectionPeers { get { throw null; } set { } } - public int? MaxBorderGatewayProtocolPeers { get { throw null; } set { } } - public int? MaxSubInterfaces { get { throw null; } set { } } - public int? MaxTunnelInterfaces { get { throw null; } set { } } - public int? MaxVirtualRouterFunctions { get { throw null; } set { } } - public int? PhysicalInterfaceCount { get { throw null; } set { } } + public EnableDisableOnResources() { } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EnabledDisabledState : System.IEquatable + public readonly partial struct EnableDisableState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnabledDisabledState(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState Disabled { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState other) { throw null; } + public EnableDisableState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState Disable { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState Enable { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState left, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState left, Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState left, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState left, Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState right) { throw null; } public override string ToString() { throw null; } } - public partial class EnableDisableOnResources + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Encapsulation : System.IEquatable { - public EnableDisableOnResources() { } - public System.Collections.Generic.IList ResourceIds { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Encapsulation(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation GRE { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation left, Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation left, Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EncapsulationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EncapsulationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType GTPv1 { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ErrorResponse + { + internal ErrorResponse() { } + public Azure.ResponseError Error { get { throw null; } } + } + public partial class ExportRoutePolicy + { + public ExportRoutePolicy() { } + public Azure.Core.ResourceIdentifier ExportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportIPv6RoutePolicyId { get { throw null; } set { } } + } + public partial class ExportRoutePolicyInformation + { + public ExportRoutePolicyInformation() { } + public Azure.Core.ResourceIdentifier ExportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportIPv6RoutePolicyId { get { throw null; } set { } } } public partial class ExpressRouteConnectionInformation { - public ExpressRouteConnectionInformation(string expressRouteCircuitId) { } + public ExpressRouteConnectionInformation(Azure.Core.ResourceIdentifier expressRouteCircuitId) { } public string ExpressRouteAuthorizationKey { get { throw null; } set { } } - public string ExpressRouteCircuitId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExpressRouteCircuitId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Extension : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Extension(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Extension NoExtension { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Extension NPB { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.Extension other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.Extension left, Azure.ResourceManager.ManagedNetworkFabric.Models.Extension right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.Extension (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.Extension left, Azure.ResourceManager.ManagedNetworkFabric.Models.Extension right) { throw null; } + public override string ToString() { throw null; } } public partial class ExternalNetworkPatch { public ExternalNetworkPatch() { } public string Annotation { get { throw null; } set { } } - public string ExportRoutePolicyId { get { throw null; } set { } } - public string ImportRoutePolicyId { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3OptionAProperties OptionAProperties { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties OptionBProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy ExportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkPatchPropertiesOptionAProperties OptionAProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.L3OptionBProperties OptionBProperties { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption? PeeringOption { get { throw null; } set { } } } - public partial class ExternalNetworkPropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3OptionAProperties + public partial class ExternalNetworkPatchPropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties + { + public ExternalNetworkPatchPropertiesOptionAProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public long? FabricASN { get { throw null; } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public int? Mtu { get { throw null; } set { } } + public long? PeerASN { get { throw null; } set { } } + public int? VlanId { get { throw null; } set { } } + } + public partial class ExternalNetworkPropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties { public ExternalNetworkPropertiesOptionAProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public long? FabricASN { get { throw null; } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public int? Mtu { get { throw null; } set { } } + public long? PeerASN { get { throw null; } set { } } + public int? VlanId { get { throw null; } set { } } } - public partial class FabricBfdConfiguration + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FabricSkuType : System.IEquatable { - public FabricBfdConfiguration() { } - public int? Interval { get { throw null; } } - public int? Multiplier { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FabricSkuType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType MultiRack { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType SingleRack { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType left, Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType left, Azure.ResourceManager.ManagedNetworkFabric.Models.FabricSkuType right) { throw null; } + public override string ToString() { throw null; } } - public partial class GetDeviceStatusProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GatewayType : System.IEquatable { - internal GetDeviceStatusProperties() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus OperationalStatus { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState PowerCycleState { get { throw null; } } - public string SerialNumber { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GatewayType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType Infrastructure { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType Workload { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType left, Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType left, Azure.ResourceManager.ManagedNetworkFabric.Models.GatewayType right) { throw null; } + public override string ToString() { throw null; } } - public partial class InfrastructureServices + public partial class ImportRoutePolicy { - internal InfrastructureServices() { } - public System.Collections.Generic.IReadOnlyList IPv4AddressSpaces { get { throw null; } } - public System.Collections.Generic.IReadOnlyList IPv6AddressSpaces { get { throw null; } } + public ImportRoutePolicy() { } + public Azure.Core.ResourceIdentifier ImportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportIPv6RoutePolicyId { get { throw null; } set { } } } - public partial class InterfaceStatus + public partial class ImportRoutePolicyInformation { - internal InterfaceStatus() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public string ConnectedTo { get { throw null; } } - public string OperationalStatus { get { throw null; } } - public string PhyStatus { get { throw null; } } - public string TransceiverStatus { get { throw null; } } + public ImportRoutePolicyInformation() { } + public Azure.Core.ResourceIdentifier ImportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportIPv6RoutePolicyId { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct InterfaceType : System.IEquatable @@ -1301,11 +1907,52 @@ public InternalNetworkPatch() { } public Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration BgpConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList ConnectedIPv4Subnets { get { throw null; } } public System.Collections.Generic.IList ConnectedIPv6Subnets { get { throw null; } } - public string ExportRoutePolicyId { get { throw null; } set { } } - public string ImportRoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicy ExportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportRoutePolicyId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicy ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportRoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled? IsMonitoringEnabled { get { throw null; } set { } } public int? Mtu { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration StaticRouteConfiguration { get { throw null; } set { } } } + public partial class InternalNetworkPropertiesBgpConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration + { + public InternalNetworkPropertiesBgpConfiguration() { } + } + public partial class InternalNetworkPropertiesStaticRouteConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration + { + public InternalNetworkPropertiesStaticRouteConfiguration() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Extension? Extension { get { throw null; } set { } } + } + public partial class InternetGatewayPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public InternetGatewayPatch() { } + public Azure.Core.ResourceIdentifier InternetGatewayRuleId { get { throw null; } set { } } + } + public partial class InternetGatewayRulePatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public InternetGatewayRulePatch() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IPAddressType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IPAddressType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType IPv4 { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType IPv6 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType right) { throw null; } + public override string ToString() { throw null; } + } public partial class IPCommunityAddOperationProperties { public IPCommunityAddOperationProperties() { } @@ -1316,109 +1963,160 @@ public partial class IPCommunityIdList public IPCommunityIdList() { } public System.Collections.Generic.IList IPCommunityIds { get { throw null; } } } - public partial class IPCommunityPatch + public partial class IPCommunityPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public IPCommunityPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public System.Collections.Generic.IList IPCommunityRules { get { throw null; } } + } + public partial class IPCommunityRule + { + public IPCommunityRule(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType action, long sequenceNumber, System.Collections.Generic.IEnumerable communityMembers) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType Action { get { throw null; } set { } } + public System.Collections.Generic.IList CommunityMembers { get { throw null; } } + public long SequenceNumber { get { throw null; } set { } } + public System.Collections.Generic.IList WellKnownCommunities { get { throw null; } } } public partial class IPExtendedCommunityAddOperationProperties { public IPExtendedCommunityAddOperationProperties() { } public System.Collections.Generic.IList AddIPExtendedCommunityIds { get { throw null; } } } - public partial class IPExtendedCommunityPatch + public partial class IPExtendedCommunityPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public IPExtendedCommunityPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList IPExtendedCommunityRules { get { throw null; } } + } + public partial class IPExtendedCommunityRule + { + public IPExtendedCommunityRule(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType action, long sequenceNumber, System.Collections.Generic.IEnumerable routeTargets) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType Action { get { throw null; } set { } } + public System.Collections.Generic.IList RouteTargets { get { throw null; } } + public long SequenceNumber { get { throw null; } set { } } + } + public partial class IPGroupProperties + { + public IPGroupProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType? IPAddressType { get { throw null; } set { } } + public System.Collections.Generic.IList IPPrefixes { get { throw null; } } + public string Name { get { throw null; } set { } } } - public partial class IPPrefixPatch + public partial class IPMatchCondition + { + public IPMatchCondition() { } + public System.Collections.Generic.IList IPGroupNames { get { throw null; } } + public System.Collections.Generic.IList IPPrefixValues { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType? PrefixType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType? SourceDestinationType { get { throw null; } set { } } + } + public partial class IPPrefixPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public IPPrefixPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList IPPrefixRules { get { throw null; } } } - public partial class IPPrefixPropertiesIPPrefixRulesItem + public partial class IPPrefixRule { - public IPPrefixPropertiesIPPrefixRulesItem(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType action, long sequenceNumber, string networkPrefix) { } + public IPPrefixRule(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType action, long sequenceNumber, string networkPrefix) { } public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType Action { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.Condition? Condition { get { throw null; } set { } } public string NetworkPrefix { get { throw null; } set { } } public long SequenceNumber { get { throw null; } set { } } - public int? SubnetMaskLength { get { throw null; } set { } } + public string SubnetMaskLength { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IsManagementType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IsManagementType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType False { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsManagementType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IsCurrentVersion : System.IEquatable + public readonly partial struct IsMonitoringEnabled : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public IsCurrentVersion(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion False { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion True { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion other) { throw null; } + public IsMonitoringEnabled(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled False { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsMonitoringEnabled right) { throw null; } public override string ToString() { throw null; } } + public partial class IsolationDomainProperties + { + public IsolationDomainProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Encapsulation? Encapsulation { get { throw null; } set { } } + public System.Collections.Generic.IList NeighborGroupIds { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IsTestVersion : System.IEquatable + public readonly partial struct IsWorkloadManagementNetworkEnabled : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public IsTestVersion(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion False { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion True { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion other) { throw null; } + public IsWorkloadManagementNetworkEnabled(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled False { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsWorkloadManagementNetworkEnabled right) { throw null; } public override string ToString() { throw null; } } - public partial class L2IsolationDomainPatch + public partial class L2IsolationDomainPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public L2IsolationDomainPatch() { } public string Annotation { get { throw null; } set { } } public int? Mtu { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class L3IsolationDomainPatch + public partial class L3ExportRoutePolicy + { + public L3ExportRoutePolicy() { } + public Azure.Core.ResourceIdentifier ExportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportIPv6RoutePolicyId { get { throw null; } set { } } + } + public partial class L3IsolationDomainPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public L3IsolationDomainPatch() { } public Azure.ResourceManager.ManagedNetworkFabric.Models.AggregateRouteConfiguration AggregateRouteConfiguration { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get { throw null; } set { } } - public string Description { get { throw null; } set { } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeConnectedSubnet? RedistributeConnectedSubnets { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute? RedistributeStaticRoutes { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy + public partial class L3OptionBProperties { - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public string ExportRoutePolicyId { get { throw null; } set { } } + public L3OptionBProperties() { } + public System.Collections.Generic.IList ExportRouteTargets { get { throw null; } } + public System.Collections.Generic.IList ImportRouteTargets { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RouteTargetInformation RouteTargets { get { throw null; } set { } } } public partial class Layer2Configuration { - public Layer2Configuration(int mtu) { } - public System.Collections.Generic.IReadOnlyList Interfaces { get { throw null; } } - public int Mtu { get { throw null; } set { } } - public int? PortCount { get { throw null; } set { } } - } - public partial class Layer3Configuration : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricLayer3IPPrefixProperties - { - public Layer3Configuration() { } - public string ExportRoutePolicyId { get { throw null; } set { } } - public int? FabricASN { get { throw null; } } - public string ImportRoutePolicyId { get { throw null; } set { } } - public int? PeerASN { get { throw null; } set { } } - public int? VlanId { get { throw null; } set { } } + public Layer2Configuration() { } + public System.Collections.Generic.IList Interfaces { get { throw null; } } + public int? Mtu { get { throw null; } set { } } } public partial class Layer3IPPrefixProperties { @@ -1428,14 +2126,23 @@ public Layer3IPPrefixProperties() { } public string SecondaryIPv4Prefix { get { throw null; } set { } } public string SecondaryIPv6Prefix { get { throw null; } set { } } } - public partial class Layer3OptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Layer4Protocol : System.IEquatable { - public Layer3OptionAProperties() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } - public int? FabricASN { get { throw null; } } - public int? Mtu { get { throw null; } set { } } - public int? PeerASN { get { throw null; } set { } } - public int? VlanId { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Layer4Protocol(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol TCP { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol UDP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol left, Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol left, Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol right) { throw null; } + public override string ToString() { throw null; } } public partial class ManagedResourceGroupConfiguration { @@ -1443,9 +2150,15 @@ public ManagedResourceGroupConfiguration() { } public Azure.Core.AzureLocation? Location { get { throw null; } set { } } public string Name { get { throw null; } set { } } } - public partial class ManagementNetworkConfiguration + public partial class ManagementNetworkConfigurationPatchableProperties + { + public ManagementNetworkConfigurationPatchableProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPatchableProperties InfrastructureVpnConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPatchableProperties WorkloadVpnConfiguration { get { throw null; } set { } } + } + public partial class ManagementNetworkConfigurationProperties { - public ManagementNetworkConfiguration(Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties infrastructureVpnConfiguration, Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties workloadVpnConfiguration) { } + public ManagementNetworkConfigurationProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties infrastructureVpnConfiguration, Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties workloadVpnConfiguration) { } public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties InfrastructureVpnConfiguration { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties WorkloadVpnConfiguration { get { throw null; } set { } } } @@ -1453,35 +2166,46 @@ public partial class NeighborAddress { public NeighborAddress() { } public string Address { get { throw null; } set { } } - public string OperationalState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + } + public partial class NeighborGroupDestination + { + public NeighborGroupDestination() { } + public System.Collections.Generic.IList IPv4Addresses { get { throw null; } } + public System.Collections.Generic.IList IPv6Addresses { get { throw null; } } + } + public partial class NeighborGroupPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NeighborGroupPatch() { } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupDestination Destination { get { throw null; } set { } } } - public partial class NetworkDevicePatch + public partial class NetworkDevicePatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public NetworkDevicePatch() { } public string Annotation { get { throw null; } set { } } public string HostName { get { throw null; } set { } } public string SerialNumber { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkDeviceRackRoleType : System.IEquatable + public readonly partial struct NetworkDeviceRole : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NetworkDeviceRackRoleType(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType CE { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType Management { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType NPB { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType ToR { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType TS { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType other) { throw null; } + public NetworkDeviceRole(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole CE { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole Management { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole NPB { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole ToR { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole TS { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRole right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1505,142 +2229,145 @@ public NetworkDevicePatch() { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName right) { throw null; } public override string ToString() { throw null; } } - public partial class NetworkDeviceRoleProperties - { - public NetworkDeviceRoleProperties() { } - public string NetworkDeviceSkuName { get { throw null; } set { } } - public int? RackSlot { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRackRoleType? RoleType { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkDeviceRoleType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public NetworkDeviceRoleType(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType CE { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType Management { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType NPB { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType ToR { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType TS { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkFabricControllerOperationalState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public NetworkFabricControllerOperationalState(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState Configuring { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState Failed { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerOperationalState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class NetworkFabricControllerPatch + public partial class NetworkFabricControllerPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public NetworkFabricControllerPatch() { } public System.Collections.Generic.IList InfrastructureExpressRouteConnections { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } public System.Collections.Generic.IList WorkloadExpressRouteConnections { get { throw null; } } } - public partial class NetworkFabricLayer3IPPrefixProperties + public partial class NetworkFabricPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricPatch() { } + public string Annotation { get { throw null; } set { } } + public long? FabricASN { get { throw null; } set { } } + public string IPv4Prefix { get { throw null; } set { } } + public string IPv6Prefix { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ManagementNetworkConfigurationPatchableProperties ManagementNetworkConfiguration { get { throw null; } set { } } + public int? RackCount { get { throw null; } set { } } + public int? ServerCountPerRack { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPatchablePropertiesTerminalServerConfiguration TerminalServerConfiguration { get { throw null; } set { } } + } + public partial class NetworkFabricPatchablePropertiesTerminalServerConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerPatchableProperties { - public NetworkFabricLayer3IPPrefixProperties() { } + public NetworkFabricPatchablePropertiesTerminalServerConfiguration() { } public string PrimaryIPv4Prefix { get { throw null; } set { } } public string PrimaryIPv6Prefix { get { throw null; } set { } } public string SecondaryIPv4Prefix { get { throw null; } set { } } public string SecondaryIPv6Prefix { get { throw null; } set { } } } + public partial class NetworkInterfacePatch + { + public NetworkInterfacePatch() { } + public string Annotation { get { throw null; } set { } } + } + public partial class NetworkPacketBrokerPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkPacketBrokerPatch() { } + } + public partial class NetworkRackPatch + { + public NetworkRackPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkFabricOperationalState : System.IEquatable + public readonly partial struct NetworkRackType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NetworkFabricOperationalState(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState DeferredControl { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState Deprovisioned { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState Deprovisioning { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState ErrorDeprovisioning { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState ErrorProvisioning { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState Provisioned { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState Provisioning { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState other) { throw null; } + public NetworkRackType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType Aggregate { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType Combined { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType Compute { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOperationalState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType right) { throw null; } public override string ToString() { throw null; } } - public partial class NetworkFabricOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricLayer3IPPrefixProperties + public partial class NetworkTapPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - public NetworkFabricOptionAProperties() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.FabricBfdConfiguration BfdConfiguration { get { throw null; } set { } } - public int? Mtu { get { throw null; } set { } } - public int? PeerASN { get { throw null; } set { } } - public int? VlanId { get { throw null; } set { } } + public NetworkTapPatch() { } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType? PollingType { get { throw null; } set { } } } - public partial class NetworkFabricOptionBProperties + public partial class NetworkTapPatchableParametersDestinationsItem : Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationProperties { - public NetworkFabricOptionBProperties(System.Collections.Generic.IEnumerable importRouteTargets, System.Collections.Generic.IEnumerable exportRouteTargets) { } - public System.Collections.Generic.IList ExportRouteTargets { get { throw null; } } - public System.Collections.Generic.IList ImportRouteTargets { get { throw null; } } + public NetworkTapPatchableParametersDestinationsItem() { } } - public partial class NetworkFabricPatch + public partial class NetworkTapPropertiesDestinationsItem : Azure.ResourceManager.ManagedNetworkFabric.Models.DestinationProperties { - public NetworkFabricPatch() { } - public string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList L2IsolationDomains { get { throw null; } } - public System.Collections.Generic.IReadOnlyList L3IsolationDomains { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Racks { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerPatchableProperties TerminalServerConfiguration { get { throw null; } set { } } + public NetworkTapPropertiesDestinationsItem() { } } - public partial class NetworkInterfacePatch + public partial class NetworkTapRuleAction { - public NetworkInterfacePatch() { } + public NetworkTapRuleAction() { } + public Azure.Core.ResourceIdentifier DestinationId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? IsTimestampEnabled { get { throw null; } set { } } + public string MatchConfigurationName { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType? TapRuleActionType { get { throw null; } set { } } + public string Truncate { get { throw null; } set { } } + } + public partial class NetworkTapRuleMatchCondition : Azure.ResourceManager.ManagedNetworkFabric.Models.CommonMatchConditions + { + public NetworkTapRuleMatchCondition() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.EncapsulationType? EncapsulationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PortCondition PortCondition { get { throw null; } set { } } + } + public partial class NetworkTapRuleMatchConfiguration + { + public NetworkTapRuleMatchConfiguration() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IPAddressType? IPAddressType { get { throw null; } set { } } + public System.Collections.Generic.IList MatchConditions { get { throw null; } } + public string MatchConfigurationName { get { throw null; } set { } } + public long? SequenceNumber { get { throw null; } set { } } + } + public partial class NetworkTapRulePatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkTapRulePatch() { } public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationType? ConfigurationType { get { throw null; } set { } } + public System.Collections.Generic.IList DynamicMatchConfigurations { get { throw null; } } + public System.Collections.Generic.IList MatchConfigurations { get { throw null; } } + public System.Uri TapRulesUri { get { throw null; } set { } } + } + public partial class NetworkToNetworkInterconnectPatch : Azure.ResourceManager.Models.ResourceData + { + public NetworkToNetworkInterconnectPatch() { } + public Azure.Core.ResourceIdentifier EgressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExportRoutePolicyInformation ExportRoutePolicy { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ImportRoutePolicyInformation ImportRoutePolicy { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier IngressAclId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration Layer2Configuration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NpbStaticRouteConfiguration NpbStaticRouteConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBLayer3Configuration OptionBLayer3Configuration { get { throw null; } set { } } } - public partial class NetworkRackPatch + public partial class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBLayer3Configuration { - public NetworkRackPatch() { } - public System.BinaryData Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkRackRoleName : System.IEquatable + public readonly partial struct NfcSku : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NetworkRackRoleName(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName AggregateRack { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName ComputeRack { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName other) { throw null; } + public NfcSku(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku Basic { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku HighPerformance { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku left, Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku left, Azure.ResourceManager.ManagedNetworkFabric.Models.NfcSku right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1661,30 +2388,34 @@ public NetworkRackPatch() { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NniType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NniType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperationalStatus : System.IEquatable + public partial class NpbStaticRouteConfiguration { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public OperationalStatus(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus Booted { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus BootPrompt { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus Ztp { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus left, Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus left, Azure.ResourceManager.ManagedNetworkFabric.Models.OperationalStatus right) { throw null; } - public override string ToString() { throw null; } + public NpbStaticRouteConfiguration() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList IPv4Routes { get { throw null; } } + public System.Collections.Generic.IList IPv6Routes { get { throw null; } } + } + public partial class OptionAProperties + { + public OptionAProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration BfdConfiguration { get { throw null; } set { } } + public int? Mtu { get { throw null; } set { } } + public long? PeerASN { get { throw null; } set { } } + public int? VlanId { get { throw null; } set { } } + } + public partial class OptionBLayer3Configuration : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties + { + public OptionBLayer3Configuration() { } + public long? FabricASN { get { throw null; } } + public long? PeerASN { get { throw null; } set { } } + public int? VlanId { get { throw null; } set { } } } public partial class OptionBProperties { public OptionBProperties() { } public System.Collections.Generic.IList ExportRouteTargets { get { throw null; } } public System.Collections.Generic.IList ImportRouteTargets { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RouteTargetInformation RouteTargets { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PeeringOption : System.IEquatable @@ -1705,39 +2436,90 @@ public OptionBProperties() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PowerCycleState : System.IEquatable + public readonly partial struct PollingIntervalInSecond : System.IEquatable + { + private readonly int _dummyPrimitive; + public PollingIntervalInSecond(int value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond Ninety { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond OneHundredTwenty { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond Sixty { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond Thirty { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond left, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond (int value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond left, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PollingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PollingType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType Pull { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType Push { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PortCondition + { + public PortCondition(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol layer4Protocol) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol Layer4Protocol { get { throw null; } set { } } + public System.Collections.Generic.IList PortGroupNames { get { throw null; } } + public System.Collections.Generic.IList Ports { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PortType? PortType { get { throw null; } set { } } + } + public partial class PortGroupProperties + { + public PortGroupProperties() { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Ports { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PortType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PowerCycleState(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState Off { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState On { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState other) { throw null; } + public PortType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PortType DestinationPort { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PortType SourcePort { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PortType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState left, Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState left, Azure.ResourceManager.ManagedNetworkFabric.Models.PowerCycleState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PortType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PortType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PortType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PortType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PortType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PowerEnd : System.IEquatable + public readonly partial struct PrefixType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PowerEnd(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd Primary { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd Secondary { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd other) { throw null; } + public PrefixType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType LongestPrefix { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType Prefix { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd left, Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd left, Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType left, Azure.ResourceManager.ManagedNetworkFabric.Models.PrefixType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1746,6 +2528,7 @@ public OptionBProperties() { } private readonly object _dummy; private readonly int _dummyPrimitive; public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Accepted { get { throw null; } } public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Canceled { get { throw null; } } public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Failed { get { throw null; } } @@ -1761,6 +2544,31 @@ public OptionBProperties() { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState left, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class RebootProperties + { + public RebootProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType? RebootType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RebootType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RebootType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType GracefulRebootWithoutZTP { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType GracefulRebootWithZTP { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType UngracefulRebootWithoutZTP { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType UngracefulRebootWithZTP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RebootType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RedistributeConnectedSubnet : System.IEquatable { @@ -1797,10 +2605,48 @@ public OptionBProperties() { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute left, Azure.ResourceManager.ManagedNetworkFabric.Models.RedistributeStaticRoute right) { throw null; } public override string ToString() { throw null; } } - public partial class RoutePolicyPatch + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutePolicyActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutePolicyActionType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType Continue { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType Deny { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType Permit { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutePolicyConditionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutePolicyConditionType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType And { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType Or { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RoutePolicyPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { public RoutePolicyPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType? DefaultAction { get { throw null; } set { } } + public System.Collections.Generic.IList Statements { get { throw null; } } } public partial class RoutePolicyStatementProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource { @@ -1809,28 +2655,42 @@ public RoutePolicyStatementProperties(long sequenceNumber, Azure.ResourceManager public Azure.ResourceManager.ManagedNetworkFabric.Models.StatementConditionProperties Condition { get { throw null; } set { } } public long SequenceNumber { get { throw null; } set { } } } + public partial class RouteTargetInformation + { + public RouteTargetInformation() { } + public System.Collections.Generic.IList ExportIPv4RouteTargets { get { throw null; } } + public System.Collections.Generic.IList ExportIPv6RouteTargets { get { throw null; } } + public System.Collections.Generic.IList ImportIPv4RouteTargets { get { throw null; } } + public System.Collections.Generic.IList ImportIPv6RouteTargets { get { throw null; } } + } + public partial class RuleProperties + { + public RuleProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.Action action, System.Collections.Generic.IEnumerable addressList) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.Action Action { get { throw null; } set { } } + public System.Collections.Generic.IList AddressList { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct State : System.IEquatable + public readonly partial struct SourceDestinationType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public State(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.State Off { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.State On { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.State other) { throw null; } + public SourceDestinationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType DestinationIP { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType SourceIP { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.State left, Azure.ResourceManager.ManagedNetworkFabric.Models.State right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.State (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.State left, Azure.ResourceManager.ManagedNetworkFabric.Models.State right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType right) { throw null; } public override string ToString() { throw null; } } public partial class StatementActionProperties { - public StatementActionProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType actionType) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType ActionType { get { throw null; } set { } } + public StatementActionProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType actionType) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ActionIPCommunityProperties IPCommunityProperties { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.ActionIPExtendedCommunityProperties IPExtendedCommunityProperties { get { throw null; } set { } } public long? LocalPreference { get { throw null; } set { } } @@ -1840,6 +2700,7 @@ public partial class StatementConditionProperties : Azure.ResourceManager.Manage public StatementConditionProperties() { } public System.Collections.Generic.IList IPExtendedCommunityIds { get { throw null; } } public string IPPrefixId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType? RoutePolicyConditionType { get { throw null; } set { } } } public partial class StaticRouteConfiguration { @@ -1863,24 +2724,42 @@ public SupportedConnectorProperties() { } public partial class SupportedVersionProperties { public SupportedVersionProperties() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.IsCurrentVersion? IsCurrent { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.IsTestVersion? IsTest { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? IsDefault { get { throw null; } set { } } public string VendorFirmwareVersion { get { throw null; } set { } } public string VendorOSVersion { get { throw null; } set { } } public string Version { get { throw null; } set { } } } - public partial class SupportPackageProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TapRuleActionType : System.IEquatable { - internal SupportPackageProperties() { } - public string SupportPackageURL { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TapRuleActionType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Count { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Drop { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Goto { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Log { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Mirror { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Redirect { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType Replicate { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.TapRuleActionType right) { throw null; } + public override string ToString() { throw null; } } - public partial class TerminalServerConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricLayer3IPPrefixProperties + public partial class TerminalServerConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerPatchableProperties { public TerminalServerConfiguration() { } public string NetworkDeviceId { get { throw null; } } - public string Password { get { throw null; } set { } } - public string SerialNumber { get { throw null; } set { } } - public string Username { get { throw null; } set { } } + public string PrimaryIPv4Prefix { get { throw null; } set { } } + public string PrimaryIPv6Prefix { get { throw null; } set { } } + public string SecondaryIPv4Prefix { get { throw null; } set { } } + public string SecondaryIPv6Prefix { get { throw null; } set { } } } public partial class TerminalServerPatchableProperties { @@ -1892,28 +2771,94 @@ public TerminalServerPatchableProperties() { } public partial class UpdateAdministrativeState : Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources { public UpdateAdministrativeState() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? State { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableState? State { get { throw null; } set { } } + } + public partial class UpdateDeviceAdministrativeState : Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources + { + public UpdateDeviceAdministrativeState() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.DeviceAdministrativeState? State { get { throw null; } set { } } } - public partial class UpdatePowerCycleProperties + public partial class UpdateVersion { - public UpdatePowerCycleProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd powerEnd, Azure.ResourceManager.ManagedNetworkFabric.Models.State state) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.PowerEnd PowerEnd { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.State State { get { throw null; } } + public UpdateVersion() { } + public string Version { get { throw null; } set { } } } - public partial class UpdateVersionProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValidateAction : System.IEquatable { - public UpdateVersionProperties(string skuVersion) { } - public string SkuVersion { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValidateAction(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction Cabling { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction Configuration { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction Connectivity { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ValidateConfigurationProperties + { + public ValidateConfigurationProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateAction? ValidateAction { get { throw null; } set { } } + } + public partial class ValidateConfigurationResponse : Azure.ResourceManager.ManagedNetworkFabric.Models.ErrorResponse + { + internal ValidateConfigurationResponse() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ConfigurationState? ConfigurationState { get { throw null; } } + public System.Uri Uri { get { throw null; } } + } + public partial class VlanGroupProperties + { + public VlanGroupProperties() { } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList Vlans { get { throw null; } } + } + public partial class VlanMatchCondition + { + public VlanMatchCondition() { } + public System.Collections.Generic.IList InnerVlans { get { throw null; } } + public System.Collections.Generic.IList VlanGroupNames { get { throw null; } } + public System.Collections.Generic.IList Vlans { get { throw null; } } + } + public partial class VpnConfigurationPatchableProperties + { + public VpnConfigurationPatchableProperties() { } + public Azure.Core.ResourceIdentifier NetworkToNetworkInterconnectId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPatchablePropertiesOptionAProperties OptionAProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties OptionBProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption? PeeringOption { get { throw null; } set { } } + } + public partial class VpnConfigurationPatchablePropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionAProperties + { + public VpnConfigurationPatchablePropertiesOptionAProperties() { } + public string PrimaryIPv4Prefix { get { throw null; } set { } } + public string PrimaryIPv6Prefix { get { throw null; } set { } } + public string SecondaryIPv4Prefix { get { throw null; } set { } } + public string SecondaryIPv6Prefix { get { throw null; } set { } } } public partial class VpnConfigurationProperties { public VpnConfigurationProperties(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public string NetworkToNetworkInterconnectId { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOptionAProperties OptionAProperties { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricOptionBProperties OptionBProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? AdministrativeState { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkToNetworkInterconnectId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPropertiesOptionAProperties OptionAProperties { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties OptionBProperties { get { throw null; } set { } } public Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption PeeringOption { get { throw null; } set { } } } + public partial class VpnConfigurationPropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionAProperties + { + public VpnConfigurationPropertiesOptionAProperties() { } + public string PrimaryIPv4Prefix { get { throw null; } set { } } + public string PrimaryIPv6Prefix { get { throw null; } set { } } + public string SecondaryIPv4Prefix { get { throw null; } set { } } + public string SecondaryIPv6Prefix { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct WellKnownCommunity : System.IEquatable { @@ -1935,10 +2880,4 @@ public VpnConfigurationProperties(Azure.ResourceManager.ManagedNetworkFabric.Mod public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.WellKnownCommunity left, Azure.ResourceManager.ManagedNetworkFabric.Models.WellKnownCommunity right) { throw null; } public override string ToString() { throw null; } } - public partial class WorkloadServices - { - internal WorkloadServices() { } - public System.Collections.Generic.IReadOnlyList IPv4AddressSpaces { get { throw null; } } - public System.Collections.Generic.IReadOnlyList IPv6AddressSpaces { get { throw null; } } - } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs index 718b43e1fdcb7..a4489e0861afb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs @@ -82,7 +82,7 @@ public virtual async Task> CreateOrUpdat try { var response = await _accessControlListRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(Response.FromValue(new AccessControlListResource(Client, response), response.GetRawResponse())); + var operation = new ManagedNetworkFabricArmOperation(new AccessControlListOperationSource(Client), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -123,7 +123,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil try { var response = _accessControlListRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(Response.FromValue(new AccessControlListResource(Client, response), response.GetRawResponse())); + var operation = new ManagedNetworkFabricArmOperation(new AccessControlListOperationSource(Client), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs index 4eb50b19cf010..b1a40a814309e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -16,21 +15,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the AccessControlList data model. - /// The AccessControlList resource definition. + /// The Access Control List resource definition. /// public partial class AccessControlListData : TrackedResourceData { /// Initializes a new instance of AccessControlListData. /// The location. - /// IP address family. Example: ipv4 | ipv6. - /// Access Control List conditions. - /// is null. - public AccessControlListData(AzureLocation location, AddressFamily addressFamily, IEnumerable conditions) : base(location) + public AccessControlListData(AzureLocation location) : base(location) { - Argument.AssertNotNull(conditions, nameof(conditions)); - - AddressFamily = addressFamily; - Conditions = conditions.ToList(); + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); } /// Initializes a new instance of AccessControlListData. @@ -41,24 +35,48 @@ public AccessControlListData(AzureLocation location, AddressFamily addressFamily /// The tags. /// The location. /// Switch configuration description. - /// IP address family. Example: ipv4 | ipv6. - /// Access Control List conditions. - /// Gets the provisioning state of the resource. - internal AccessControlListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, AddressFamily addressFamily, IList conditions, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// Input method to configure Access Control List. + /// Access Control List file URL. + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + /// List of match configurations. + /// List of dynamic match configurations. + /// The last synced timestamp. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal AccessControlListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ConfigurationType? configurationType, Uri aclsUri, CommunityActionType? defaultAction, IList matchConfigurations, IList dynamicMatchConfigurations, DateTimeOffset? lastSyncedOn, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; - AddressFamily = addressFamily; - Conditions = conditions; + ConfigurationType = configurationType; + AclsUri = aclsUri; + DefaultAction = defaultAction; + MatchConfigurations = matchConfigurations; + DynamicMatchConfigurations = dynamicMatchConfigurations; + LastSyncedOn = lastSyncedOn; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// IP address family. Example: ipv4 | ipv6. - public AddressFamily AddressFamily { get; set; } - /// Access Control List conditions. - public IList Conditions { get; } - /// Gets the provisioning state of the resource. + /// Input method to configure Access Control List. + public ConfigurationType? ConfigurationType { get; set; } + /// Access Control List file URL. + public Uri AclsUri { get; set; } + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + public CommunityActionType? DefaultAction { get; set; } + /// List of match configurations. + public IList MatchConfigurations { get; } + /// List of dynamic match configurations. + public IList DynamicMatchConfigurations { get; } + /// The last synced timestamp. + public DateTimeOffset? LastSyncedOn { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs index 4a5a57b1a0b0b..6a8a4a4f8303a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs @@ -175,7 +175,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell try { var response = await _accessControlListRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(response); + var operation = new ManagedNetworkFabricArmOperation(_accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -209,7 +209,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel try { var response = _accessControlListRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(response); + var operation = new ManagedNetworkFabricArmOperation(_accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -234,10 +234,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Access Control List properties to update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(AccessControlListPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AccessControlListPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -246,7 +247,10 @@ public virtual async Task> UpdateAsync(Acces try { var response = await _accessControlListRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + var operation = new ManagedNetworkFabricArmOperation(new AccessControlListOperationSource(Client), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -268,10 +272,11 @@ public virtual async Task> UpdateAsync(Acces /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Access Control List properties to update. /// The cancellation token to use. /// is null. - public virtual Response Update(AccessControlListPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, AccessControlListPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -280,7 +285,222 @@ public virtual Response Update(AccessControlListPatch try { var response = _accessControlListRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + var operation = new ManagedNetworkFabricArmOperation(new AccessControlListOperationSource(Client), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState + /// + /// + /// Operation Id + /// AccessControlLists_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _accessControlListRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/updateAdministrativeState + /// + /// + /// Operation Id + /// AccessControlLists_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _accessControlListRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync + /// + /// + /// Operation Id + /// AccessControlLists_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ResyncAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Resync"); + scope.Start(); + try + { + var response = await _accessControlListRestClient.ResyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/resync + /// + /// + /// Operation Id + /// AccessControlLists_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Resync"); + scope.Start(); + try + { + var response = _accessControlListRestClient.Resync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration + /// + /// + /// Operation Id + /// AccessControlLists_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _accessControlListRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}/validateConfiguration + /// + /// + /// Operation Id + /// AccessControlLists_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _accessControlListRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _accessControlListClientDiagnostics, Pipeline, _accessControlListRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -332,8 +552,8 @@ public virtual async Task> AddTagAsync(strin patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -386,8 +606,8 @@ public virtual Response AddTag(string key, string val patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -435,8 +655,8 @@ public virtual async Task> SetTagsAsync(IDic var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; var patch = new AccessControlListPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -484,8 +704,8 @@ public virtual Response SetTags(IDictionary> RemoveTagAsync(st patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -588,8 +808,8 @@ public virtual Response RemoveTag(string key, Cancell patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs index b41722a893d6c..7eda34e2265ea 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric; using Azure.ResourceManager.Models; @@ -25,16 +26,92 @@ public static partial class ArmManagedNetworkFabricModelFactory /// The tags. /// The location. /// Switch configuration description. - /// IP address family. Example: ipv4 | ipv6. - /// Access Control List conditions. - /// Gets the provisioning state of the resource. + /// Input method to configure Access Control List. + /// Access Control List file URL. + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + /// List of match configurations. + /// List of dynamic match configurations. + /// The last synced timestamp. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static AccessControlListData AccessControlListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, AddressFamily addressFamily = default, IEnumerable conditions = null, ProvisioningState? provisioningState = null) + public static AccessControlListData AccessControlListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ConfigurationType? configurationType = null, Uri aclsUri = null, CommunityActionType? defaultAction = null, IEnumerable matchConfigurations = null, IEnumerable dynamicMatchConfigurations = null, DateTimeOffset? lastSyncedOn = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - conditions ??= new List(); + matchConfigurations ??= new List(); + dynamicMatchConfigurations ??= new List(); - return new AccessControlListData(id, name, resourceType, systemData, tags, location, annotation, addressFamily, conditions?.ToList(), provisioningState); + return new AccessControlListData(id, name, resourceType, systemData, tags, location, annotation, configurationType, aclsUri, defaultAction, matchConfigurations?.ToList(), dynamicMatchConfigurations?.ToList(), lastSyncedOn, configurationState, provisioningState, administrativeState); + } + + /// Initializes a new instance of ErrorResponse. + /// The error object. + /// A new instance for mocking. + public static ErrorResponse ErrorResponse(ResponseError error = null) + { + return new ErrorResponse(error); + } + + /// Initializes a new instance of CommonPostActionResponseForStateUpdate. + /// The error object. + /// Gets the configuration state. + /// A new instance for mocking. + public static CommonPostActionResponseForStateUpdate CommonPostActionResponseForStateUpdate(ResponseError error = null, ConfigurationState? configurationState = null) + { + return new CommonPostActionResponseForStateUpdate(error, configurationState); + } + + /// Initializes a new instance of ValidateConfigurationResponse. + /// The error object. + /// Gets the configuration state. + /// URL for the details of the response. + /// A new instance for mocking. + public static ValidateConfigurationResponse ValidateConfigurationResponse(ResponseError error = null, ConfigurationState? configurationState = null, Uri uri = null) + { + return new ValidateConfigurationResponse(error, configurationState, uri); + } + + /// Initializes a new instance of InternetGatewayData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// ARM Resource ID of the Internet Gateway Rule. + /// IPv4 Address of Internet Gateway. + /// Port number of Internet Gateway. + /// Gateway Type of the resource. + /// ARM Resource ID of the Network Fabric Controller. + /// Provisioning state of resource. + /// A new instance for mocking. + public static InternetGatewayData InternetGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ResourceIdentifier internetGatewayRuleId = null, string ipv4Address = null, int? port = null, GatewayType typePropertiesType = default, ResourceIdentifier networkFabricControllerId = null, ProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new InternetGatewayData(id, name, resourceType, systemData, tags, location, annotation, internetGatewayRuleId, ipv4Address, port, typePropertiesType, networkFabricControllerId, provisioningState); + } + + /// Initializes a new instance of InternetGatewayRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Rules for the InternetGateways. + /// Provisioning state of the resource. + /// List of Internet Gateway resource Id. + /// A new instance for mocking. + public static InternetGatewayRuleData InternetGatewayRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, RuleProperties ruleProperties = null, ProvisioningState? provisioningState = null, IEnumerable internetGatewayIds = null) + { + tags ??= new Dictionary(); + internetGatewayIds ??= new List(); + + return new InternetGatewayRuleData(id, name, resourceType, systemData, tags, location, annotation, ruleProperties, provisioningState, internetGatewayIds?.ToList()); } /// Initializes a new instance of IPCommunityData. @@ -45,18 +122,17 @@ public static AccessControlListData AccessControlListData(ResourceIdentifier id /// The tags. /// The location. /// Switch configuration description. - /// Action to be taken on the configuration. Example: Permit | Deny. - /// Supported well known Community List. - /// List the communityMembers of IP Community . - /// Gets the provisioning state of the resource. + /// List of IP Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static IPCommunityData IPCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, CommunityActionType? action = null, IEnumerable wellKnownCommunities = null, IEnumerable communityMembers = null, ProvisioningState? provisioningState = null) + public static IPCommunityData IPCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipCommunityRules = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - wellKnownCommunities ??= new List(); - communityMembers ??= new List(); + ipCommunityRules ??= new List(); - return new IPCommunityData(id, name, resourceType, systemData, tags, location, annotation, action, wellKnownCommunities?.ToList(), communityMembers?.ToList(), provisioningState); + return new IPCommunityData(id, name, resourceType, systemData, tags, location, annotation, ipCommunityRules?.ToList(), configurationState, provisioningState, administrativeState); } /// Initializes a new instance of IPExtendedCommunityData. @@ -67,16 +143,17 @@ public static IPCommunityData IPCommunityData(ResourceIdentifier id = null, stri /// The tags. /// The location. /// Switch configuration description. - /// Action to be taken on the configuration. Example: Permit | Deny. - /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. - /// Gets the provisioning state of the resource. + /// List of IP Extended Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static IPExtendedCommunityData IPExtendedCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, CommunityActionType? action = null, IEnumerable routeTargets = null, ProvisioningState? provisioningState = null) + public static IPExtendedCommunityData IPExtendedCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipExtendedCommunityRules = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - routeTargets ??= new List(); + ipExtendedCommunityRules ??= new List(); - return new IPExtendedCommunityData(id, name, resourceType, systemData, tags, location, annotation, action, routeTargets?.ToList(), provisioningState); + return new IPExtendedCommunityData(id, name, resourceType, systemData, tags, location, annotation, ipExtendedCommunityRules?.ToList(), configurationState, provisioningState, administrativeState); } /// Initializes a new instance of IPPrefixData. @@ -87,15 +164,17 @@ public static IPExtendedCommunityData IPExtendedCommunityData(ResourceIdentifier /// The tags. /// The location. /// Switch configuration description. - /// IpPrefix contains the list of IP PrefixRules objects. - /// Gets the provisioning state of the resource. + /// The list of IP Prefix Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static IPPrefixData IPPrefixData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipPrefixRules = null, ProvisioningState? provisioningState = null) + public static IPPrefixData IPPrefixData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipPrefixRules = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - ipPrefixRules ??= new List(); + ipPrefixRules ??= new List(); - return new IPPrefixData(id, name, resourceType, systemData, tags, location, annotation, ipPrefixRules?.ToList(), provisioningState); + return new IPPrefixData(id, name, resourceType, systemData, tags, location, annotation, ipPrefixRules?.ToList(), configurationState, provisioningState, administrativeState); } /// Initializes a new instance of L2IsolationDomainData. @@ -106,31 +185,32 @@ public static IPPrefixData IPPrefixData(ResourceIdentifier id = null, string nam /// The tags. /// The location. /// Switch configuration description. - /// Network Fabric ARM resource id. - /// vlanId. Example: 501. - /// maximum transmission unit. Default value is 1500. - /// List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// state. Example: Enabled | Disabled. It indicates administrative state of the isolationDomain, whether it is enabled or disabled. If enabled, the configuration is applied on the devices. If disabled, the configuration is removed from the devices. - /// Gets the provisioning state of the resource. + /// ARM Resource ID of the Network Fabric. + /// Vlan Identifier of the Network Fabric. Example: 501. + /// Maximum transmission unit. Default value is 1500. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static L2IsolationDomainData L2IsolationDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, string networkFabricId = null, int? vlanId = null, int? mtu = null, IEnumerable disabledOnResources = null, EnabledDisabledState? administrativeState = null, ProvisioningState? provisioningState = null) + public static L2IsolationDomainData L2IsolationDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ResourceIdentifier networkFabricId = null, int vlanId = default, int? mtu = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - disabledOnResources ??= new List(); - return new L2IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, networkFabricId, vlanId, mtu, disabledOnResources?.ToList(), administrativeState, provisioningState); + return new L2IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, networkFabricId, vlanId, mtu, configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of ARPProperties. - /// Ipv4 or Ipv6 address. - /// Duration in seconds. - /// Hardware address. - /// Layer 2 interface name. - /// ARP status. - /// A new instance for mocking. - public static ARPProperties ARPProperties(string address = null, string age = null, string macAddress = null, string @interface = null, string state = null) + /// Initializes a new instance of CommonPostActionResponseForDeviceUpdate. + /// The error object. + /// Gets the configuration state. + /// List of ARM Resource IDs for which the given action applied successfully. + /// List of ARM Resource IDs for which the given action failed to apply. + /// A new instance for mocking. + public static CommonPostActionResponseForDeviceUpdate CommonPostActionResponseForDeviceUpdate(ResponseError error = null, ConfigurationState? configurationState = null, IEnumerable successfulDevices = null, IEnumerable failedDevices = null) { - return new ARPProperties(address, age, macAddress, @interface, state); + successfulDevices ??= new List(); + failedDevices ??= new List(); + + return new CommonPostActionResponseForDeviceUpdate(error, configurationState, successfulDevices?.ToList(), failedDevices?.ToList()); } /// Initializes a new instance of L3IsolationDomainData. @@ -143,31 +223,18 @@ public static ARPProperties ARPProperties(string address = null, string age = nu /// Switch configuration description. /// Advertise Connected Subnets. Ex: "True" | "False". /// Advertise Static Routes. Ex: "True" | "False". - /// List of Ipv4 and Ipv6 route configurations. - /// L3 Isolation Domain description. + /// Aggregate route configurations. /// Connected Subnet RoutePolicy. - /// Network Fabric ARM resource id. - /// List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Administrative state of the IsolationDomain. Example: Enabled | Disabled. - /// List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Gets the provisioning state of the resource. + /// ARM Resource ID of the Network Fabric. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static L3IsolationDomainData L3IsolationDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, RedistributeConnectedSubnet? redistributeConnectedSubnets = null, RedistributeStaticRoute? redistributeStaticRoutes = null, AggregateRouteConfiguration aggregateRouteConfiguration = null, string description = null, L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy = null, string networkFabricId = null, IEnumerable disabledOnResources = null, EnabledDisabledState? administrativeState = null, IEnumerable optionBDisabledOnResources = null, ProvisioningState? provisioningState = null) + public static L3IsolationDomainData L3IsolationDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, RedistributeConnectedSubnet? redistributeConnectedSubnets = null, RedistributeStaticRoute? redistributeStaticRoutes = null, AggregateRouteConfiguration aggregateRouteConfiguration = null, ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy = null, ResourceIdentifier networkFabricId = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - disabledOnResources ??= new List(); - optionBDisabledOnResources ??= new List(); - - return new L3IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, redistributeConnectedSubnets, redistributeStaticRoutes, aggregateRouteConfiguration, description, connectedSubnetRoutePolicy, networkFabricId, disabledOnResources?.ToList(), administrativeState, optionBDisabledOnResources?.ToList(), provisioningState); - } - /// Initializes a new instance of L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy. - /// exportRoutePolicyId value. - /// Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. - /// A new instance for mocking. - public static L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(string exportRoutePolicyId = null, EnabledDisabledState? administrativeState = null) - { - return new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(exportRoutePolicyId, administrativeState); + return new L3IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, redistributeConnectedSubnets, redistributeStaticRoutes, aggregateRouteConfiguration, connectedSubnetRoutePolicy, networkFabricId, configurationState, provisioningState, administrativeState); } /// Initializes a new instance of InternalNetworkData. @@ -177,40 +244,52 @@ public static L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy L3Isola /// The systemData. /// Switch configuration description. /// Maximum transmission unit. Default value is 1500. - /// List with object connected IPv4 Subnets. - /// List with object connected IPv6 Subnets. - /// Static Route Configuration properties. - /// BGP configuration properties. - /// ARM resource ID of importRoutePolicy. - /// ARM resource ID of importRoutePolicy. - /// List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Administrative state of the InternalNetwork. Example: Enabled | Disabled. - /// List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Gets the provisioning state of the resource. + /// List of Connected IPv4 Subnets. + /// List of connected IPv6 Subnets. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// Import Route Policy either IPv4 or IPv6. + /// Export Route Policy either IPv4 or IPv6. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// To check whether monitoring of internal network is enabled or not. + /// Extension. Example: NoExtension | NPB. /// Vlan identifier. Example: 1001. + /// BGP configuration properties. + /// Static Route Configuration properties. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static InternalNetworkData InternalNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, int? mtu = null, IEnumerable connectedIPv4Subnets = null, IEnumerable connectedIPv6Subnets = null, StaticRouteConfiguration staticRouteConfiguration = null, BgpConfiguration bgpConfiguration = null, string importRoutePolicyId = null, string exportRoutePolicyId = null, IEnumerable disabledOnResources = null, EnabledDisabledState? administrativeState = null, IEnumerable bgpDisabledOnResources = null, IEnumerable bfdDisabledOnResources = null, IEnumerable bfdForStaticRoutesDisabledOnResources = null, ProvisioningState? provisioningState = null, int vlanId = default) + public static InternalNetworkData InternalNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, int? mtu = null, IEnumerable connectedIPv4Subnets = null, IEnumerable connectedIPv6Subnets = null, ResourceIdentifier importRoutePolicyId = null, ResourceIdentifier exportRoutePolicyId = null, ImportRoutePolicy importRoutePolicy = null, ExportRoutePolicy exportRoutePolicy = null, ResourceIdentifier ingressAclId = null, ResourceIdentifier egressAclId = null, IsMonitoringEnabled? isMonitoringEnabled = null, Extension? extension = null, int vlanId = default, InternalNetworkPropertiesBgpConfiguration bgpConfiguration = null, InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { connectedIPv4Subnets ??= new List(); connectedIPv6Subnets ??= new List(); - disabledOnResources ??= new List(); - bgpDisabledOnResources ??= new List(); - bfdDisabledOnResources ??= new List(); - bfdForStaticRoutesDisabledOnResources ??= new List(); - return new InternalNetworkData(id, name, resourceType, systemData, annotation, mtu, connectedIPv4Subnets?.ToList(), connectedIPv6Subnets?.ToList(), staticRouteConfiguration, bgpConfiguration, importRoutePolicyId, exportRoutePolicyId, disabledOnResources?.ToList(), administrativeState, bgpDisabledOnResources?.ToList(), bfdDisabledOnResources?.ToList(), bfdForStaticRoutesDisabledOnResources?.ToList(), provisioningState, vlanId); + return new InternalNetworkData(id, name, resourceType, systemData, annotation, mtu, connectedIPv4Subnets?.ToList(), connectedIPv6Subnets?.ToList(), importRoutePolicyId, exportRoutePolicyId, importRoutePolicy, exportRoutePolicy, ingressAclId, egressAclId, isMonitoringEnabled, extension, vlanId, bgpConfiguration, staticRouteConfiguration, configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of BfdConfiguration. - /// Administrative state of the BfdConfiguration. Example: Enabled | Disabled. - /// interval in milliseconds. Example: 300. - /// Multiplier for the Bfd Configuration. Example: 3. - /// A new instance for mocking. - public static BfdConfiguration BfdConfiguration(EnabledDisabledState? administrativeState = null, int? interval = null, int? multiplier = null) + /// Initializes a new instance of InternalNetworkPropertiesBgpConfiguration. + /// Switch configuration description. + /// BFD configuration properties. + /// Originate a defaultRoute. Ex: "True" | "False". + /// Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + /// Enable Or Disable state. + /// ASN of Network Fabric. Example: 65048. + /// Peer ASN. Example: 65047. + /// List of BGP IPv4 Listen Range prefixes. + /// List of BGP IPv6 Listen Ranges prefixes. + /// List with stringified IPv4 Neighbor Addresses. + /// List with stringified IPv6 Neighbor Address. + /// A new instance for mocking. + public static InternalNetworkPropertiesBgpConfiguration InternalNetworkPropertiesBgpConfiguration(string annotation = null, BfdConfiguration bfdConfiguration = null, BooleanEnumProperty? defaultRouteOriginate = null, int? allowAS = null, AllowASOverride? allowASOverride = null, long? fabricASN = null, long? peerASN = null, IEnumerable ipv4ListenRangePrefixes = null, IEnumerable ipv6ListenRangePrefixes = null, IEnumerable ipv4NeighborAddress = null, IEnumerable ipv6NeighborAddress = null) { - return new BfdConfiguration(administrativeState, interval, multiplier); + ipv4ListenRangePrefixes ??= new List(); + ipv6ListenRangePrefixes ??= new List(); + ipv4NeighborAddress ??= new List(); + ipv6NeighborAddress ??= new List(); + + return new InternalNetworkPropertiesBgpConfiguration(annotation, bfdConfiguration, defaultRouteOriginate, allowAS, allowASOverride, fabricASN, peerASN, ipv4ListenRangePrefixes?.ToList(), ipv6ListenRangePrefixes?.ToList(), ipv4NeighborAddress?.ToList(), ipv6NeighborAddress?.ToList()); } /// Initializes a new instance of BgpConfiguration. @@ -221,12 +300,12 @@ public static BfdConfiguration BfdConfiguration(EnabledDisabledState? administra /// Enable Or Disable state. /// ASN of Network Fabric. Example: 65048. /// Peer ASN. Example: 65047. - /// BGP Ipv4 ListenRange. - /// BGP Ipv6 ListenRange. - /// List with stringified ipv4NeighborAddresses. + /// List of BGP IPv4 Listen Range prefixes. + /// List of BGP IPv6 Listen Ranges prefixes. + /// List with stringified IPv4 Neighbor Addresses. /// List with stringified IPv6 Neighbor Address. /// A new instance for mocking. - public static BgpConfiguration BgpConfiguration(string annotation = null, BfdConfiguration bfdConfiguration = null, BooleanEnumProperty? defaultRouteOriginate = null, int? allowAS = null, AllowASOverride? allowASOverride = null, int? fabricASN = null, int peerASN = default, IEnumerable ipv4ListenRangePrefixes = null, IEnumerable ipv6ListenRangePrefixes = null, IEnumerable ipv4NeighborAddress = null, IEnumerable ipv6NeighborAddress = null) + public static BgpConfiguration BgpConfiguration(string annotation = null, BfdConfiguration bfdConfiguration = null, BooleanEnumProperty? defaultRouteOriginate = null, int? allowAS = null, AllowASOverride? allowASOverride = null, long? fabricASN = null, long? peerASN = null, IEnumerable ipv4ListenRangePrefixes = null, IEnumerable ipv6ListenRangePrefixes = null, IEnumerable ipv4NeighborAddress = null, IEnumerable ipv6NeighborAddress = null) { ipv4ListenRangePrefixes ??= new List(); ipv6ListenRangePrefixes ??= new List(); @@ -236,13 +315,23 @@ public static BgpConfiguration BgpConfiguration(string annotation = null, BfdCon return new BgpConfiguration(annotation, bfdConfiguration, defaultRouteOriginate, allowAS, allowASOverride, fabricASN, peerASN, ipv4ListenRangePrefixes?.ToList(), ipv6ListenRangePrefixes?.ToList(), ipv4NeighborAddress?.ToList(), ipv6NeighborAddress?.ToList()); } + /// Initializes a new instance of BfdConfiguration. + /// Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + /// Interval in milliseconds. Example: 300. + /// Multiplier for the Bfd Configuration. Example: 5. + /// A new instance for mocking. + public static BfdConfiguration BfdConfiguration(BfdAdministrativeState? administrativeState = null, int? intervalInMilliSeconds = null, int? multiplier = null) + { + return new BfdConfiguration(administrativeState, intervalInMilliSeconds, multiplier); + } + /// Initializes a new instance of NeighborAddress. /// IP Address. - /// OperationalState of the NeighborAddress. + /// Configuration state of the resource. /// A new instance for mocking. - public static NeighborAddress NeighborAddress(string address = null, string operationalState = null) + public static NeighborAddress NeighborAddress(string address = null, ConfigurationState? configurationState = null) { - return new NeighborAddress(address, operationalState); + return new NeighborAddress(address, configurationState); } /// Initializes a new instance of ExternalNetworkData. @@ -251,53 +340,79 @@ public static NeighborAddress NeighborAddress(string address = null, string oper /// The resourceType. /// The systemData. /// Switch configuration description. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// Import Route Policy either IPv4 or IPv6. + /// Export Route Policy either IPv4 or IPv6. /// Gets the networkToNetworkInterconnectId of the resource. - /// List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// AdministrativeState of the externalNetwork. Example: Enabled | Disabled. - /// Gets the provisioning state of the resource. /// Peering option list. /// option B properties object. /// option A properties object. - /// ARM resource ID of importRoutePolicy. - /// ARM resource ID of exportRoutePolicy. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static ExternalNetworkData ExternalNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, string networkToNetworkInterconnectId = null, IEnumerable disabledOnResources = null, EnabledDisabledState? administrativeState = null, ProvisioningState? provisioningState = null, PeeringOption peeringOption = default, OptionBProperties optionBProperties = null, ExternalNetworkPropertiesOptionAProperties optionAProperties = null, string importRoutePolicyId = null, string exportRoutePolicyId = null) + public static ExternalNetworkData ExternalNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, ResourceIdentifier importRoutePolicyId = null, ResourceIdentifier exportRoutePolicyId = null, ImportRoutePolicy importRoutePolicy = null, ExportRoutePolicy exportRoutePolicy = null, string networkToNetworkInterconnectId = null, PeeringOption peeringOption = default, L3OptionBProperties optionBProperties = null, ExternalNetworkPropertiesOptionAProperties optionAProperties = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { - disabledOnResources ??= new List(); - - return new ExternalNetworkData(id, name, resourceType, systemData, annotation, networkToNetworkInterconnectId, disabledOnResources?.ToList(), administrativeState, provisioningState, peeringOption, optionBProperties, optionAProperties, importRoutePolicyId, exportRoutePolicyId); + return new ExternalNetworkData(id, name, resourceType, systemData, annotation, importRoutePolicyId, exportRoutePolicyId, importRoutePolicy, exportRoutePolicy, networkToNetworkInterconnectId, peeringOption, optionBProperties, optionAProperties, configurationState, provisioningState, administrativeState); } /// Initializes a new instance of ExternalNetworkPropertiesOptionAProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. /// MTU to use for option A peering. /// Vlan identifier. Example : 501. /// Fabric ASN number. Example 65001. /// Peer ASN number.Example : 28. /// BFD configuration properties. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. /// A new instance for mocking. - public static ExternalNetworkPropertiesOptionAProperties ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = null, int? vlanId = null, int? fabricASN = null, int? peerASN = null, BfdConfiguration bfdConfiguration = null) + public static ExternalNetworkPropertiesOptionAProperties ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = null, int? vlanId = null, long? fabricASN = null, long? peerASN = null, BfdConfiguration bfdConfiguration = null, ResourceIdentifier ingressAclId = null, ResourceIdentifier egressAclId = null) { - return new ExternalNetworkPropertiesOptionAProperties(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricASN, peerASN, bfdConfiguration); + return new ExternalNetworkPropertiesOptionAProperties(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricASN, peerASN, bfdConfiguration, ingressAclId, egressAclId); } - /// Initializes a new instance of Layer3OptionAProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// Initializes a new instance of ExternalNetworkPatchPropertiesOptionAProperties. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. /// MTU to use for option A peering. /// Vlan identifier. Example : 501. /// Fabric ASN number. Example 65001. /// Peer ASN number.Example : 28. /// BFD configuration properties. - /// A new instance for mocking. - public static Layer3OptionAProperties Layer3OptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = null, int? vlanId = null, int? fabricASN = null, int? peerASN = null, BfdConfiguration bfdConfiguration = null) + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// A new instance for mocking. + public static ExternalNetworkPatchPropertiesOptionAProperties ExternalNetworkPatchPropertiesOptionAProperties(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, int? mtu = null, int? vlanId = null, long? fabricASN = null, long? peerASN = null, BfdConfiguration bfdConfiguration = null, ResourceIdentifier ingressAclId = null, ResourceIdentifier egressAclId = null) { - return new Layer3OptionAProperties(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricASN, peerASN, bfdConfiguration); + return new ExternalNetworkPatchPropertiesOptionAProperties(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricASN, peerASN, bfdConfiguration, ingressAclId, egressAclId); + } + + /// Initializes a new instance of NeighborGroupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// An array of destination IPv4 Addresses or IPv6 Addresses. + /// List of NetworkTap IDs where neighbor group is associated. + /// List of Network Tap Rule IDs where neighbor group is associated. + /// The provisioning state of the resource. + /// A new instance for mocking. + public static NeighborGroupData NeighborGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, NeighborGroupDestination destination = null, IEnumerable networkTapIds = null, IEnumerable networkTapRuleIds = null, ProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + networkTapIds ??= new List(); + networkTapRuleIds ??= new List(); + + return new NeighborGroupData(id, name, resourceType, systemData, tags, location, annotation, destination, networkTapIds?.ToList(), networkTapRuleIds?.ToList(), provisioningState); } /// Initializes a new instance of NetworkDeviceSkuData. @@ -307,19 +422,18 @@ public static Layer3OptionAProperties Layer3OptionAProperties(string primaryIPv4 /// The systemData. /// Model of the network device. /// Manufacturer of the network device. - /// List of network device interfaces. - /// Network device limits. + /// List of supported version details of network device. /// Available roles for the network device. /// List of network device interfaces. - /// Gets the provisioning state of the resource. + /// Provisioning state of the resource. /// A new instance for mocking. - public static NetworkDeviceSkuData NetworkDeviceSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string model = null, string manufacturer = null, IEnumerable supportedVersions = null, DeviceLimits limits = null, IEnumerable supportedRoleTypes = null, IEnumerable interfaces = null, ProvisioningState? provisioningState = null) + public static NetworkDeviceSkuData NetworkDeviceSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string model = null, string manufacturer = null, IEnumerable supportedVersions = null, IEnumerable supportedRoleTypes = null, IEnumerable interfaces = null, ProvisioningState? provisioningState = null) { supportedVersions ??= new List(); supportedRoleTypes ??= new List(); interfaces ??= new List(); - return new NetworkDeviceSkuData(id, name, resourceType, systemData, model, manufacturer, supportedVersions?.ToList(), limits, supportedRoleTypes?.ToList(), interfaces?.ToList(), provisioningState); + return new NetworkDeviceSkuData(id, name, resourceType, systemData, model, manufacturer, supportedVersions?.ToList(), supportedRoleTypes?.ToList(), interfaces?.ToList(), provisioningState); } /// Initializes a new instance of NetworkDeviceData. @@ -330,19 +444,23 @@ public static NetworkDeviceSkuData NetworkDeviceSkuData(ResourceIdentifier id = /// The tags. /// The location. /// Switch configuration description. - /// The host Name of the device. - /// serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + /// The host name of the device. + /// Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. /// Current version of the device as defined in SKU. /// Network Device SKU name. - /// networkDeviceRole is the device role: Example: CE | ToR. - /// Gets the provisioning state of the resource. + /// NetworkDeviceRole is the device role: Example: CE | ToR. /// Reference to network rack resource id. + /// Management IPv4 Address. + /// Management IPv6 Address. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static NetworkDeviceData NetworkDeviceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, string hostName = null, string serialNumber = null, string version = null, string networkDeviceSku = null, NetworkDeviceRoleType? networkDeviceRole = null, ProvisioningState? provisioningState = null, string networkRackId = null) + public static NetworkDeviceData NetworkDeviceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, string hostName = null, string serialNumber = null, string version = null, string networkDeviceSku = null, NetworkDeviceRole? networkDeviceRole = null, string networkRackId = null, string managementIPv4Address = null, string managementIPv6Address = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - return new NetworkDeviceData(id, name, resourceType, systemData, tags, location, annotation, hostName, serialNumber, version, networkDeviceSku, networkDeviceRole, provisioningState, networkRackId); + return new NetworkDeviceData(id, name, resourceType, systemData, tags, location, annotation, hostName, serialNumber, version, networkDeviceSku, networkDeviceRole, networkRackId, managementIPv4Address, managementIPv6Address, configurationState, provisioningState, administrativeState); } /// Initializes a new instance of NetworkInterfaceData. @@ -351,59 +469,17 @@ public static NetworkDeviceData NetworkDeviceData(ResourceIdentifier id = null, /// The resourceType. /// The systemData. /// Switch configuration description. - /// physicalIdentifier of the network interface. - /// administrativeState of the network interface. Example: Enabled | Disabled. - /// Gets the provisioning state of the resource. - /// The arm resource id of the interface or compute server its connected to. + /// Physical Identifier of the network interface. + /// The ARM resource id of the interface or compute server its connected to. /// The Interface Type. Example: Management/Data. - /// ipv4Address. - /// ipv6Address. + /// IPv4Address of the interface. + /// IPv6Address of the interface. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static NetworkInterfaceData NetworkInterfaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, string physicalIdentifier = null, EnabledDisabledState? administrativeState = null, ProvisioningState? provisioningState = null, string connectedTo = null, InterfaceType? interfaceType = null, string ipv4Address = null, string ipv6Address = null) - { - return new NetworkInterfaceData(id, name, resourceType, systemData, annotation, physicalIdentifier, administrativeState, provisioningState, connectedTo, interfaceType, ipv4Address, ipv6Address); - } - - /// Initializes a new instance of SupportPackageProperties. - /// The URL to fetch the generated support package from. - /// is null. - /// A new instance for mocking. - public static SupportPackageProperties SupportPackageProperties(string supportPackageURL = null) + public static NetworkInterfaceData NetworkInterfaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, string physicalIdentifier = null, string connectedTo = null, InterfaceType? interfaceType = null, string ipv4Address = null, string ipv6Address = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { - if (supportPackageURL == null) - { - throw new ArgumentNullException(nameof(supportPackageURL)); - } - - return new SupportPackageProperties(supportPackageURL); - } - - /// Initializes a new instance of GetDeviceStatusProperties. - /// Primary or Secondary power end. - /// On or Off power cycle state. - /// The serial number of the device. - /// is null. - /// A new instance for mocking. - public static GetDeviceStatusProperties GetDeviceStatusProperties(OperationalStatus operationalStatus = default, PowerCycleState powerCycleState = default, string serialNumber = null) - { - if (serialNumber == null) - { - throw new ArgumentNullException(nameof(serialNumber)); - } - - return new GetDeviceStatusProperties(operationalStatus, powerCycleState, serialNumber); - } - - /// Initializes a new instance of InterfaceStatus. - /// The interface administrative state. - /// The interface operational status. - /// The physical status. - /// The interface transceiver type. Example: up or down. - /// Connected to ARM resource or external interface. - /// A new instance for mocking. - public static InterfaceStatus InterfaceStatus(EnabledDisabledState? administrativeState = null, string operationalStatus = null, string phyStatus = null, string transceiverStatus = null, string connectedTo = null) - { - return new InterfaceStatus(administrativeState, operationalStatus, phyStatus, transceiverStatus, connectedTo); + return new NetworkInterfaceData(id, name, resourceType, systemData, annotation, physicalIdentifier, connectedTo, interfaceType, ipv4Address, ipv6Address, provisioningState, administrativeState); } /// Initializes a new instance of NetworkFabricControllerData. @@ -420,44 +496,35 @@ public static InterfaceStatus InterfaceStatus(EnabledDisabledState? administrati /// WorkloadServices IP ranges. /// Managed Resource Group configuration properties. /// The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service. - /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for the backward compatibility. + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + /// List of tenant InternetGateway resource IDs. /// IPv4 Network Fabric Controller Address Space. /// IPv6 Network Fabric Controller Address Space. - /// The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. + /// Network Fabric Controller SKU. /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. /// A new instance for mocking. - public static NetworkFabricControllerData NetworkFabricControllerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable infrastructureExpressRouteConnections = null, IEnumerable workloadExpressRouteConnections = null, InfrastructureServices infrastructureServices = null, WorkloadServices workloadServices = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, IEnumerable networkFabricIds = null, bool? workloadManagementNetwork = null, string ipv4AddressSpace = null, string ipv6AddressSpace = null, NetworkFabricControllerOperationalState? operationalState = null, ProvisioningState? provisioningState = null) + public static NetworkFabricControllerData NetworkFabricControllerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable infrastructureExpressRouteConnections = null, IEnumerable workloadExpressRouteConnections = null, ControllerServices infrastructureServices = null, ControllerServices workloadServices = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, IEnumerable networkFabricIds = null, bool? workloadManagementNetwork = null, IsWorkloadManagementNetworkEnabled? isWorkloadManagementNetworkEnabled = null, IEnumerable tenantInternetGatewayIds = null, string ipv4AddressSpace = null, string ipv6AddressSpace = null, NfcSku? nfcSku = null, ProvisioningState? provisioningState = null) { tags ??= new Dictionary(); infrastructureExpressRouteConnections ??= new List(); workloadExpressRouteConnections ??= new List(); - networkFabricIds ??= new List(); + networkFabricIds ??= new List(); + tenantInternetGatewayIds ??= new List(); - return new NetworkFabricControllerData(id, name, resourceType, systemData, tags, location, annotation, infrastructureExpressRouteConnections?.ToList(), workloadExpressRouteConnections?.ToList(), infrastructureServices, workloadServices, managedResourceGroupConfiguration, networkFabricIds?.ToList(), workloadManagementNetwork, ipv4AddressSpace, ipv6AddressSpace, operationalState, provisioningState); + return new NetworkFabricControllerData(id, name, resourceType, systemData, tags, location, annotation, infrastructureExpressRouteConnections?.ToList(), workloadExpressRouteConnections?.ToList(), infrastructureServices, workloadServices, managedResourceGroupConfiguration, networkFabricIds?.ToList(), workloadManagementNetwork, isWorkloadManagementNetworkEnabled, tenantInternetGatewayIds?.ToList(), ipv4AddressSpace, ipv6AddressSpace, nfcSku, provisioningState); } - /// Initializes a new instance of InfrastructureServices. + /// Initializes a new instance of ControllerServices. /// The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. /// The IPv6 is not supported right now. - /// A new instance for mocking. - public static InfrastructureServices InfrastructureServices(IEnumerable ipv4AddressSpaces = null, IEnumerable ipv6AddressSpaces = null) + /// A new instance for mocking. + public static ControllerServices ControllerServices(IEnumerable ipv4AddressSpaces = null, IEnumerable ipv6AddressSpaces = null) { ipv4AddressSpaces ??= new List(); ipv6AddressSpaces ??= new List(); - return new InfrastructureServices(ipv4AddressSpaces?.ToList(), ipv6AddressSpaces?.ToList()); - } - - /// Initializes a new instance of WorkloadServices. - /// The IPv4 Address space is optional, if the value is defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. - /// The IPv6 is not supported right now. - /// A new instance for mocking. - public static WorkloadServices WorkloadServices(IEnumerable ipv4AddressSpaces = null, IEnumerable ipv6AddressSpaces = null) - { - ipv4AddressSpaces ??= new List(); - ipv6AddressSpaces ??= new List(); - - return new WorkloadServices(ipv4AddressSpaces?.ToList(), ipv6AddressSpaces?.ToList()); + return new ControllerServices(ipv4AddressSpaces?.ToList(), ipv6AddressSpaces?.ToList()); } /// Initializes a new instance of NetworkFabricSkuData. @@ -465,16 +532,18 @@ public static WorkloadServices WorkloadServices(IEnumerable ipv4AddressS /// The name. /// The resourceType. /// The systemData. - /// Type of Network Fabric Sku. - /// Maximum number of compute racks available for this Network Fabric SKU. - /// Minimum supported version. - /// Maximum supported version. - /// The URI gives full details of sku. - /// Gets the provisioning state of the resource. + /// Type of Network Fabric SKU. + /// Maximum number of compute racks available for this Network Fabric SKU. The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. + /// Maximum number of servers available for this Network Fabric SKU. + /// List of supported Network Fabric SKU versions. + /// URL providing detailed configuration of the fabric SKU. + /// Provisioning state of the resource. /// A new instance for mocking. - public static NetworkFabricSkuData NetworkFabricSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string typePropertiesType = null, int? maxComputeRacks = null, string minSupportedVer = null, string maxSupportedVer = null, Uri detailsUri = null, ProvisioningState? provisioningState = null) + public static NetworkFabricSkuData NetworkFabricSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FabricSkuType? typePropertiesType = null, int? maxComputeRacks = null, int? maximumServerCount = null, IEnumerable supportedVersions = null, string details = null, ProvisioningState? provisioningState = null) { - return new NetworkFabricSkuData(id, name, resourceType, systemData, typePropertiesType, maxComputeRacks, minSupportedVer, maxSupportedVer, detailsUri, provisioningState); + supportedVersions ??= new List(); + + return new NetworkFabricSkuData(id, name, resourceType, systemData, typePropertiesType, maxComputeRacks, maximumServerCount, supportedVersions?.ToList(), details, provisioningState); } /// Initializes a new instance of NetworkFabricData. @@ -485,66 +554,60 @@ public static NetworkFabricSkuData NetworkFabricSkuData(ResourceIdentifier id = /// The tags. /// The location. /// Switch configuration description. - /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. - /// List of L2IsolationDomain resource IDs under the Network Fabric. - /// List of L3IsolationDomain resource IDs under the Network Fabric. /// Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. - /// Number of racks associated to Network Fabric.Possible values are from 2-8. + /// The version of Network Fabric. + /// Array of router IDs. + /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. + /// Number of compute racks associated to Network Fabric. /// Number of servers.Possible values are from 1-16. /// IPv4Prefix for Management Network. Example: 10.1.0.0/19. /// IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - /// Router Id of CE to be used for MP-BGP between PE and CE. /// ASN of CE devices for CE/PE connectivity. - /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. /// Network and credentials configuration currently applied to terminal server. /// Configuration to be used to setup the management network. - /// Gets the operational state of the resource. - /// Gets the provisioning state of the resource. + /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + /// List of L2 Isolation Domain resource IDs under the Network Fabric. + /// List of L3 Isolation Domain resource IDs under the Network Fabric. + /// Configuration state of the resource. + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. + /// Administrative state of the resource. /// A new instance for mocking. - public static NetworkFabricData NetworkFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable racks = null, IEnumerable l2IsolationDomains = null, IEnumerable l3IsolationDomains = null, string networkFabricSku = null, int? rackCount = null, int? serverCountPerRack = null, string ipv4Prefix = null, string ipv6Prefix = null, string routerId = null, int? fabricASN = null, string networkFabricControllerId = null, TerminalServerConfiguration terminalServerConfiguration = null, ManagementNetworkConfiguration managementNetworkConfiguration = null, NetworkFabricOperationalState? operationalState = null, ProvisioningState? provisioningState = null) + public static NetworkFabricData NetworkFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, string networkFabricSku = null, string fabricVersion = null, IEnumerable routerIds = null, ResourceIdentifier networkFabricControllerId = null, int? rackCount = null, int serverCountPerRack = default, string ipv4Prefix = null, string ipv6Prefix = null, long fabricASN = default, TerminalServerConfiguration terminalServerConfiguration = null, ManagementNetworkConfigurationProperties managementNetworkConfiguration = null, IEnumerable racks = null, IEnumerable l2IsolationDomains = null, IEnumerable l3IsolationDomains = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); + routerIds ??= new List(); racks ??= new List(); l2IsolationDomains ??= new List(); l3IsolationDomains ??= new List(); - return new NetworkFabricData(id, name, resourceType, systemData, tags, location, annotation, racks?.ToList(), l2IsolationDomains?.ToList(), l3IsolationDomains?.ToList(), networkFabricSku, rackCount, serverCountPerRack, ipv4Prefix, ipv6Prefix, routerId, fabricASN, networkFabricControllerId, terminalServerConfiguration, managementNetworkConfiguration, operationalState, provisioningState); + return new NetworkFabricData(id, name, resourceType, systemData, tags, location, annotation, networkFabricSku, fabricVersion, routerIds?.ToList(), networkFabricControllerId, rackCount, serverCountPerRack, ipv4Prefix, ipv6Prefix, fabricASN, terminalServerConfiguration, managementNetworkConfiguration, racks?.ToList(), l2IsolationDomains?.ToList(), l3IsolationDomains?.ToList(), configurationState, provisioningState, administrativeState); } /// Initializes a new instance of TerminalServerConfiguration. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// ARM Resource ID used for the NetworkDevice. /// Username for the terminal server connection. /// Password for the terminal server connection. /// Serial Number of Terminal server. + /// ARM Resource ID used for the NetworkDevice. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. /// A new instance for mocking. - public static TerminalServerConfiguration TerminalServerConfiguration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, string networkDeviceId = null, string username = null, string password = null, string serialNumber = null) + public static TerminalServerConfiguration TerminalServerConfiguration(string username = null, string password = null, string serialNumber = null, string networkDeviceId = null, string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null) { - return new TerminalServerConfiguration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, networkDeviceId, username, password, serialNumber); + return new TerminalServerConfiguration(username, password, serialNumber, networkDeviceId, primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix); } /// Initializes a new instance of VpnConfigurationProperties. - /// Indicates configuration state. Example: Enabled | Disabled. - /// Gets the networkToNetworkInterconnectId of the resource. + /// ARM Resource ID of the Network To Network Interconnect. + /// Administrative state of the resource. /// Peering option list. /// option B properties. /// option A properties. /// A new instance for mocking. - public static VpnConfigurationProperties VpnConfigurationProperties(EnabledDisabledState? administrativeState = null, string networkToNetworkInterconnectId = null, PeeringOption peeringOption = default, NetworkFabricOptionBProperties optionBProperties = null, NetworkFabricOptionAProperties optionAProperties = null) - { - return new VpnConfigurationProperties(administrativeState, networkToNetworkInterconnectId, peeringOption, optionBProperties, optionAProperties); - } - - /// Initializes a new instance of FabricBfdConfiguration. - /// interval in seconds. Example: 300. - /// multiplier. Example: 3. - /// A new instance for mocking. - public static FabricBfdConfiguration FabricBfdConfiguration(int? interval = null, int? multiplier = null) + public static VpnConfigurationProperties VpnConfigurationProperties(ResourceIdentifier networkToNetworkInterconnectId = null, AdministrativeState? administrativeState = null, PeeringOption peeringOption = default, OptionBProperties optionBProperties = null, VpnConfigurationPropertiesOptionAProperties optionAProperties = null) { - return new FabricBfdConfiguration(interval, multiplier); + return new VpnConfigurationProperties(networkToNetworkInterconnectId, administrativeState, peeringOption, optionBProperties, optionAProperties); } /// Initializes a new instance of NetworkToNetworkInterconnectData. @@ -553,63 +616,93 @@ public static FabricBfdConfiguration FabricBfdConfiguration(int? interval = null /// The resourceType. /// The systemData. /// Type of NNI used. Example: CE | NPB. - /// Gets the administrativeState of the resource. Example -Enabled/Disabled. /// Configuration to use NNI for Infrastructure Management. Example: True/False. - /// Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. - /// Common properties for Layer2Configuration. - /// Common properties for Layer3Configuration. - /// Gets the provisioning state of the resource. + /// Based on this option layer3 parameters are mandatory. Example: True/False. + /// Common properties for Layer2 Configuration. + /// Common properties for Layer3Configuration. + /// NPB Static Route Configuration properties. + /// Import Route Policy configuration. + /// Export Route Policy configuration. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static NetworkToNetworkInterconnectData NetworkToNetworkInterconnectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NniType? nniType = null, EnabledDisabledState? administrativeState = null, BooleanEnumProperty? isManagementType = null, BooleanEnumProperty? useOptionB = null, Layer2Configuration layer2Configuration = null, Layer3Configuration layer3Configuration = null, ProvisioningState? provisioningState = null) + public static NetworkToNetworkInterconnectData NetworkToNetworkInterconnectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NniType? nniType = null, IsManagementType? isManagementType = null, BooleanEnumProperty useOptionB = default, Layer2Configuration layer2Configuration = null, NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration = null, NpbStaticRouteConfiguration npbStaticRouteConfiguration = null, ImportRoutePolicyInformation importRoutePolicy = null, ExportRoutePolicyInformation exportRoutePolicy = null, ResourceIdentifier egressAclId = null, ResourceIdentifier ingressAclId = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { - return new NetworkToNetworkInterconnectData(id, name, resourceType, systemData, nniType, administrativeState, isManagementType, useOptionB, layer2Configuration, layer3Configuration, provisioningState); + return new NetworkToNetworkInterconnectData(id, name, resourceType, systemData, nniType, isManagementType, useOptionB, layer2Configuration, optionBLayer3Configuration, npbStaticRouteConfiguration, importRoutePolicy, exportRoutePolicy, egressAclId, ingressAclId, configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of Layer2Configuration. - /// Number of ports connected between PE/CE. Maximum value depends on FabricSKU. - /// MTU of the packets between PE & CE. - /// List of network device interfaces resource IDs. - /// A new instance for mocking. - public static Layer2Configuration Layer2Configuration(int? portCount = null, int mtu = default, IEnumerable interfaces = null) + /// Initializes a new instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + /// ASN of PE devices for CE/PE connectivity.Example : 28. + /// VLAN for CE/PE Layer 3 connectivity.Example : 501. + /// ASN of CE devices for CE/PE connectivity. + /// A new instance for mocking. + public static NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, long? peerASN = null, int? vlanId = null, long? fabricASN = null) { - interfaces ??= new List(); - - return new Layer2Configuration(portCount, mtu, interfaces?.ToList()); + return new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, peerASN, vlanId, fabricASN); } - /// Initializes a new instance of Layer3Configuration. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// importRoutePolicyId. - /// exportRoutePolicyId. + /// Initializes a new instance of OptionBLayer3Configuration. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. /// ASN of PE devices for CE/PE connectivity.Example : 28. /// VLAN for CE/PE Layer 3 connectivity.Example : 501. /// ASN of CE devices for CE/PE connectivity. - /// A new instance for mocking. - public static Layer3Configuration Layer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, string importRoutePolicyId = null, string exportRoutePolicyId = null, int? peerASN = null, int? vlanId = null, int? fabricASN = null) + /// A new instance for mocking. + public static OptionBLayer3Configuration OptionBLayer3Configuration(string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null, long? peerASN = null, int? vlanId = null, long? fabricASN = null) + { + return new OptionBLayer3Configuration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, peerASN, vlanId, fabricASN); + } + + /// Initializes a new instance of NetworkToNetworkInterconnectPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Common properties for Layer2Configuration. + /// Common properties for Layer3Configuration. + /// NPB Static Route Configuration properties. + /// Import Route Policy information. + /// Export Route Policy information. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// A new instance for mocking. + public static NetworkToNetworkInterconnectPatch NetworkToNetworkInterconnectPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Layer2Configuration layer2Configuration = null, OptionBLayer3Configuration optionBLayer3Configuration = null, NpbStaticRouteConfiguration npbStaticRouteConfiguration = null, ImportRoutePolicyInformation importRoutePolicy = null, ExportRoutePolicyInformation exportRoutePolicy = null, ResourceIdentifier egressAclId = null, ResourceIdentifier ingressAclId = null) { - return new Layer3Configuration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, importRoutePolicyId, exportRoutePolicyId, peerASN, vlanId, fabricASN); + return new NetworkToNetworkInterconnectPatch(id, name, resourceType, systemData, layer2Configuration, optionBLayer3Configuration, npbStaticRouteConfiguration, importRoutePolicy, exportRoutePolicy, egressAclId, ingressAclId); } - /// Initializes a new instance of NetworkRackSkuData. + /// Initializes a new instance of NetworkPacketBrokerData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The role of the Network Rack: Aggregate or Compute. - /// Maximum number of servers available for this SKU. - /// Maximum number of storage devices available for this SKU. - /// Maximum number of network uplinks available for this SKU. - /// List of network device properties / role for the Network Rack. - /// Gets the provisioning state of the resource. - /// A new instance for mocking. - public static NetworkRackSkuData NetworkRackSkuData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NetworkRackRoleName roleName = default, int? maximumServerCount = null, int? maximumStorageCount = null, int? maximumUplinks = null, IEnumerable networkDevices = null, ProvisioningState? provisioningState = null) + /// The tags. + /// The location. + /// ARM resource ID of the Network Fabric. + /// List of ARM resource IDs of Network Devices [NPB]. + /// List of network interfaces across NPB devices that are used to mirror source traffic. + /// List of network Tap IDs configured on NPB. + /// List of neighbor group IDs configured on NPB. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static NetworkPacketBrokerData NetworkPacketBrokerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier networkFabricId = null, IEnumerable networkDeviceIds = null, IEnumerable sourceInterfaceIds = null, IEnumerable networkTapIds = null, IEnumerable neighborGroupIds = null, ProvisioningState? provisioningState = null) { - networkDevices ??= new List(); + tags ??= new Dictionary(); + networkDeviceIds ??= new List(); + sourceInterfaceIds ??= new List(); + networkTapIds ??= new List(); + neighborGroupIds ??= new List(); - return new NetworkRackSkuData(id, name, resourceType, systemData, roleName, maximumServerCount, maximumStorageCount, maximumUplinks, networkDevices?.ToList(), provisioningState); + return new NetworkPacketBrokerData(id, name, resourceType, systemData, tags, location, networkFabricId, networkDeviceIds?.ToList(), sourceInterfaceIds?.ToList(), networkTapIds?.ToList(), neighborGroupIds?.ToList(), provisioningState); } /// Initializes a new instance of NetworkRackData. @@ -620,17 +713,69 @@ public static NetworkRackSkuData NetworkRackSkuData(ResourceIdentifier id = null /// The tags. /// The location. /// Switch configuration description. - /// Network Rack SKU name. - /// Network Fabric ARM resource id. - /// List of network device ARM resource ids. - /// Gets the provisioning state of the resource. + /// Network Rack SKU name. + /// ARM resource ID of the Network Fabric. + /// List of network device ARM resource IDs. + /// Provisioning state of the resource. /// A new instance for mocking. - public static NetworkRackData NetworkRackData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, string networkRackSku = null, string networkFabricId = null, IEnumerable networkDevices = null, ProvisioningState? provisioningState = null) + public static NetworkRackData NetworkRackData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, NetworkRackType? networkRackType = null, ResourceIdentifier networkFabricId = null, IEnumerable networkDevices = null, ProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + networkDevices ??= new List(); + + return new NetworkRackData(id, name, resourceType, systemData, tags, location, annotation, networkRackType, networkFabricId, networkDevices?.ToList(), provisioningState); + } + + /// Initializes a new instance of NetworkTapRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Input method to configure Network Tap Rule. + /// Network Tap Rules file URL. + /// List of match configurations. + /// List of dynamic match configurations. + /// The ARM resource Id of the NetworkTap. + /// Polling interval in seconds. + /// The last sync timestamp. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + /// A new instance for mocking. + public static NetworkTapRuleData NetworkTapRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ConfigurationType? configurationType = null, Uri tapRulesUri = null, IEnumerable matchConfigurations = null, IEnumerable dynamicMatchConfigurations = null, string networkTapId = null, PollingIntervalInSecond? pollingIntervalInSeconds = null, DateTimeOffset? lastSyncedOn = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) + { + tags ??= new Dictionary(); + matchConfigurations ??= new List(); + dynamicMatchConfigurations ??= new List(); + + return new NetworkTapRuleData(id, name, resourceType, systemData, tags, location, annotation, configurationType, tapRulesUri, matchConfigurations?.ToList(), dynamicMatchConfigurations?.ToList(), networkTapId, pollingIntervalInSeconds, lastSyncedOn, configurationState, provisioningState, administrativeState); + } + + /// Initializes a new instance of NetworkTapData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// ARM resource ID of the Network Packet Broker. + /// Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + /// List of destinations to send the filter traffic. + /// Polling type. + /// Gets the configurations state of the resource. + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of Network Tap provisioning. + /// Administrative state of the resource. Example -Enabled/Disabled. + /// A new instance for mocking. + public static NetworkTapData NetworkTapData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ResourceIdentifier networkPacketBrokerId = null, ResourceIdentifier sourceTapRuleId = null, IEnumerable destinations = null, PollingType? pollingType = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - networkDevices ??= new List(); + destinations ??= new List(); - return new NetworkRackData(id, name, resourceType, systemData, tags, location, annotation, networkRackSku, networkFabricId, networkDevices?.ToList(), provisioningState); + return new NetworkTapData(id, name, resourceType, systemData, tags, location, annotation, networkPacketBrokerId, sourceTapRuleId, destinations?.ToList(), pollingType, configurationState, provisioningState, administrativeState); } /// Initializes a new instance of RoutePolicyData. @@ -641,15 +786,20 @@ public static NetworkRackData NetworkRackData(ResourceIdentifier id = null, stri /// The tags. /// The location. /// Switch configuration description. + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. /// Route Policy statements. - /// Gets the provisioning state of the resource. + /// Arm Resource ID of Network Fabric. + /// AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. /// A new instance for mocking. - public static RoutePolicyData RoutePolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable statements = null, ProvisioningState? provisioningState = null) + public static RoutePolicyData RoutePolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, CommunityActionType? defaultAction = null, IEnumerable statements = null, ResourceIdentifier networkFabricId = null, AddressFamilyType? addressFamilyType = null, ConfigurationState? configurationState = null, ProvisioningState? provisioningState = null, AdministrativeState? administrativeState = null) { tags ??= new Dictionary(); statements ??= new List(); - return new RoutePolicyData(id, name, resourceType, systemData, tags, location, annotation, statements?.ToList(), provisioningState); + return new RoutePolicyData(id, name, resourceType, systemData, tags, location, annotation, defaultAction, statements?.ToList(), networkFabricId, addressFamilyType, configurationState, provisioningState, administrativeState); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs index 026491083daf4..90db47bfb8ad8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs @@ -68,6 +68,44 @@ public static AccessControlListResource GetAccessControlListResource(this ArmCli } #endregion + #region InternetGatewayResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static InternetGatewayResource GetInternetGatewayResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + InternetGatewayResource.ValidateResourceId(id); + return new InternetGatewayResource(client, id); + } + ); + } + #endregion + + #region InternetGatewayRuleResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static InternetGatewayRuleResource GetInternetGatewayRuleResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + InternetGatewayRuleResource.ValidateResourceId(id); + return new InternetGatewayRuleResource(client, id); + } + ); + } + #endregion + #region IPCommunityResource /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. @@ -201,6 +239,25 @@ public static ExternalNetworkResource GetExternalNetworkResource(this ArmClient } #endregion + #region NeighborGroupResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static NeighborGroupResource GetNeighborGroupResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NeighborGroupResource.ValidateResourceId(id); + return new NeighborGroupResource(client, id); + } + ); + } + #endregion + #region NetworkDeviceSkuResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -334,20 +391,20 @@ public static NetworkToNetworkInterconnectResource GetNetworkToNetworkInterconne } #endregion - #region NetworkRackSkuResource + #region NetworkPacketBrokerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static NetworkRackSkuResource GetNetworkRackSkuResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkPacketBrokerResource GetNetworkPacketBrokerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - NetworkRackSkuResource.ValidateResourceId(id); - return new NetworkRackSkuResource(client, id); + NetworkPacketBrokerResource.ValidateResourceId(id); + return new NetworkPacketBrokerResource(client, id); } ); } @@ -372,6 +429,44 @@ public static NetworkRackResource GetNetworkRackResource(this ArmClient client, } #endregion + #region NetworkTapRuleResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static NetworkTapRuleResource GetNetworkTapRuleResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkTapRuleResource.ValidateResourceId(id); + return new NetworkTapRuleResource(client, id); + } + ); + } + #endregion + + #region NetworkTapResource + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static NetworkTapResource GetNetworkTapResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkTapResource.ValidateResourceId(id); + return new NetworkTapResource(client, id); + } + ); + } + #endregion + #region RoutePolicyResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -447,6 +542,118 @@ public static Response GetAccessControlList(this Reso return resourceGroupResource.GetAccessControlLists().Get(accessControlListName, cancellationToken); } + /// Gets a collection of InternetGatewayResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of InternetGatewayResources and their operations over a InternetGatewayResource. + public static InternetGatewayCollection GetInternetGateways(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetInternetGateways(); + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetInternetGatewayAsync(this ResourceGroupResource resourceGroupResource, string internetGatewayName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetInternetGateways().GetAsync(internetGatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetInternetGateway(this ResourceGroupResource resourceGroupResource, string internetGatewayName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetInternetGateways().Get(internetGatewayName, cancellationToken); + } + + /// Gets a collection of InternetGatewayRuleResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of InternetGatewayRuleResources and their operations over a InternetGatewayRuleResource. + public static InternetGatewayRuleCollection GetInternetGatewayRules(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetInternetGatewayRules(); + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetInternetGatewayRuleAsync(this ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetInternetGatewayRules().GetAsync(internetGatewayRuleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetInternetGatewayRule(this ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetInternetGatewayRules().Get(internetGatewayRuleName, cancellationToken); + } + /// Gets a collection of IPCommunityResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of IPCommunityResources and their operations over a IPCommunityResource. @@ -727,6 +934,62 @@ public static Response GetL3IsolationDomain(this Reso return resourceGroupResource.GetL3IsolationDomains().Get(l3IsolationDomainName, cancellationToken); } + /// Gets a collection of NeighborGroupResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NeighborGroupResources and their operations over a NeighborGroupResource. + public static NeighborGroupCollection GetNeighborGroups(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNeighborGroups(); + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetNeighborGroupAsync(this ResourceGroupResource resourceGroupResource, string neighborGroupName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNeighborGroups().GetAsync(neighborGroupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetNeighborGroup(this ResourceGroupResource resourceGroupResource, string neighborGroupName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNeighborGroups().Get(neighborGroupName, cancellationToken); + } + /// Gets a collection of NetworkDeviceResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of NetworkDeviceResources and their operations over a NetworkDeviceResource. @@ -736,7 +999,7 @@ public static NetworkDeviceCollection GetNetworkDevices(this ResourceGroupResour } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path @@ -760,7 +1023,7 @@ public static async Task> GetNetworkDeviceAsync( } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path @@ -895,6 +1158,62 @@ public static Response GetNetworkFabric(this ResourceGrou return resourceGroupResource.GetNetworkFabrics().Get(networkFabricName, cancellationToken); } + /// Gets a collection of NetworkPacketBrokerResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkPacketBrokerResources and their operations over a NetworkPacketBrokerResource. + public static NetworkPacketBrokerCollection GetNetworkPacketBrokers(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkPacketBrokers(); + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetNetworkPacketBrokerAsync(this ResourceGroupResource resourceGroupResource, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkPacketBrokers().GetAsync(networkPacketBrokerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetNetworkPacketBroker(this ResourceGroupResource resourceGroupResource, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkPacketBrokers().Get(networkPacketBrokerName, cancellationToken); + } + /// Gets a collection of NetworkRackResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of NetworkRackResources and their operations over a NetworkRackResource. @@ -951,6 +1270,118 @@ public static Response GetNetworkRack(this ResourceGroupRes return resourceGroupResource.GetNetworkRacks().Get(networkRackName, cancellationToken); } + /// Gets a collection of NetworkTapRuleResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkTapRuleResources and their operations over a NetworkTapRuleResource. + public static NetworkTapRuleCollection GetNetworkTapRules(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkTapRules(); + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetNetworkTapRuleAsync(this ResourceGroupResource resourceGroupResource, string networkTapRuleName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkTapRules().GetAsync(networkTapRuleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetNetworkTapRule(this ResourceGroupResource resourceGroupResource, string networkTapRuleName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkTapRules().Get(networkTapRuleName, cancellationToken); + } + + /// Gets a collection of NetworkTapResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkTapResources and their operations over a NetworkTapResource. + public static NetworkTapCollection GetNetworkTaps(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkTaps(); + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static async Task> GetNetworkTapAsync(this ResourceGroupResource resourceGroupResource, string networkTapName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkTaps().GetAsync(networkTapName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The instance the method will execute against. + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public static Response GetNetworkTap(this ResourceGroupResource resourceGroupResource, string networkTapName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkTaps().Get(networkTapName, cancellationToken); + } + /// Gets a collection of RoutePolicyResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of RoutePolicyResources and their operations over a RoutePolicyResource. @@ -1016,7 +1447,7 @@ public static NetworkDeviceSkuCollection GetNetworkDeviceSkus(this SubscriptionR } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path @@ -1029,7 +1460,7 @@ public static NetworkDeviceSkuCollection GetNetworkDeviceSkus(this SubscriptionR /// /// /// The instance the method will execute against. - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -1040,7 +1471,7 @@ public static async Task> GetNetworkDeviceSku } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path @@ -1053,7 +1484,7 @@ public static async Task> GetNetworkDeviceSku /// /// /// The instance the method will execute against. - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -1072,7 +1503,7 @@ public static NetworkFabricSkuCollection GetNetworkFabricSkus(this SubscriptionR } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path @@ -1085,7 +1516,7 @@ public static NetworkFabricSkuCollection GetNetworkFabricSkus(this SubscriptionR /// /// /// The instance the method will execute against. - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -1096,7 +1527,7 @@ public static async Task> GetNetworkFabricSku } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path @@ -1109,7 +1540,7 @@ public static async Task> GetNetworkFabricSku /// /// /// The instance the method will execute against. - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -1119,106 +1550,134 @@ public static Response GetNetworkFabricSku(this Subscr return subscriptionResource.GetNetworkFabricSkus().Get(networkFabricSkuName, cancellationToken); } - /// Gets a collection of NetworkRackSkuResources in the SubscriptionResource. + /// + /// Implements AccessControlLists list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists + /// + /// + /// Operation Id + /// AccessControlLists_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAccessControlListsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlListsAsync(cancellationToken); + } + + /// + /// Implements AccessControlLists list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists + /// + /// + /// Operation Id + /// AccessControlLists_ListBySubscription + /// + /// + /// /// The instance the method will execute against. - /// An object representing collection of NetworkRackSkuResources and their operations over a NetworkRackSkuResource. - public static NetworkRackSkuCollection GetNetworkRackSkus(this SubscriptionResource subscriptionResource) + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAccessControlLists(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkRackSkus(); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlLists(cancellationToken); } /// - /// Get Network Rack SKU resource. + /// Displays Internet Gateways list by subscription GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways /// /// /// Operation Id - /// NetworkRackSkus_Get + /// InternetGateways_ListBySubscription /// /// /// /// The instance the method will execute against. - /// Name of the Network Rack Sku. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetNetworkRackSkuAsync(this SubscriptionResource subscriptionResource, string networkRackSkuName, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetInternetGatewaysAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return await subscriptionResource.GetNetworkRackSkus().GetAsync(networkRackSkuName, cancellationToken).ConfigureAwait(false); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetInternetGatewaysAsync(cancellationToken); } /// - /// Get Network Rack SKU resource. + /// Displays Internet Gateways list by subscription GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways /// /// /// Operation Id - /// NetworkRackSkus_Get + /// InternetGateways_ListBySubscription /// /// /// /// The instance the method will execute against. - /// Name of the Network Rack Sku. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetNetworkRackSku(this SubscriptionResource subscriptionResource, string networkRackSkuName, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetInternetGateways(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return subscriptionResource.GetNetworkRackSkus().Get(networkRackSkuName, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetInternetGateways(cancellationToken); } /// - /// Implements AccessControlLists list by subscription GET method. + /// List all Internet Gateway rules in the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules /// /// /// Operation Id - /// AccessControlLists_ListBySubscription + /// InternetGatewayRules_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAccessControlListsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetInternetGatewayRulesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlListsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetInternetGatewayRulesAsync(cancellationToken); } /// - /// Implements AccessControlLists list by subscription GET method. + /// List all Internet Gateway rules in the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules /// /// /// Operation Id - /// AccessControlLists_ListBySubscription + /// InternetGatewayRules_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAccessControlLists(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetInternetGatewayRules(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlLists(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetInternetGatewayRules(cancellationToken); } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -1239,7 +1698,7 @@ public static AsyncPageable GetIPCommunitiesAsync(this Subs } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -1427,6 +1886,48 @@ public static Pageable GetL3IsolationDomains(this Sub return GetSubscriptionResourceExtensionClient(subscriptionResource).GetL3IsolationDomains(cancellationToken); } + /// + /// Displays NeighborGroups list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNeighborGroupsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNeighborGroupsAsync(cancellationToken); + } + + /// + /// Displays NeighborGroups list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNeighborGroups(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNeighborGroups(cancellationToken); + } + /// /// List all the Network Device resources in a given subscription. /// @@ -1553,6 +2054,48 @@ public static Pageable GetNetworkFabrics(this Subscriptio return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabrics(cancellationToken); } + /// + /// Displays Network Packet Brokers list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkPacketBrokersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkPacketBrokersAsync(cancellationToken); + } + + /// + /// Displays Network Packet Brokers list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkPacketBrokers(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkPacketBrokers(cancellationToken); + } + /// /// List all Network Rack resources in the given subscription /// @@ -1595,6 +2138,90 @@ public static Pageable GetNetworkRacks(this SubscriptionRes return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkRacks(cancellationToken); } + /// + /// List all the Network Tap Rule resources in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkTapRulesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkTapRulesAsync(cancellationToken); + } + + /// + /// List all the Network Tap Rule resources in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkTapRules(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkTapRules(cancellationToken); + } + + /// + /// Displays Network Taps list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkTapsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkTapsAsync(cancellationToken); + } + + /// + /// Displays Network Taps list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListBySubscription + /// + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkTaps(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkTaps(cancellationToken); + } + /// /// Implements RoutePolicies list by subscription GET method. /// diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index 01414d2a58dde..2beaf451e596c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -38,6 +38,20 @@ public virtual AccessControlListCollection GetAccessControlLists() return GetCachedClient(Client => new AccessControlListCollection(Client, Id)); } + /// Gets a collection of InternetGatewayResources in the ResourceGroupResource. + /// An object representing collection of InternetGatewayResources and their operations over a InternetGatewayResource. + public virtual InternetGatewayCollection GetInternetGateways() + { + return GetCachedClient(Client => new InternetGatewayCollection(Client, Id)); + } + + /// Gets a collection of InternetGatewayRuleResources in the ResourceGroupResource. + /// An object representing collection of InternetGatewayRuleResources and their operations over a InternetGatewayRuleResource. + public virtual InternetGatewayRuleCollection GetInternetGatewayRules() + { + return GetCachedClient(Client => new InternetGatewayRuleCollection(Client, Id)); + } + /// Gets a collection of IPCommunityResources in the ResourceGroupResource. /// An object representing collection of IPCommunityResources and their operations over a IPCommunityResource. public virtual IPCommunityCollection GetIPCommunities() @@ -73,6 +87,13 @@ public virtual L3IsolationDomainCollection GetL3IsolationDomains() return GetCachedClient(Client => new L3IsolationDomainCollection(Client, Id)); } + /// Gets a collection of NeighborGroupResources in the ResourceGroupResource. + /// An object representing collection of NeighborGroupResources and their operations over a NeighborGroupResource. + public virtual NeighborGroupCollection GetNeighborGroups() + { + return GetCachedClient(Client => new NeighborGroupCollection(Client, Id)); + } + /// Gets a collection of NetworkDeviceResources in the ResourceGroupResource. /// An object representing collection of NetworkDeviceResources and their operations over a NetworkDeviceResource. public virtual NetworkDeviceCollection GetNetworkDevices() @@ -94,6 +115,13 @@ public virtual NetworkFabricCollection GetNetworkFabrics() return GetCachedClient(Client => new NetworkFabricCollection(Client, Id)); } + /// Gets a collection of NetworkPacketBrokerResources in the ResourceGroupResource. + /// An object representing collection of NetworkPacketBrokerResources and their operations over a NetworkPacketBrokerResource. + public virtual NetworkPacketBrokerCollection GetNetworkPacketBrokers() + { + return GetCachedClient(Client => new NetworkPacketBrokerCollection(Client, Id)); + } + /// Gets a collection of NetworkRackResources in the ResourceGroupResource. /// An object representing collection of NetworkRackResources and their operations over a NetworkRackResource. public virtual NetworkRackCollection GetNetworkRacks() @@ -101,6 +129,20 @@ public virtual NetworkRackCollection GetNetworkRacks() return GetCachedClient(Client => new NetworkRackCollection(Client, Id)); } + /// Gets a collection of NetworkTapRuleResources in the ResourceGroupResource. + /// An object representing collection of NetworkTapRuleResources and their operations over a NetworkTapRuleResource. + public virtual NetworkTapRuleCollection GetNetworkTapRules() + { + return GetCachedClient(Client => new NetworkTapRuleCollection(Client, Id)); + } + + /// Gets a collection of NetworkTapResources in the ResourceGroupResource. + /// An object representing collection of NetworkTapResources and their operations over a NetworkTapResource. + public virtual NetworkTapCollection GetNetworkTaps() + { + return GetCachedClient(Client => new NetworkTapCollection(Client, Id)); + } + /// Gets a collection of RoutePolicyResources in the ResourceGroupResource. /// An object representing collection of RoutePolicyResources and their operations over a RoutePolicyResource. public virtual RoutePolicyCollection GetRoutePolicies() diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index a3eef41e84613..9534ec47d0048 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -18,6 +18,10 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource { private ClientDiagnostics _accessControlListClientDiagnostics; private AccessControlListsRestOperations _accessControlListRestClient; + private ClientDiagnostics _internetGatewayClientDiagnostics; + private InternetGatewaysRestOperations _internetGatewayRestClient; + private ClientDiagnostics _internetGatewayRuleClientDiagnostics; + private InternetGatewayRulesRestOperations _internetGatewayRuleRestClient; private ClientDiagnostics _ipCommunityIPCommunitiesClientDiagnostics; private IpCommunitiesRestOperations _ipCommunityIPCommunitiesRestClient; private ClientDiagnostics _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics; @@ -28,14 +32,22 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource private L2IsolationDomainsRestOperations _l2IsolationDomainRestClient; private ClientDiagnostics _l3IsolationDomainClientDiagnostics; private L3IsolationDomainsRestOperations _l3IsolationDomainRestClient; + private ClientDiagnostics _neighborGroupClientDiagnostics; + private NeighborGroupsRestOperations _neighborGroupRestClient; private ClientDiagnostics _networkDeviceClientDiagnostics; private NetworkDevicesRestOperations _networkDeviceRestClient; private ClientDiagnostics _networkFabricControllerClientDiagnostics; private NetworkFabricControllersRestOperations _networkFabricControllerRestClient; private ClientDiagnostics _networkFabricClientDiagnostics; private NetworkFabricsRestOperations _networkFabricRestClient; + private ClientDiagnostics _networkPacketBrokerClientDiagnostics; + private NetworkPacketBrokersRestOperations _networkPacketBrokerRestClient; private ClientDiagnostics _networkRackClientDiagnostics; private NetworkRacksRestOperations _networkRackRestClient; + private ClientDiagnostics _networkTapRuleClientDiagnostics; + private NetworkTapRulesRestOperations _networkTapRuleRestClient; + private ClientDiagnostics _networkTapClientDiagnostics; + private NetworkTapsRestOperations _networkTapRestClient; private ClientDiagnostics _routePolicyClientDiagnostics; private RoutePoliciesRestOperations _routePolicyRestClient; @@ -53,6 +65,10 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private ClientDiagnostics AccessControlListClientDiagnostics => _accessControlListClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", AccessControlListResource.ResourceType.Namespace, Diagnostics); private AccessControlListsRestOperations AccessControlListRestClient => _accessControlListRestClient ??= new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AccessControlListResource.ResourceType)); + private ClientDiagnostics InternetGatewayClientDiagnostics => _internetGatewayClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", InternetGatewayResource.ResourceType.Namespace, Diagnostics); + private InternetGatewaysRestOperations InternetGatewayRestClient => _internetGatewayRestClient ??= new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(InternetGatewayResource.ResourceType)); + private ClientDiagnostics InternetGatewayRuleClientDiagnostics => _internetGatewayRuleClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", InternetGatewayRuleResource.ResourceType.Namespace, Diagnostics); + private InternetGatewayRulesRestOperations InternetGatewayRuleRestClient => _internetGatewayRuleRestClient ??= new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(InternetGatewayRuleResource.ResourceType)); private ClientDiagnostics IPCommunityIpCommunitiesClientDiagnostics => _ipCommunityIPCommunitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPCommunityResource.ResourceType.Namespace, Diagnostics); private IpCommunitiesRestOperations IPCommunityIpCommunitiesRestClient => _ipCommunityIPCommunitiesRestClient ??= new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(IPCommunityResource.ResourceType)); private ClientDiagnostics IPExtendedCommunityIpExtendedCommunitiesClientDiagnostics => _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPExtendedCommunityResource.ResourceType.Namespace, Diagnostics); @@ -63,14 +79,22 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie private L2IsolationDomainsRestOperations L2IsolationDomainRestClient => _l2IsolationDomainRestClient ??= new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(L2IsolationDomainResource.ResourceType)); private ClientDiagnostics L3IsolationDomainClientDiagnostics => _l3IsolationDomainClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", L3IsolationDomainResource.ResourceType.Namespace, Diagnostics); private L3IsolationDomainsRestOperations L3IsolationDomainRestClient => _l3IsolationDomainRestClient ??= new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(L3IsolationDomainResource.ResourceType)); + private ClientDiagnostics NeighborGroupClientDiagnostics => _neighborGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NeighborGroupResource.ResourceType.Namespace, Diagnostics); + private NeighborGroupsRestOperations NeighborGroupRestClient => _neighborGroupRestClient ??= new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NeighborGroupResource.ResourceType)); private ClientDiagnostics NetworkDeviceClientDiagnostics => _networkDeviceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkDeviceResource.ResourceType.Namespace, Diagnostics); private NetworkDevicesRestOperations NetworkDeviceRestClient => _networkDeviceRestClient ??= new NetworkDevicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkDeviceResource.ResourceType)); private ClientDiagnostics NetworkFabricControllerClientDiagnostics => _networkFabricControllerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricControllerResource.ResourceType.Namespace, Diagnostics); private NetworkFabricControllersRestOperations NetworkFabricControllerRestClient => _networkFabricControllerRestClient ??= new NetworkFabricControllersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricControllerResource.ResourceType)); private ClientDiagnostics NetworkFabricClientDiagnostics => _networkFabricClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricResource.ResourceType.Namespace, Diagnostics); private NetworkFabricsRestOperations NetworkFabricRestClient => _networkFabricRestClient ??= new NetworkFabricsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricResource.ResourceType)); + private ClientDiagnostics NetworkPacketBrokerClientDiagnostics => _networkPacketBrokerClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkPacketBrokerResource.ResourceType.Namespace, Diagnostics); + private NetworkPacketBrokersRestOperations NetworkPacketBrokerRestClient => _networkPacketBrokerRestClient ??= new NetworkPacketBrokersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkPacketBrokerResource.ResourceType)); private ClientDiagnostics NetworkRackClientDiagnostics => _networkRackClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkRackResource.ResourceType.Namespace, Diagnostics); private NetworkRacksRestOperations NetworkRackRestClient => _networkRackRestClient ??= new NetworkRacksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkRackResource.ResourceType)); + private ClientDiagnostics NetworkTapRuleClientDiagnostics => _networkTapRuleClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkTapRuleResource.ResourceType.Namespace, Diagnostics); + private NetworkTapRulesRestOperations NetworkTapRuleRestClient => _networkTapRuleRestClient ??= new NetworkTapRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkTapRuleResource.ResourceType)); + private ClientDiagnostics NetworkTapClientDiagnostics => _networkTapClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkTapResource.ResourceType.Namespace, Diagnostics); + private NetworkTapsRestOperations NetworkTapRestClient => _networkTapRestClient ??= new NetworkTapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkTapResource.ResourceType)); private ClientDiagnostics RoutePolicyClientDiagnostics => _routePolicyClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", RoutePolicyResource.ResourceType.Namespace, Diagnostics); private RoutePoliciesRestOperations RoutePolicyRestClient => _routePolicyRestClient ??= new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(RoutePolicyResource.ResourceType)); @@ -94,13 +118,6 @@ public virtual NetworkFabricSkuCollection GetNetworkFabricSkus() return GetCachedClient(Client => new NetworkFabricSkuCollection(Client, Id)); } - /// Gets a collection of NetworkRackSkuResources in the SubscriptionResource. - /// An object representing collection of NetworkRackSkuResources and their operations over a NetworkRackSkuResource. - public virtual NetworkRackSkuCollection GetNetworkRackSkus() - { - return GetCachedClient(Client => new NetworkRackSkuCollection(Client, Id)); - } - /// /// Implements AccessControlLists list by subscription GET method. /// @@ -146,7 +163,95 @@ public virtual Pageable GetAccessControlLists(Cancell } /// - /// Implements IpCommunities list by subscription GET method. + /// Displays Internet Gateways list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways + /// + /// + /// Operation Id + /// InternetGateways_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetInternetGatewaysAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => InternetGatewayRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => InternetGatewayRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayResource(Client, InternetGatewayData.DeserializeInternetGatewayData(e)), InternetGatewayClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetInternetGateways", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Internet Gateways list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways + /// + /// + /// Operation Id + /// InternetGateways_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetInternetGateways(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => InternetGatewayRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => InternetGatewayRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayResource(Client, InternetGatewayData.DeserializeInternetGatewayData(e)), InternetGatewayClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetInternetGateways", "value", "nextLink", cancellationToken); + } + + /// + /// List all Internet Gateway rules in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules + /// + /// + /// Operation Id + /// InternetGatewayRules_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetInternetGatewayRulesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => InternetGatewayRuleRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => InternetGatewayRuleRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayRuleResource(Client, InternetGatewayRuleData.DeserializeInternetGatewayRuleData(e)), InternetGatewayRuleClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetInternetGatewayRules", "value", "nextLink", cancellationToken); + } + + /// + /// List all Internet Gateway rules in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules + /// + /// + /// Operation Id + /// InternetGatewayRules_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetInternetGatewayRules(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => InternetGatewayRuleRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => InternetGatewayRuleRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayRuleResource(Client, InternetGatewayRuleData.DeserializeInternetGatewayRuleData(e)), InternetGatewayRuleClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetInternetGatewayRules", "value", "nextLink", cancellationToken); + } + + /// + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -168,7 +273,7 @@ public virtual AsyncPageable GetIPCommunitiesAsync(Cancella } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -365,6 +470,50 @@ public virtual Pageable GetL3IsolationDomains(Cancell return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new L3IsolationDomainResource(Client, L3IsolationDomainData.DeserializeL3IsolationDomainData(e)), L3IsolationDomainClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetL3IsolationDomains", "value", "nextLink", cancellationToken); } + /// + /// Displays NeighborGroups list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNeighborGroupsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NeighborGroupRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NeighborGroupRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeighborGroupResource(Client, NeighborGroupData.DeserializeNeighborGroupData(e)), NeighborGroupClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNeighborGroups", "value", "nextLink", cancellationToken); + } + + /// + /// Displays NeighborGroups list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNeighborGroups(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NeighborGroupRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NeighborGroupRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeighborGroupResource(Client, NeighborGroupData.DeserializeNeighborGroupData(e)), NeighborGroupClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNeighborGroups", "value", "nextLink", cancellationToken); + } + /// /// List all the Network Device resources in a given subscription. /// @@ -497,6 +646,50 @@ public virtual Pageable GetNetworkFabrics(CancellationTok return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricResource(Client, NetworkFabricData.DeserializeNetworkFabricData(e)), NetworkFabricClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabrics", "value", "nextLink", cancellationToken); } + /// + /// Displays Network Packet Brokers list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkPacketBrokersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkPacketBrokerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkPacketBrokerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkPacketBrokerResource(Client, NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(e)), NetworkPacketBrokerClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkPacketBrokers", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Network Packet Brokers list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkPacketBrokers(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkPacketBrokerRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkPacketBrokerRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkPacketBrokerResource(Client, NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(e)), NetworkPacketBrokerClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkPacketBrokers", "value", "nextLink", cancellationToken); + } + /// /// List all Network Rack resources in the given subscription /// @@ -541,6 +734,94 @@ public virtual Pageable GetNetworkRacks(CancellationToken c return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkRackResource(Client, NetworkRackData.DeserializeNetworkRackData(e)), NetworkRackClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkRacks", "value", "nextLink", cancellationToken); } + /// + /// List all the Network Tap Rule resources in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkTapRulesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkTapRuleRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkTapRuleRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkTapRuleResource(Client, NetworkTapRuleData.DeserializeNetworkTapRuleData(e)), NetworkTapRuleClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkTapRules", "value", "nextLink", cancellationToken); + } + + /// + /// List all the Network Tap Rule resources in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkTapRules(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkTapRuleRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkTapRuleRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkTapRuleResource(Client, NetworkTapRuleData.DeserializeNetworkTapRuleData(e)), NetworkTapRuleClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkTapRules", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Network Taps list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkTapsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkTapRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkTapRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkTapResource(Client, NetworkTapData.DeserializeNetworkTapData(e)), NetworkTapClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkTaps", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Network Taps list by subscription GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListBySubscription + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkTaps(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkTapRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkTapRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkTapResource(Client, NetworkTapData.DeserializeNetworkTapData(e)), NetworkTapClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkTaps", "value", "nextLink", cancellationToken); + } + /// /// Implements RoutePolicies list by subscription GET method. /// diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs index edd94896ca77b..09fde58095625 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the ExternalNetwork. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the ExternalNetwork. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string ext /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -217,7 +217,7 @@ public virtual Response Get(string externalNetworkName, /// /// /// Operation Id - /// ExternalNetworks_List + /// ExternalNetworks_ListByL3IsolationDomain /// /// /// @@ -225,8 +225,8 @@ public virtual Response Get(string externalNetworkName, /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _externalNetworkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _externalNetworkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _externalNetworkRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _externalNetworkRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExternalNetworkResource(Client, ExternalNetworkData.DeserializeExternalNetworkData(e)), _externalNetworkClientDiagnostics, Pipeline, "ExternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -239,7 +239,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Operation Id - /// ExternalNetworks_List + /// ExternalNetworks_ListByL3IsolationDomain /// /// /// @@ -247,8 +247,8 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _externalNetworkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _externalNetworkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _externalNetworkRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _externalNetworkRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExternalNetworkResource(Client, ExternalNetworkData.DeserializeExternalNetworkData(e)), _externalNetworkClientDiagnostics, Pipeline, "ExternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string externalNetworkName /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs index 0506a479f13fe..f1fc80579aa41 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -14,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the ExternalNetwork data model. - /// Defines the ExternalNetwork item. + /// Defines the External Network resource. /// public partial class ExternalNetworkData : ResourceData { @@ -22,7 +21,6 @@ public partial class ExternalNetworkData : ResourceData /// Peering option list. public ExternalNetworkData(PeeringOption peeringOption) { - DisabledOnResources = new ChangeTrackingList(); PeeringOption = peeringOption; } @@ -32,48 +30,56 @@ public ExternalNetworkData(PeeringOption peeringOption) /// The resourceType. /// The systemData. /// Switch configuration description. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// Import Route Policy either IPv4 or IPv6. + /// Export Route Policy either IPv4 or IPv6. /// Gets the networkToNetworkInterconnectId of the resource. - /// List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// AdministrativeState of the externalNetwork. Example: Enabled | Disabled. - /// Gets the provisioning state of the resource. /// Peering option list. /// option B properties object. /// option A properties object. - /// ARM resource ID of importRoutePolicy. - /// ARM resource ID of exportRoutePolicy. - internal ExternalNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, string networkToNetworkInterconnectId, IReadOnlyList disabledOnResources, EnabledDisabledState? administrativeState, ProvisioningState? provisioningState, PeeringOption peeringOption, OptionBProperties optionBProperties, ExternalNetworkPropertiesOptionAProperties optionAProperties, string importRoutePolicyId, string exportRoutePolicyId) : base(id, name, resourceType, systemData) + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal ExternalNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, ResourceIdentifier importRoutePolicyId, ResourceIdentifier exportRoutePolicyId, ImportRoutePolicy importRoutePolicy, ExportRoutePolicy exportRoutePolicy, string networkToNetworkInterconnectId, PeeringOption peeringOption, L3OptionBProperties optionBProperties, ExternalNetworkPropertiesOptionAProperties optionAProperties, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData) { Annotation = annotation; + ImportRoutePolicyId = importRoutePolicyId; + ExportRoutePolicyId = exportRoutePolicyId; + ImportRoutePolicy = importRoutePolicy; + ExportRoutePolicy = exportRoutePolicy; NetworkToNetworkInterconnectId = networkToNetworkInterconnectId; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - ProvisioningState = provisioningState; PeeringOption = peeringOption; OptionBProperties = optionBProperties; OptionAProperties = optionAProperties; - ImportRoutePolicyId = importRoutePolicyId; - ExportRoutePolicyId = exportRoutePolicyId; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ImportRoutePolicyId { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ExportRoutePolicyId { get; set; } + /// Import Route Policy either IPv4 or IPv6. + public ImportRoutePolicy ImportRoutePolicy { get; set; } + /// Export Route Policy either IPv4 or IPv6. + public ExportRoutePolicy ExportRoutePolicy { get; set; } /// Gets the networkToNetworkInterconnectId of the resource. public string NetworkToNetworkInterconnectId { get; } - /// List of resources the externalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList DisabledOnResources { get; } - /// AdministrativeState of the externalNetwork. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } /// Peering option list. public PeeringOption PeeringOption { get; set; } /// option B properties object. - public OptionBProperties OptionBProperties { get; set; } + public L3OptionBProperties OptionBProperties { get; set; } /// option A properties object. public ExternalNetworkPropertiesOptionAProperties OptionAProperties { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ImportRoutePolicyId { get; set; } - /// ARM resource ID of exportRoutePolicy. - public string ExportRoutePolicyId { get; set; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs index a6733076e0aca..d98b1ac41c0ed 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs @@ -245,7 +245,7 @@ public virtual async Task> UpdateAsync(Wai try { var response = await _externalNetworkRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -283,7 +283,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, try { var response = _externalNetworkRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -304,7 +304,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Operation Id - /// ExternalNetworks_updateAdministrativeState + /// ExternalNetworks_UpdateAdministrativeState /// /// /// @@ -312,7 +312,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -321,9 +321,9 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil try { var response = await _externalNetworkRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -342,7 +342,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// Operation Id - /// ExternalNetworks_updateAdministrativeState + /// ExternalNetworks_UpdateAdministrativeState /// /// /// @@ -350,7 +350,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -359,237 +359,9 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat try { var response = _externalNetworkRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BGP for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBgpAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_updateBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateBgpAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateBgpAdministrativeState"); - scope.Start(); - try - { - var response = await _externalNetworkRestClient.UpdateBgpAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BGP for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBgpAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_updateBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateBgpAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateBgpAdministrativeState"); - scope.Start(); - try - { - var response = _externalNetworkRestClient.UpdateBgpAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForBgp for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdForBgpAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_updateBfdForBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateBfdForBgpAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateBfdForBgpAdministrativeState"); - scope.Start(); - try - { - var response = await _externalNetworkRestClient.UpdateBfdForBgpAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateBfdForBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForBgp for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateBfdForBgpAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_updateBfdForBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateBfdForBgpAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateBfdForBgpAdministrativeState"); - scope.Start(); - try - { - var response = _externalNetworkRestClient.UpdateBfdForBgpAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateBfdForBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearIpv6Neighbors for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearIpv6Neighbors - /// - /// - /// Operation Id - /// ExternalNetworks_clearIpv6Neighbors - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task ClearIPv6NeighborsAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearIPv6Neighbors"); - scope.Start(); - try - { - var response = await _externalNetworkRestClient.ClearIPv6NeighborsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateClearIPv6NeighborsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearIpv6Neighbors for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearIpv6Neighbors - /// - /// - /// Operation Id - /// ExternalNetworks_clearIpv6Neighbors - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearIPv6Neighbors(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearIPv6Neighbors"); - scope.Start(); - try - { - var response = _externalNetworkRestClient.ClearIPv6Neighbors(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateClearIPv6NeighborsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -600,15 +372,15 @@ public virtual ArmOperation ClearIPv6Neighbors(WaitUntil waitUntil, EnableDisabl } /// - /// clearArpEntries for externalNetwork. + /// Update Static Route BFD for external Network. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState /// /// /// Operation Id - /// ExternalNetworks_clearArpEntries + /// ExternalNetworks_UpdateStaticRouteBfdAdministrativeState /// /// /// @@ -616,18 +388,18 @@ public virtual ArmOperation ClearIPv6Neighbors(WaitUntil waitUntil, EnableDisabl /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task ClearArpEntriesAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearArpEntries"); + using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); scope.Start(); try { - var response = await _externalNetworkRestClient.ClearArpEntriesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateClearArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _externalNetworkRestClient.UpdateStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -638,15 +410,15 @@ public virtual async Task ClearArpEntriesAsync(WaitUntil waitUntil } /// - /// clearArpEntries for externalNetwork. + /// Update Static Route BFD for external Network. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState /// /// /// Operation Id - /// ExternalNetworks_clearArpEntries + /// ExternalNetworks_UpdateStaticRouteBfdAdministrativeState /// /// /// @@ -654,18 +426,18 @@ public virtual async Task ClearArpEntriesAsync(WaitUntil waitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation ClearArpEntries(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateStaticRouteBfdAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearArpEntries"); + using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); scope.Start(); try { - var response = _externalNetworkRestClient.ClearArpEntries(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateClearArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _externalNetworkRestClient.UpdateStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs index d6bb7ee8450f6..503ff015a4ae3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs @@ -210,7 +210,7 @@ public virtual Response Get(string ipCommunityName, Cancell } /// - /// Implements IpCommunities list by resource group GET method. + /// Implements IP Communities list by resource group GET method. /// /// /// Request Path @@ -232,7 +232,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken } /// - /// Implements IpCommunities list by resource group GET method. + /// Implements IP Communities list by resource group GET method. /// /// /// Request Path diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs index 32e23e29be684..6af44dae1a81d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the IPCommunity data model. - /// The IpCommunity resource definition. + /// The IP Community resource definition. /// public partial class IPCommunityData : TrackedResourceData { @@ -22,8 +22,7 @@ public partial class IPCommunityData : TrackedResourceData /// The location. public IPCommunityData(AzureLocation location) : base(location) { - WellKnownCommunities = new ChangeTrackingList(); - CommunityMembers = new ChangeTrackingList(); + IPCommunityRules = new ChangeTrackingList(); } /// Initializes a new instance of IPCommunityData. @@ -34,28 +33,28 @@ public IPCommunityData(AzureLocation location) : base(location) /// The tags. /// The location. /// Switch configuration description. - /// Action to be taken on the configuration. Example: Permit | Deny. - /// Supported well known Community List. - /// List the communityMembers of IP Community . - /// Gets the provisioning state of the resource. - internal IPCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, CommunityActionType? action, IList wellKnownCommunities, IList communityMembers, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// List of IP Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal IPCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipCommunityRules, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; - Action = action; - WellKnownCommunities = wellKnownCommunities; - CommunityMembers = communityMembers; + IPCommunityRules = ipCommunityRules; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// Action to be taken on the configuration. Example: Permit | Deny. - public CommunityActionType? Action { get; set; } - /// Supported well known Community List. - public IList WellKnownCommunities { get; } - /// List the communityMembers of IP Community . - public IList CommunityMembers { get; } - /// Gets the provisioning state of the resource. + /// List of IP Community Rules. + public IList IPCommunityRules { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs index b0a3d1fbef069..63827a97d2bad 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs @@ -5,7 +5,9 @@ #nullable disable +using System; using System.Collections.Generic; +using System.Linq; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -14,15 +16,19 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the IPExtendedCommunity data model. - /// The IpExtendedCommunity resource definition. + /// The IP Extended Community resource definition. /// public partial class IPExtendedCommunityData : TrackedResourceData { /// Initializes a new instance of IPExtendedCommunityData. /// The location. - public IPExtendedCommunityData(AzureLocation location) : base(location) + /// List of IP Extended Community Rules. + /// is null. + public IPExtendedCommunityData(AzureLocation location, IEnumerable ipExtendedCommunityRules) : base(location) { - RouteTargets = new ChangeTrackingList(); + Argument.AssertNotNull(ipExtendedCommunityRules, nameof(ipExtendedCommunityRules)); + + IPExtendedCommunityRules = ipExtendedCommunityRules.ToList(); } /// Initializes a new instance of IPExtendedCommunityData. @@ -33,24 +39,28 @@ public IPExtendedCommunityData(AzureLocation location) : base(location) /// The tags. /// The location. /// Switch configuration description. - /// Action to be taken on the configuration. Example: Permit | Deny. - /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. - /// Gets the provisioning state of the resource. - internal IPExtendedCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, CommunityActionType? action, IList routeTargets, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// List of IP Extended Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal IPExtendedCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipExtendedCommunityRules, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; - Action = action; - RouteTargets = routeTargets; + IPExtendedCommunityRules = ipExtendedCommunityRules; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// Action to be taken on the configuration. Example: Permit | Deny. - public CommunityActionType? Action { get; set; } - /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. - public IList RouteTargets { get; } - /// Gets the provisioning state of the resource. + /// List of IP Extended Community Rules. + public IList IPExtendedCommunityRules { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs index 7d3a87b42e27e..0cd699d32ab74 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs @@ -5,9 +5,7 @@ #nullable disable -using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -16,19 +14,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the IPPrefix data model. - /// The IPPrefix resource definition. + /// The IP Prefix resource definition. /// public partial class IPPrefixData : TrackedResourceData { /// Initializes a new instance of IPPrefixData. /// The location. - /// IpPrefix contains the list of IP PrefixRules objects. - /// is null. - public IPPrefixData(AzureLocation location, IEnumerable ipPrefixRules) : base(location) + public IPPrefixData(AzureLocation location) : base(location) { - Argument.AssertNotNull(ipPrefixRules, nameof(ipPrefixRules)); - - IPPrefixRules = ipPrefixRules.ToList(); + IPPrefixRules = new ChangeTrackingList(); } /// Initializes a new instance of IPPrefixData. @@ -39,20 +33,28 @@ public IPPrefixData(AzureLocation location, IEnumerable The tags. /// The location. /// Switch configuration description. - /// IpPrefix contains the list of IP PrefixRules objects. - /// Gets the provisioning state of the resource. - internal IPPrefixData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipPrefixRules, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// The list of IP Prefix Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal IPPrefixData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipPrefixRules, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; IPPrefixRules = ipPrefixRules; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// IpPrefix contains the list of IP PrefixRules objects. - public IList IPPrefixRules { get; } - /// Gets the provisioning state of the resource. + /// The list of IP Prefix Rules. + public IList IPPrefixRules { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs index c2a864bdadf03..a88d9bb4e9efb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string int /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -217,7 +217,7 @@ public virtual Response Get(string internalNetworkName, /// /// /// Operation Id - /// InternalNetworks_List + /// InternalNetworks_ListByL3IsolationDomain /// /// /// @@ -225,8 +225,8 @@ public virtual Response Get(string internalNetworkName, /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _internalNetworkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internalNetworkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _internalNetworkRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internalNetworkRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternalNetworkResource(Client, InternalNetworkData.DeserializeInternalNetworkData(e)), _internalNetworkClientDiagnostics, Pipeline, "InternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -239,7 +239,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Operation Id - /// InternalNetworks_List + /// InternalNetworks_ListByL3IsolationDomain /// /// /// @@ -247,8 +247,8 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _internalNetworkRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internalNetworkRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _internalNetworkRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internalNetworkRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternalNetworkResource(Client, InternalNetworkData.DeserializeInternalNetworkData(e)), _internalNetworkClientDiagnostics, Pipeline, "InternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string internalNetworkName /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs index dc085a52a928c..3a2bffd5a9d2f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the InternalNetwork data model. - /// Defines the InternalNetwork item. + /// Defines the Internal Network resource. /// public partial class InternalNetworkData : ResourceData { @@ -24,10 +24,6 @@ public InternalNetworkData(int vlanId) { ConnectedIPv4Subnets = new ChangeTrackingList(); ConnectedIPv6Subnets = new ChangeTrackingList(); - DisabledOnResources = new ChangeTrackingList(); - BgpDisabledOnResources = new ChangeTrackingList(); - BfdDisabledOnResources = new ChangeTrackingList(); - BfdForStaticRoutesDisabledOnResources = new ChangeTrackingList(); VlanId = vlanId; } @@ -38,67 +34,79 @@ public InternalNetworkData(int vlanId) /// The systemData. /// Switch configuration description. /// Maximum transmission unit. Default value is 1500. - /// List with object connected IPv4 Subnets. - /// List with object connected IPv6 Subnets. - /// Static Route Configuration properties. - /// BGP configuration properties. - /// ARM resource ID of importRoutePolicy. - /// ARM resource ID of importRoutePolicy. - /// List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Administrative state of the InternalNetwork. Example: Enabled | Disabled. - /// List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Gets the provisioning state of the resource. + /// List of Connected IPv4 Subnets. + /// List of connected IPv6 Subnets. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + /// Import Route Policy either IPv4 or IPv6. + /// Export Route Policy either IPv4 or IPv6. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// To check whether monitoring of internal network is enabled or not. + /// Extension. Example: NoExtension | NPB. /// Vlan identifier. Example: 1001. - internal InternalNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, int? mtu, IList connectedIPv4Subnets, IList connectedIPv6Subnets, StaticRouteConfiguration staticRouteConfiguration, BgpConfiguration bgpConfiguration, string importRoutePolicyId, string exportRoutePolicyId, IReadOnlyList disabledOnResources, EnabledDisabledState? administrativeState, IReadOnlyList bgpDisabledOnResources, IReadOnlyList bfdDisabledOnResources, IReadOnlyList bfdForStaticRoutesDisabledOnResources, ProvisioningState? provisioningState, int vlanId) : base(id, name, resourceType, systemData) + /// BGP configuration properties. + /// Static Route Configuration properties. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal InternalNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, int? mtu, IList connectedIPv4Subnets, IList connectedIPv6Subnets, ResourceIdentifier importRoutePolicyId, ResourceIdentifier exportRoutePolicyId, ImportRoutePolicy importRoutePolicy, ExportRoutePolicy exportRoutePolicy, ResourceIdentifier ingressAclId, ResourceIdentifier egressAclId, IsMonitoringEnabled? isMonitoringEnabled, Extension? extension, int vlanId, InternalNetworkPropertiesBgpConfiguration bgpConfiguration, InternalNetworkPropertiesStaticRouteConfiguration staticRouteConfiguration, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData) { Annotation = annotation; Mtu = mtu; ConnectedIPv4Subnets = connectedIPv4Subnets; ConnectedIPv6Subnets = connectedIPv6Subnets; - StaticRouteConfiguration = staticRouteConfiguration; - BgpConfiguration = bgpConfiguration; ImportRoutePolicyId = importRoutePolicyId; ExportRoutePolicyId = exportRoutePolicyId; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - BgpDisabledOnResources = bgpDisabledOnResources; - BfdDisabledOnResources = bfdDisabledOnResources; - BfdForStaticRoutesDisabledOnResources = bfdForStaticRoutesDisabledOnResources; - ProvisioningState = provisioningState; + ImportRoutePolicy = importRoutePolicy; + ExportRoutePolicy = exportRoutePolicy; + IngressAclId = ingressAclId; + EgressAclId = egressAclId; + IsMonitoringEnabled = isMonitoringEnabled; + Extension = extension; VlanId = vlanId; + BgpConfiguration = bgpConfiguration; + StaticRouteConfiguration = staticRouteConfiguration; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } /// Maximum transmission unit. Default value is 1500. public int? Mtu { get; set; } - /// List with object connected IPv4 Subnets. + /// List of Connected IPv4 Subnets. public IList ConnectedIPv4Subnets { get; } - /// List with object connected IPv6 Subnets. + /// List of connected IPv6 Subnets. public IList ConnectedIPv6Subnets { get; } - /// Static Route Configuration properties. - public StaticRouteConfiguration StaticRouteConfiguration { get; set; } - /// BGP configuration properties. - public BgpConfiguration BgpConfiguration { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ImportRoutePolicyId { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ExportRoutePolicyId { get; set; } - /// List of resources the InternalNetwork is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList DisabledOnResources { get; } - /// Administrative state of the InternalNetwork. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// List of resources the BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList BgpDisabledOnResources { get; } - /// List of resources the BFD for BGP is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList BfdDisabledOnResources { get; } - /// List of resources the BFD of StaticRoutes is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList BfdForStaticRoutesDisabledOnResources { get; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ImportRoutePolicyId { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ExportRoutePolicyId { get; set; } + /// Import Route Policy either IPv4 or IPv6. + public ImportRoutePolicy ImportRoutePolicy { get; set; } + /// Export Route Policy either IPv4 or IPv6. + public ExportRoutePolicy ExportRoutePolicy { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } + /// To check whether monitoring of internal network is enabled or not. + public IsMonitoringEnabled? IsMonitoringEnabled { get; set; } + /// Extension. Example: NoExtension | NPB. + public Extension? Extension { get; set; } /// Vlan identifier. Example: 1001. public int VlanId { get; set; } + /// BGP configuration properties. + public InternalNetworkPropertiesBgpConfiguration BgpConfiguration { get; set; } + /// Static Route Configuration properties. + public InternalNetworkPropertiesStaticRouteConfiguration StaticRouteConfiguration { get; set; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs index e23cc0668e869..a83c107a92f55 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs @@ -245,7 +245,7 @@ public virtual async Task> UpdateAsync(Wai try { var response = await _internalNetworkRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -283,7 +283,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, try { var response = _internalNetworkRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -304,7 +304,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Operation Id - /// InternalNetworks_updateAdministrativeState + /// InternalNetworks_UpdateAdministrativeState /// /// /// @@ -312,7 +312,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -321,9 +321,9 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil try { var response = await _internalNetworkRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -342,7 +342,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// Operation Id - /// InternalNetworks_updateAdministrativeState + /// InternalNetworks_UpdateAdministrativeState /// /// /// @@ -350,7 +350,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -359,9 +359,9 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat try { var response = _internalNetworkRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -380,7 +380,7 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat /// /// /// Operation Id - /// InternalNetworks_updateBgpAdministrativeState + /// InternalNetworks_UpdateBgpAdministrativeState /// /// /// @@ -388,7 +388,7 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateBgpAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateBgpAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -397,9 +397,9 @@ public virtual async Task UpdateBgpAdministrativeStateAsync(WaitUn try { var response = await _internalNetworkRestClient.UpdateBgpAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -418,7 +418,7 @@ public virtual async Task UpdateBgpAdministrativeStateAsync(WaitUn /// /// /// Operation Id - /// InternalNetworks_updateBgpAdministrativeState + /// InternalNetworks_UpdateBgpAdministrativeState /// /// /// @@ -426,7 +426,7 @@ public virtual async Task UpdateBgpAdministrativeStateAsync(WaitUn /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateBgpAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateBgpAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -435,237 +435,9 @@ public virtual ArmOperation UpdateBgpAdministrativeState(WaitUntil waitUntil, Up try { var response = _internalNetworkRestClient.UpdateBgpAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForBgp for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForBgpAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_updateBfdForBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateBfdForBgpAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForBgpAdministrativeState"); - scope.Start(); - try - { - var response = await _internalNetworkRestClient.UpdateBfdForBgpAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBfdForBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForBgp for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForBgpAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_updateBfdForBgpAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateBfdForBgpAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForBgpAdministrativeState"); - scope.Start(); - try - { - var response = _internalNetworkRestClient.UpdateBfdForBgpAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBfdForBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearIpv6Neighbors for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearIpv6Neighbors - /// - /// - /// Operation Id - /// InternalNetworks_clearIpv6Neighbors - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task ClearIPv6NeighborsAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.ClearIPv6Neighbors"); - scope.Start(); - try - { - var response = await _internalNetworkRestClient.ClearIPv6NeighborsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateClearIPv6NeighborsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearIpv6Neighbors for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearIpv6Neighbors - /// - /// - /// Operation Id - /// InternalNetworks_clearIpv6Neighbors - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearIPv6Neighbors(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.ClearIPv6Neighbors"); - scope.Start(); - try - { - var response = _internalNetworkRestClient.ClearIPv6Neighbors(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateClearIPv6NeighborsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearArpEntries for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearArpEntries - /// - /// - /// Operation Id - /// InternalNetworks_clearArpEntries - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task ClearArpEntriesAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.ClearArpEntries"); - scope.Start(); - try - { - var response = await _internalNetworkRestClient.ClearArpEntriesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateClearArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearArpEntries for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/clearArpEntries - /// - /// - /// Operation Id - /// InternalNetworks_clearArpEntries - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearArpEntries(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.ClearArpEntries"); - scope.Start(); - try - { - var response = _internalNetworkRestClient.ClearArpEntries(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateClearArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -676,15 +448,15 @@ public virtual ArmOperation ClearArpEntries(WaitUntil waitUntil, EnableDisableOn } /// - /// Update BfdForStaticRoutes for internalNetwork. + /// Update Static Route BFD administrative state for internalNetwork. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState /// /// /// Operation Id - /// InternalNetworks_updateBfdForStaticRouteAdministrativeState + /// InternalNetworks_UpdateStaticRouteBfdAdministrativeState /// /// /// @@ -692,18 +464,18 @@ public virtual ArmOperation ClearArpEntries(WaitUntil waitUntil, EnableDisableOn /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateBfdForStaticRouteAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForStaticRouteAdministrativeState"); + using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); scope.Start(); try { - var response = await _internalNetworkRestClient.UpdateBfdForStaticRouteAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBfdForStaticRouteAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _internalNetworkRestClient.UpdateStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -714,15 +486,15 @@ public virtual async Task UpdateBfdForStaticRouteAdministrativeSta } /// - /// Update BfdForStaticRoutes for internalNetwork. + /// Update Static Route BFD administrative state for internalNetwork. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState /// /// /// Operation Id - /// InternalNetworks_updateBfdForStaticRouteAdministrativeState + /// InternalNetworks_UpdateStaticRouteBfdAdministrativeState /// /// /// @@ -730,18 +502,18 @@ public virtual async Task UpdateBfdForStaticRouteAdministrativeSta /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateBfdForStaticRouteAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateStaticRouteBfdAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForStaticRouteAdministrativeState"); + using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); scope.Start(); try { - var response = _internalNetworkRestClient.UpdateBfdForStaticRouteAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateBfdForStaticRouteAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _internalNetworkRestClient.UpdateStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayCollection.cs new file mode 100644 index 0000000000000..1ca0d4bf4a622 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetInternetGateways method from an instance of . + /// + public partial class InternetGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _internetGatewayClientDiagnostics; + private readonly InternetGatewaysRestOperations _internetGatewayRestClient; + + /// Initializes a new instance of the class for mocking. + protected InternetGatewayCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal InternetGatewayCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _internetGatewayClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", InternetGatewayResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(InternetGatewayResource.ResourceType, out string internetGatewayApiVersion); + _internetGatewayRestClient = new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internetGatewayApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates a Network Fabric Service Internet Gateway resource instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Internet Gateway. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string internetGatewayName, InternetGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayOperationSource(Client), _internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Network Fabric Service Internet Gateway resource instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Internet Gateway. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string internetGatewayName, InternetGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayOperationSource(Client), _internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.Get"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.Get"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Displays Internet Gateways list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways + /// + /// + /// Operation Id + /// InternetGateways_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _internetGatewayRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internetGatewayRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayResource(Client, InternetGatewayData.DeserializeInternetGatewayData(e)), _internetGatewayClientDiagnostics, Pipeline, "InternetGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Internet Gateways list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways + /// + /// + /// Operation Id + /// InternetGateways_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _internetGatewayRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internetGatewayRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayResource(Client, InternetGatewayData.DeserializeInternetGatewayData(e)), _internetGatewayClientDiagnostics, Pipeline, "InternetGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.Exists"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayCollection.Exists"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayData.cs new file mode 100644 index 0000000000000..b4cd1388879b0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the InternetGateway data model. + /// The Internet Gateway resource definition. + /// + public partial class InternetGatewayData : TrackedResourceData + { + /// Initializes a new instance of InternetGatewayData. + /// The location. + /// Gateway Type of the resource. + /// ARM Resource ID of the Network Fabric Controller. + /// is null. + public InternetGatewayData(AzureLocation location, GatewayType typePropertiesType, ResourceIdentifier networkFabricControllerId) : base(location) + { + Argument.AssertNotNull(networkFabricControllerId, nameof(networkFabricControllerId)); + + TypePropertiesType = typePropertiesType; + NetworkFabricControllerId = networkFabricControllerId; + } + + /// Initializes a new instance of InternetGatewayData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// ARM Resource ID of the Internet Gateway Rule. + /// IPv4 Address of Internet Gateway. + /// Port number of Internet Gateway. + /// Gateway Type of the resource. + /// ARM Resource ID of the Network Fabric Controller. + /// Provisioning state of resource. + internal InternetGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ResourceIdentifier internetGatewayRuleId, string ipv4Address, int? port, GatewayType typePropertiesType, ResourceIdentifier networkFabricControllerId, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + InternetGatewayRuleId = internetGatewayRuleId; + IPv4Address = ipv4Address; + Port = port; + TypePropertiesType = typePropertiesType; + NetworkFabricControllerId = networkFabricControllerId; + ProvisioningState = provisioningState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// ARM Resource ID of the Internet Gateway Rule. + public ResourceIdentifier InternetGatewayRuleId { get; set; } + /// IPv4 Address of Internet Gateway. + public string IPv4Address { get; } + /// Port number of Internet Gateway. + public int? Port { get; } + /// Gateway Type of the resource. + public GatewayType TypePropertiesType { get; set; } + /// ARM Resource ID of the Network Fabric Controller. + public ResourceIdentifier NetworkFabricControllerId { get; set; } + /// Provisioning state of resource. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayResource.cs new file mode 100644 index 0000000000000..f41125d652d57 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayResource.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing an InternetGateway along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetInternetGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetInternetGateway method. + /// + public partial class InternetGatewayResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string internetGatewayName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _internetGatewayClientDiagnostics; + private readonly InternetGatewaysRestOperations _internetGatewayRestClient; + private readonly InternetGatewayData _data; + + /// Initializes a new instance of the class for mocking. + protected InternetGatewayResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal InternetGatewayResource(ArmClient client, InternetGatewayData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal InternetGatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _internetGatewayClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string internetGatewayApiVersion); + _internetGatewayRestClient = new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internetGatewayApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/internetGateways"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual InternetGatewayData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Get"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Gateway GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Get"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Execute a delete on Network Fabric Service Internet Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Delete"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Execute a delete on Network Fabric Service Internet Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Delete"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Execute patch on Network Fabric Service Internet Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// API to update certain properties of the L2 Isolation Domain resource.. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, InternetGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Update"); + scope.Start(); + try + { + var response = await _internetGatewayRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayOperationSource(Client), _internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Execute patch on Network Fabric Service Internet Gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// API to update certain properties of the L2 Isolation Domain resource.. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, InternetGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.Update"); + scope.Start(); + try + { + var response = _internetGatewayRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayOperationSource(Client), _internetGatewayClientDiagnostics, Pipeline, _internetGatewayRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} + /// + /// + /// Operation Id + /// InternetGateways_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _internetGatewayClientDiagnostics.CreateScope("InternetGatewayResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleCollection.cs new file mode 100644 index 0000000000000..babadaa940681 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetInternetGatewayRules method from an instance of . + /// + public partial class InternetGatewayRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _internetGatewayRuleClientDiagnostics; + private readonly InternetGatewayRulesRestOperations _internetGatewayRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected InternetGatewayRuleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal InternetGatewayRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _internetGatewayRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", InternetGatewayRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(InternetGatewayRuleResource.ResourceType, out string internetGatewayRuleApiVersion); + _internetGatewayRuleRestClient = new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internetGatewayRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates an Internet Gateway rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Internet Gateway rule. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string internetGatewayRuleName, InternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayRuleOperationSource(Client), _internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an Internet Gateway rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Internet Gateway rule. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string internetGatewayRuleName, InternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayRuleOperationSource(Client), _internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.Get"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.Get"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Internet Gateway Rules list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules + /// + /// + /// Operation Id + /// InternetGatewayRules_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _internetGatewayRuleRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internetGatewayRuleRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayRuleResource(Client, InternetGatewayRuleData.DeserializeInternetGatewayRuleData(e)), _internetGatewayRuleClientDiagnostics, Pipeline, "InternetGatewayRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Implements Internet Gateway Rules list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules + /// + /// + /// Operation Id + /// InternetGatewayRules_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _internetGatewayRuleRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _internetGatewayRuleRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternetGatewayRuleResource(Client, InternetGatewayRuleData.DeserializeInternetGatewayRuleData(e)), _internetGatewayRuleClientDiagnostics, Pipeline, "InternetGatewayRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleCollection.Exists"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleData.cs new file mode 100644 index 0000000000000..3383e01b07f25 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleData.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the InternetGatewayRule data model. + /// The Internet Gateway Rule resource definition. + /// + public partial class InternetGatewayRuleData : TrackedResourceData + { + /// Initializes a new instance of InternetGatewayRuleData. + /// The location. + /// Rules for the InternetGateways. + /// is null. + public InternetGatewayRuleData(AzureLocation location, RuleProperties ruleProperties) : base(location) + { + Argument.AssertNotNull(ruleProperties, nameof(ruleProperties)); + + RuleProperties = ruleProperties; + InternetGatewayIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of InternetGatewayRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Rules for the InternetGateways. + /// Provisioning state of the resource. + /// List of Internet Gateway resource Id. + internal InternetGatewayRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, RuleProperties ruleProperties, ProvisioningState? provisioningState, IReadOnlyList internetGatewayIds) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + RuleProperties = ruleProperties; + ProvisioningState = provisioningState; + InternetGatewayIds = internetGatewayIds; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Rules for the InternetGateways. + public RuleProperties RuleProperties { get; set; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// List of Internet Gateway resource Id. + public IReadOnlyList InternetGatewayIds { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleResource.cs new file mode 100644 index 0000000000000..a17ccd5076030 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternetGatewayRuleResource.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing an InternetGatewayRule along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetInternetGatewayRuleResource method. + /// Otherwise you can get one from its parent resource using the GetInternetGatewayRule method. + /// + public partial class InternetGatewayRuleResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string internetGatewayRuleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _internetGatewayRuleClientDiagnostics; + private readonly InternetGatewayRulesRestOperations _internetGatewayRuleRestClient; + private readonly InternetGatewayRuleData _data; + + /// Initializes a new instance of the class for mocking. + protected InternetGatewayRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal InternetGatewayRuleResource(ArmClient client, InternetGatewayRuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal InternetGatewayRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _internetGatewayRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string internetGatewayRuleApiVersion); + _internetGatewayRuleRestClient = new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internetGatewayRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/internetGatewayRules"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual InternetGatewayRuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Get"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Get"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InternetGatewayRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Internet Gateway Rules DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Delete"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Internet Gateway Rules DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Delete"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Internet Gateway Rule properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, InternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Update"); + scope.Start(); + try + { + var response = await _internetGatewayRuleRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayRuleOperationSource(Client), _internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Internet Gateway Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Internet Gateway Rule properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, InternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.Update"); + scope.Start(); + try + { + var response = _internetGatewayRuleRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new InternetGatewayRuleOperationSource(Client), _internetGatewayRuleClientDiagnostics, Pipeline, _internetGatewayRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayRulePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayRulePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _internetGatewayRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new InternetGatewayRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/{internetGatewayRuleName} + /// + /// + /// Operation Id + /// InternetGatewayRules_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _internetGatewayRuleClientDiagnostics.CreateScope("InternetGatewayRuleResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _internetGatewayRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new InternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new InternetGatewayRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs index d16eecf3ede81..fc1b040c7865e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -14,15 +15,21 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the L2IsolationDomain data model. - /// The L2IsolationDomain resource definition. + /// The L2 Isolation Domain resource definition. /// public partial class L2IsolationDomainData : TrackedResourceData { /// Initializes a new instance of L2IsolationDomainData. /// The location. - public L2IsolationDomainData(AzureLocation location) : base(location) + /// ARM Resource ID of the Network Fabric. + /// Vlan Identifier of the Network Fabric. Example: 501. + /// is null. + public L2IsolationDomainData(AzureLocation location, ResourceIdentifier networkFabricId, int vlanId) : base(location) { - DisabledOnResources = new ChangeTrackingList(); + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + NetworkFabricId = networkFabricId; + VlanId = vlanId; } /// Initializes a new instance of L2IsolationDomainData. @@ -33,36 +40,36 @@ public L2IsolationDomainData(AzureLocation location) : base(location) /// The tags. /// The location. /// Switch configuration description. - /// Network Fabric ARM resource id. - /// vlanId. Example: 501. - /// maximum transmission unit. Default value is 1500. - /// List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// state. Example: Enabled | Disabled. It indicates administrative state of the isolationDomain, whether it is enabled or disabled. If enabled, the configuration is applied on the devices. If disabled, the configuration is removed from the devices. - /// Gets the provisioning state of the resource. - internal L2IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, string networkFabricId, int? vlanId, int? mtu, IReadOnlyList disabledOnResources, EnabledDisabledState? administrativeState, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// ARM Resource ID of the Network Fabric. + /// Vlan Identifier of the Network Fabric. Example: 501. + /// Maximum transmission unit. Default value is 1500. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal L2IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ResourceIdentifier networkFabricId, int vlanId, int? mtu, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; NetworkFabricId = networkFabricId; VlanId = vlanId; Mtu = mtu; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// Network Fabric ARM resource id. - public string NetworkFabricId { get; set; } - /// vlanId. Example: 501. - public int? VlanId { get; set; } - /// maximum transmission unit. Default value is 1500. + /// ARM Resource ID of the Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// Vlan Identifier of the Network Fabric. Example: 501. + public int VlanId { get; set; } + /// Maximum transmission unit. Default value is 1500. public int? Mtu { get; set; } - /// List of resources the L2 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList DisabledOnResources { get; } - /// state. Example: Enabled | Disabled. It indicates administrative state of the isolationDomain, whether it is enabled or disabled. If enabled, the configuration is applied on the devices. If disabled, the configuration is removed from the devices. - public EnabledDisabledState? AdministrativeState { get; } - /// Gets the provisioning state of the resource. + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs index 4cff2ee8094e7..51d1c59a7937e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs @@ -314,7 +314,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -323,9 +323,9 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil try { var response = await _l2IsolationDomainRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -352,7 +352,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -361,85 +361,9 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat try { var response = _l2IsolationDomainRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Clears ARP tables for this Isolation Domain. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearArpTable - /// - /// - /// Operation Id - /// L2IsolationDomains_clearArpTable - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task ClearArpTableAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ClearArpTable"); - scope.Start(); - try - { - var response = await _l2IsolationDomainRestClient.ClearArpTableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateClearArpTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Clears ARP tables for this Isolation Domain. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearArpTable - /// - /// - /// Operation Id - /// L2IsolationDomains_clearArpTable - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearArpTable(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ClearArpTable"); - scope.Start(); - try - { - var response = _l2IsolationDomainRestClient.ClearArpTable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateClearArpTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -450,34 +374,30 @@ public virtual ArmOperation ClearArpTable(WaitUntil waitUntil, EnableDisableOnRe } /// - /// Clears IPv6 neighbors for this Isolation Domain. + /// Validates the configuration of the resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearNeighborTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration /// /// /// Operation Id - /// L2IsolationDomains_clearNeighborTable + /// L2IsolationDomains_ValidateConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task ClearNeighborTableAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ClearNeighborTable"); + using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ValidateConfiguration"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.ClearNeighborTableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateClearNeighborTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _l2IsolationDomainRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -488,34 +408,30 @@ public virtual async Task ClearNeighborTableAsync(WaitUntil waitUn } /// - /// Clears IPv6 neighbors for this Isolation Domain. + /// Validates the configuration of the resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/clearNeighborTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/validateConfiguration /// /// /// Operation Id - /// L2IsolationDomains_clearNeighborTable + /// L2IsolationDomains_ValidateConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearNeighborTable(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ClearNeighborTable"); + using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ValidateConfiguration"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.ClearNeighborTable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateClearNeighborTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _l2IsolationDomainRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -526,28 +442,28 @@ public virtual ArmOperation ClearNeighborTable(WaitUntil waitUntil, EnableDisabl } /// - /// Clears IPv6 neighbors for this Isolation Domain. + /// Commits the configuration of the given resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/getArpEntries + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration /// /// /// Operation Id - /// L2IsolationDomains_getArpEntries + /// L2IsolationDomains_CommitConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task>> GetArpEntriesAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> CommitConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.GetArpEntries"); + using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.CommitConfiguration"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.GetArpEntriesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation>(new IDictionaryOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateGetArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _l2IsolationDomainRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -560,28 +476,28 @@ public virtual async Task>> GetA } /// - /// Clears IPv6 neighbors for this Isolation Domain. + /// Commits the configuration of the given resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/getArpEntries + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}/commitConfiguration /// /// /// Operation Id - /// L2IsolationDomains_getArpEntries + /// L2IsolationDomains_CommitConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation> GetArpEntries(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation CommitConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.GetArpEntries"); + using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.CommitConfiguration"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.GetArpEntries(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation>(new IDictionaryOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateGetArpEntriesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _l2IsolationDomainRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs index f55b67f296424..ee3e73dadf1ce 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -14,16 +15,19 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the L3IsolationDomain data model. - /// The L3IsolationDomain resource definition. + /// The L3 Isolation Domain resource definition. /// public partial class L3IsolationDomainData : TrackedResourceData { /// Initializes a new instance of L3IsolationDomainData. /// The location. - public L3IsolationDomainData(AzureLocation location) : base(location) + /// ARM Resource ID of the Network Fabric. + /// is null. + public L3IsolationDomainData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) { - DisabledOnResources = new ChangeTrackingList(); - OptionBDisabledOnResources = new ChangeTrackingList(); + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + NetworkFabricId = networkFabricId; } /// Initializes a new instance of L3IsolationDomainData. @@ -36,27 +40,23 @@ public L3IsolationDomainData(AzureLocation location) : base(location) /// Switch configuration description. /// Advertise Connected Subnets. Ex: "True" | "False". /// Advertise Static Routes. Ex: "True" | "False". - /// List of Ipv4 and Ipv6 route configurations. - /// L3 Isolation Domain description. + /// Aggregate route configurations. /// Connected Subnet RoutePolicy. - /// Network Fabric ARM resource id. - /// List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Administrative state of the IsolationDomain. Example: Enabled | Disabled. - /// List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. - /// Gets the provisioning state of the resource. - internal L3IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, RedistributeConnectedSubnet? redistributeConnectedSubnets, RedistributeStaticRoute? redistributeStaticRoutes, AggregateRouteConfiguration aggregateRouteConfiguration, string description, L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy connectedSubnetRoutePolicy, string networkFabricId, IReadOnlyList disabledOnResources, EnabledDisabledState? administrativeState, IReadOnlyList optionBDisabledOnResources, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// ARM Resource ID of the Network Fabric. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal L3IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, RedistributeConnectedSubnet? redistributeConnectedSubnets, RedistributeStaticRoute? redistributeStaticRoutes, AggregateRouteConfiguration aggregateRouteConfiguration, ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy, ResourceIdentifier networkFabricId, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; RedistributeConnectedSubnets = redistributeConnectedSubnets; RedistributeStaticRoutes = redistributeStaticRoutes; AggregateRouteConfiguration = aggregateRouteConfiguration; - Description = description; ConnectedSubnetRoutePolicy = connectedSubnetRoutePolicy; NetworkFabricId = networkFabricId; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - OptionBDisabledOnResources = optionBDisabledOnResources; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. @@ -65,21 +65,17 @@ internal L3IsolationDomainData(ResourceIdentifier id, string name, ResourceType public RedistributeConnectedSubnet? RedistributeConnectedSubnets { get; set; } /// Advertise Static Routes. Ex: "True" | "False". public RedistributeStaticRoute? RedistributeStaticRoutes { get; set; } - /// List of Ipv4 and Ipv6 route configurations. + /// Aggregate route configurations. public AggregateRouteConfiguration AggregateRouteConfiguration { get; set; } - /// L3 Isolation Domain description. - public string Description { get; set; } /// Connected Subnet RoutePolicy. - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } - /// Network Fabric ARM resource id. - public string NetworkFabricId { get; set; } - /// List of resources the L3 Isolation Domain is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList DisabledOnResources { get; } - /// Administrative state of the IsolationDomain. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// List of resources the OptionB is disabled on. Can be either entire NetworkFabric or NetworkRack. - public IReadOnlyList OptionBDisabledOnResources { get; } - /// Gets the provisioning state of the resource. + public ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } + /// ARM Resource ID of the Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs index 578dc22f27f09..4d4b33d8b74e7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs @@ -109,7 +109,7 @@ public virtual InternalNetworkCollection GetInternalNetworks() /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -132,7 +132,7 @@ public virtual async Task> GetInternalNetworkA /// /// /// - /// Name of the InternalNetwork. + /// Name of the Internal Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -162,7 +162,7 @@ public virtual ExternalNetworkCollection GetExternalNetworks() /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -185,7 +185,7 @@ public virtual async Task> GetExternalNetworkA /// /// /// - /// Name of the ExternalNetwork. + /// Name of the External Network. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -420,7 +420,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -429,9 +429,9 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil try { var response = await _l3IsolationDomainRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -458,7 +458,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -467,85 +467,9 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat try { var response = _l3IsolationDomainRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update administrative state of option B on CE devices - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateOptionBAdministrativeState - /// - /// - /// Operation Id - /// L3IsolationDomains_updateOptionBAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateOptionBAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.UpdateOptionBAdministrativeState"); - scope.Start(); - try - { - var response = await _l3IsolationDomainRestClient.UpdateOptionBAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateOptionBAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update administrative state of option B on CE devices - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/updateOptionBAdministrativeState - /// - /// - /// Operation Id - /// L3IsolationDomains_updateOptionBAdministrativeState - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateOptionBAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.UpdateOptionBAdministrativeState"); - scope.Start(); - try - { - var response = _l3IsolationDomainRestClient.UpdateOptionBAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateOptionBAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -556,34 +480,30 @@ public virtual ArmOperation UpdateOptionBAdministrativeState(WaitUntil waitUntil } /// - /// Clears ARP tables for this Isolation Domain. + /// Validates the configuration of the resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearArpTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration /// /// /// Operation Id - /// L3IsolationDomains_clearArpTable + /// L3IsolationDomains_ValidateConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task ClearArpTableAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ClearArpTable"); + using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ValidateConfiguration"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.ClearArpTableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateClearArpTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _l3IsolationDomainRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -594,34 +514,30 @@ public virtual async Task ClearArpTableAsync(WaitUntil waitUntil, } /// - /// Clears ARP tables for this Isolation Domain. + /// Validates the configuration of the resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearArpTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/validateConfiguration /// /// /// Operation Id - /// L3IsolationDomains_clearArpTable + /// L3IsolationDomains_ValidateConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearArpTable(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ClearArpTable"); + using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ValidateConfiguration"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.ClearArpTable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateClearArpTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _l3IsolationDomainRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -632,34 +548,30 @@ public virtual ArmOperation ClearArpTable(WaitUntil waitUntil, EnableDisableOnRe } /// - /// Clears IPv6 neighbor tables for this Isolation Domain. + /// Commits the configuration of the given resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearNeighborTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration /// /// /// Operation Id - /// L3IsolationDomains_clearNeighborTable + /// L3IsolationDomains_CommitConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task ClearNeighborTableAsync(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual async Task> CommitConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ClearNeighborTable"); + using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.CommitConfiguration"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.ClearNeighborTableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateClearNeighborTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _l3IsolationDomainRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -670,34 +582,30 @@ public virtual async Task ClearNeighborTableAsync(WaitUntil waitUn } /// - /// Clears IPv6 neighbor tables for this Isolation Domain. + /// Commits the configuration of the given resources. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/clearNeighborTable + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/commitConfiguration /// /// /// Operation Id - /// L3IsolationDomains_clearNeighborTable + /// L3IsolationDomains_CommitConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearNeighborTable(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public virtual ArmOperation CommitConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.ClearNeighborTable"); + using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.CommitConfiguration"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.ClearNeighborTable(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateClearNeighborTableRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = _l3IsolationDomainRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/AccessControlListOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/AccessControlListOperationSource.cs new file mode 100644 index 0000000000000..36788f6524f51 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/AccessControlListOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class AccessControlListOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AccessControlListOperationSource(ArmClient client) + { + _client = client; + } + + AccessControlListResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = AccessControlListData.DeserializeAccessControlListData(document.RootElement); + return new AccessControlListResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = AccessControlListData.DeserializeAccessControlListData(document.RootElement); + return new AccessControlListResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForDeviceUpdateOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForDeviceUpdateOperationSource.cs new file mode 100644 index 0000000000000..f3ead2de2c4ab --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForDeviceUpdateOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class CommonPostActionResponseForDeviceUpdateOperationSource : IOperationSource + { + CommonPostActionResponseForDeviceUpdate IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return CommonPostActionResponseForDeviceUpdate.DeserializeCommonPostActionResponseForDeviceUpdate(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return CommonPostActionResponseForDeviceUpdate.DeserializeCommonPostActionResponseForDeviceUpdate(document.RootElement); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForStateUpdateOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForStateUpdateOperationSource.cs new file mode 100644 index 0000000000000..310a6144d22b1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/CommonPostActionResponseForStateUpdateOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class CommonPostActionResponseForStateUpdateOperationSource : IOperationSource + { + CommonPostActionResponseForStateUpdate IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return CommonPostActionResponseForStateUpdate.DeserializeCommonPostActionResponseForStateUpdate(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return CommonPostActionResponseForStateUpdate.DeserializeCommonPostActionResponseForStateUpdate(document.RootElement); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/GetDeviceStatusPropertiesOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/GetDeviceStatusPropertiesOperationSource.cs deleted file mode 100644 index fe9bc53933a3f..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/GetDeviceStatusPropertiesOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class GetDeviceStatusPropertiesOperationSource : IOperationSource - { - GetDeviceStatusProperties IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return GetDeviceStatusProperties.DeserializeGetDeviceStatusProperties(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return GetDeviceStatusProperties.DeserializeGetDeviceStatusProperties(document.RootElement); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IDictionaryOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IDictionaryOperationSource.cs deleted file mode 100644 index d9184549e2178..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IDictionaryOperationSource.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class IDictionaryOperationSource : IOperationSource> - { - IDictionary IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - Dictionary dictionary = new Dictionary(); - foreach (var property in document.RootElement.EnumerateObject()) - { - dictionary.Add(property.Name, ARPProperties.DeserializeARPProperties(property.Value)); - } - return dictionary; - } - - async ValueTask> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - Dictionary dictionary = new Dictionary(); - foreach (var property in document.RootElement.EnumerateObject()) - { - dictionary.Add(property.Name, ARPProperties.DeserializeARPProperties(property.Value)); - } - return dictionary; - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InterfaceStatusOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InterfaceStatusOperationSource.cs deleted file mode 100644 index ba3372318a290..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InterfaceStatusOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class InterfaceStatusOperationSource : IOperationSource - { - InterfaceStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return InterfaceStatus.DeserializeInterfaceStatus(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return InterfaceStatus.DeserializeInterfaceStatus(document.RootElement); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayOperationSource.cs new file mode 100644 index 0000000000000..85b0b8047574b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class InternetGatewayOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal InternetGatewayOperationSource(ArmClient client) + { + _client = client; + } + + InternetGatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = InternetGatewayData.DeserializeInternetGatewayData(document.RootElement); + return new InternetGatewayResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = InternetGatewayData.DeserializeInternetGatewayData(document.RootElement); + return new InternetGatewayResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayRuleOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayRuleOperationSource.cs new file mode 100644 index 0000000000000..7ac7168b244cc --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternetGatewayRuleOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class InternetGatewayRuleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal InternetGatewayRuleOperationSource(ArmClient client) + { + _client = client; + } + + InternetGatewayRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = InternetGatewayRuleData.DeserializeInternetGatewayRuleData(document.RootElement); + return new InternetGatewayRuleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = InternetGatewayRuleData.DeserializeInternetGatewayRuleData(document.RootElement); + return new InternetGatewayRuleResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NeighborGroupOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NeighborGroupOperationSource.cs new file mode 100644 index 0000000000000..902136f7651ca --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NeighborGroupOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class NeighborGroupOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NeighborGroupOperationSource(ArmClient client) + { + _client = client; + } + + NeighborGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NeighborGroupData.DeserializeNeighborGroupData(document.RootElement); + return new NeighborGroupResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NeighborGroupData.DeserializeNeighborGroupData(document.RootElement); + return new NeighborGroupResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs new file mode 100644 index 0000000000000..4b3c17b31a81a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class NetworkPacketBrokerOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkPacketBrokerOperationSource(ArmClient client) + { + _client = client; + } + + NetworkPacketBrokerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(document.RootElement); + return new NetworkPacketBrokerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(document.RootElement); + return new NetworkPacketBrokerResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapOperationSource.cs new file mode 100644 index 0000000000000..e15e201b40031 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class NetworkTapOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkTapOperationSource(ArmClient client) + { + _client = client; + } + + NetworkTapResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkTapData.DeserializeNetworkTapData(document.RootElement); + return new NetworkTapResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkTapData.DeserializeNetworkTapData(document.RootElement); + return new NetworkTapResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapRuleOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapRuleOperationSource.cs new file mode 100644 index 0000000000000..8742754a1fc76 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapRuleOperationSource.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class NetworkTapRuleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkTapRuleOperationSource(ArmClient client) + { + _client = client; + } + + NetworkTapRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkTapRuleData.DeserializeNetworkTapRuleData(document.RootElement); + return new NetworkTapRuleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkTapRuleData.DeserializeNetworkTapRuleData(document.RootElement); + return new NetworkTapRuleResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/SupportPackagePropertiesOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/SupportPackagePropertiesOperationSource.cs deleted file mode 100644 index c89e9b2cc4ba5..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/SupportPackagePropertiesOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class SupportPackagePropertiesOperationSource : IOperationSource - { - SupportPackageProperties IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return SupportPackageProperties.DeserializeSupportPackageProperties(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return SupportPackageProperties.DeserializeSupportPackageProperties(document.RootElement); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResponseOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResponseOperationSource.cs new file mode 100644 index 0000000000000..b47a770947c6b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResponseOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal class ValidateConfigurationResponseOperationSource : IOperationSource + { + ValidateConfigurationResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ValidateConfigurationResponse.DeserializeValidateConfigurationResponse(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ValidateConfigurationResponse.DeserializeValidateConfigurationResponse(document.RootElement); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.Serialization.cs deleted file mode 100644 index c52281d3b68d3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class ARPProperties - { - internal static ARPProperties DeserializeARPProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string address = default; - string age = default; - string macAddress = default; - string @interface = default; - Optional state = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("address"u8)) - { - address = property.Value.GetString(); - continue; - } - if (property.NameEquals("age"u8)) - { - age = property.Value.GetString(); - continue; - } - if (property.NameEquals("macAddress"u8)) - { - macAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("interface"u8)) - { - @interface = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - } - return new ARPProperties(address, age, macAddress, @interface, state.Value); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.cs deleted file mode 100644 index 6f828bded1bd0..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Show ARP table entry properties. - public partial class ARPProperties - { - /// Initializes a new instance of ARPProperties. - /// Ipv4 or Ipv6 address. - /// Duration in seconds. - /// Hardware address. - /// Layer 2 interface name. - /// , , or is null. - internal ARPProperties(string address, string age, string macAddress, string @interface) - { - Argument.AssertNotNull(address, nameof(address)); - Argument.AssertNotNull(age, nameof(age)); - Argument.AssertNotNull(macAddress, nameof(macAddress)); - Argument.AssertNotNull(@interface, nameof(@interface)); - - Address = address; - Age = age; - MacAddress = macAddress; - Interface = @interface; - } - - /// Initializes a new instance of ARPProperties. - /// Ipv4 or Ipv6 address. - /// Duration in seconds. - /// Hardware address. - /// Layer 2 interface name. - /// ARP status. - internal ARPProperties(string address, string age, string macAddress, string @interface, string state) - { - Address = address; - Age = age; - MacAddress = macAddress; - Interface = @interface; - State = state; - } - - /// Ipv4 or Ipv6 address. - public string Address { get; } - /// Duration in seconds. - public string Age { get; } - /// Hardware address. - public string MacAddress { get; } - /// Layer 2 interface name. - public string Interface { get; } - /// ARP status. - public string State { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.Serialization.cs new file mode 100644 index 0000000000000..b08be774d23e8 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class AccessControlListAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AclActionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(AclActionType.Value.ToString()); + } + if (Optional.IsDefined(CounterName)) + { + writer.WritePropertyName("counterName"u8); + writer.WriteStringValue(CounterName); + } + writer.WriteEndObject(); + } + + internal static AccessControlListAction DeserializeAccessControlListAction(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional counterName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AclActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("counterName"u8)) + { + counterName = property.Value.GetString(); + continue; + } + } + return new AccessControlListAction(Optional.ToNullable(type), counterName.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.cs new file mode 100644 index 0000000000000..d7ed7fb8ee763 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Action that need to performed. + public partial class AccessControlListAction + { + /// Initializes a new instance of AccessControlListAction. + public AccessControlListAction() + { + } + + /// Initializes a new instance of AccessControlListAction. + /// Type of actions that can be performed. + /// Name of the counter block to get match count information. + internal AccessControlListAction(AclActionType? aclActionType, string counterName) + { + AclActionType = aclActionType; + CounterName = counterName; + } + + /// Type of actions that can be performed. + public AclActionType? AclActionType { get; set; } + /// Name of the counter block to get match count information. + public string CounterName { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.Serialization.cs deleted file mode 100644 index 707c7c61a83e2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class AccessControlListConditionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("sequenceNumber"u8); - writer.WriteNumberValue(SequenceNumber); - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.ToString()); - writer.WritePropertyName("destinationAddress"u8); - writer.WriteStringValue(DestinationAddress); - writer.WritePropertyName("destinationPort"u8); - writer.WriteStringValue(DestinationPort); - writer.WritePropertyName("sourceAddress"u8); - writer.WriteStringValue(SourceAddress); - writer.WritePropertyName("sourcePort"u8); - writer.WriteStringValue(SourcePort); - writer.WritePropertyName("protocol"u8); - writer.WriteNumberValue(Protocol); - if (Optional.IsDefined(Annotation)) - { - writer.WritePropertyName("annotation"u8); - writer.WriteStringValue(Annotation); - } - writer.WriteEndObject(); - } - - internal static AccessControlListConditionProperties DeserializeAccessControlListConditionProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int sequenceNumber = default; - ConditionActionType action = default; - string destinationAddress = default; - string destinationPort = default; - string sourceAddress = default; - string sourcePort = default; - int protocol = default; - Optional annotation = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sequenceNumber"u8)) - { - sequenceNumber = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("action"u8)) - { - action = new ConditionActionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("destinationAddress"u8)) - { - destinationAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("destinationPort"u8)) - { - destinationPort = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceAddress"u8)) - { - sourceAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourcePort"u8)) - { - sourcePort = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol"u8)) - { - protocol = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("annotation"u8)) - { - annotation = property.Value.GetString(); - continue; - } - } - return new AccessControlListConditionProperties(annotation.Value, sequenceNumber, action, destinationAddress, destinationPort, sourceAddress, sourcePort, protocol); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.cs deleted file mode 100644 index d712a0f5071d2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Access Control List condition model. - public partial class AccessControlListConditionProperties : AnnotationResource - { - /// Initializes a new instance of AccessControlListConditionProperties. - /// sequenceNumber of the Access Control List. - /// action. Example: allow | deny. - /// destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - /// destinationPort. Example: any | 1253. - /// sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - /// sourcePort. Example: any | 1253. - /// TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1. - /// , , or is null. - public AccessControlListConditionProperties(int sequenceNumber, ConditionActionType action, string destinationAddress, string destinationPort, string sourceAddress, string sourcePort, int protocol) - { - Argument.AssertNotNull(destinationAddress, nameof(destinationAddress)); - Argument.AssertNotNull(destinationPort, nameof(destinationPort)); - Argument.AssertNotNull(sourceAddress, nameof(sourceAddress)); - Argument.AssertNotNull(sourcePort, nameof(sourcePort)); - - SequenceNumber = sequenceNumber; - Action = action; - DestinationAddress = destinationAddress; - DestinationPort = destinationPort; - SourceAddress = sourceAddress; - SourcePort = sourcePort; - Protocol = protocol; - } - - /// Initializes a new instance of AccessControlListConditionProperties. - /// Switch configuration description. - /// sequenceNumber of the Access Control List. - /// action. Example: allow | deny. - /// destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - /// destinationPort. Example: any | 1253. - /// sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - /// sourcePort. Example: any | 1253. - /// TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1. - internal AccessControlListConditionProperties(string annotation, int sequenceNumber, ConditionActionType action, string destinationAddress, string destinationPort, string sourceAddress, string sourcePort, int protocol) : base(annotation) - { - SequenceNumber = sequenceNumber; - Action = action; - DestinationAddress = destinationAddress; - DestinationPort = destinationPort; - SourceAddress = sourceAddress; - SourcePort = sourcePort; - Protocol = protocol; - } - - /// sequenceNumber of the Access Control List. - public int SequenceNumber { get; set; } - /// action. Example: allow | deny. - public ConditionActionType Action { get; set; } - /// destinationAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - public string DestinationAddress { get; set; } - /// destinationPort. Example: any | 1253. - public string DestinationPort { get; set; } - /// sourceAddress. Example: any | 1.1.1.0/24 | 1.1.10.10. - public string SourceAddress { get; set; } - /// sourcePort. Example: any | 1253. - public string SourcePort { get; set; } - /// TCP/IP protocol as defined in the list of IP protocol numbers. Example: 255 (any) | 0 | 1. - public int Protocol { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs index b1d904350cd59..a6988cd1b716e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -38,15 +39,41 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - writer.WritePropertyName("addressFamily"u8); - writer.WriteStringValue(AddressFamily.ToString()); - writer.WritePropertyName("conditions"u8); - writer.WriteStartArray(); - foreach (var item in Conditions) + if (Optional.IsDefined(ConfigurationType)) { - writer.WriteObjectValue(item); + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(AclsUri)) + { + writer.WritePropertyName("aclsUrl"u8); + writer.WriteStringValue(AclsUri.AbsoluteUri); + } + if (Optional.IsDefined(DefaultAction)) + { + writer.WritePropertyName("defaultAction"u8); + writer.WriteStringValue(DefaultAction.Value.ToString()); + } + if (Optional.IsCollectionDefined(MatchConfigurations)) + { + writer.WritePropertyName("matchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in MatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DynamicMatchConfigurations)) + { + writer.WritePropertyName("dynamicMatchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in DynamicMatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -64,9 +91,15 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme ResourceType type = default; Optional systemData = default; Optional annotation = default; - AddressFamily addressFamily = default; - IList conditions = default; + Optional configurationType = default; + Optional aclsUrl = default; + Optional defaultAction = default; + Optional> matchConfigurations = default; + Optional> dynamicMatchConfigurations = default; + Optional lastSyncedTime = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -126,19 +159,77 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("addressFamily"u8)) + if (property0.NameEquals("configurationType"u8)) { - addressFamily = new AddressFamily(property0.Value.GetString()); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationType = new ConfigurationType(property0.Value.GetString()); continue; } - if (property0.NameEquals("conditions"u8)) + if (property0.NameEquals("aclsUrl"u8)) { - List array = new List(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aclsUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("defaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAction = new CommunityActionType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("matchConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AccessControlListMatchConfiguration.DeserializeAccessControlListMatchConfiguration(item)); + } + matchConfigurations = array; + continue; + } + if (property0.NameEquals("dynamicMatchConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(AccessControlListConditionProperties.DeserializeAccessControlListConditionProperties(item)); + array.Add(CommonDynamicMatchConfiguration.DeserializeCommonDynamicMatchConfiguration(item)); + } + dynamicMatchConfigurations = array; + continue; + } + if (property0.NameEquals("lastSyncedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSyncedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; } - conditions = array; + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -150,11 +241,20 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new AccessControlListData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, addressFamily, conditions, Optional.ToNullable(provisioningState)); + return new AccessControlListData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(configurationType), aclsUrl.Value, Optional.ToNullable(defaultAction), Optional.ToList(matchConfigurations), Optional.ToList(dynamicMatchConfigurations), Optional.ToNullable(lastSyncedTime), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.Serialization.cs new file mode 100644 index 0000000000000..79e83fdab1071 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.Serialization.cs @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class AccessControlListMatchCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(EtherTypes)) + { + writer.WritePropertyName("etherTypes"u8); + writer.WriteStartArray(); + foreach (var item in EtherTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Fragments)) + { + writer.WritePropertyName("fragments"u8); + writer.WriteStartArray(); + foreach (var item in Fragments) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPLengths)) + { + writer.WritePropertyName("ipLengths"u8); + writer.WriteStartArray(); + foreach (var item in IPLengths) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TtlValues)) + { + writer.WritePropertyName("ttlValues"u8); + writer.WriteStartArray(); + foreach (var item in TtlValues) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DscpMarkings)) + { + writer.WritePropertyName("dscpMarkings"u8); + writer.WriteStartArray(); + foreach (var item in DscpMarkings) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PortCondition)) + { + writer.WritePropertyName("portCondition"u8); + writer.WriteObjectValue(PortCondition); + } + if (Optional.IsCollectionDefined(ProtocolTypes)) + { + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(VlanMatchCondition)) + { + writer.WritePropertyName("vlanMatchCondition"u8); + writer.WriteObjectValue(VlanMatchCondition); + } + if (Optional.IsDefined(IPCondition)) + { + writer.WritePropertyName("ipCondition"u8); + writer.WriteObjectValue(IPCondition); + } + writer.WriteEndObject(); + } + + internal static AccessControlListMatchCondition DeserializeAccessControlListMatchCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> etherTypes = default; + Optional> fragments = default; + Optional> ipLengths = default; + Optional> ttlValues = default; + Optional> dscpMarkings = default; + Optional portCondition = default; + Optional> protocolTypes = default; + Optional vlanMatchCondition = default; + Optional ipCondition = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etherTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + etherTypes = array; + continue; + } + if (property.NameEquals("fragments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fragments = array; + continue; + } + if (property.NameEquals("ipLengths"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipLengths = array; + continue; + } + if (property.NameEquals("ttlValues"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ttlValues = array; + continue; + } + if (property.NameEquals("dscpMarkings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dscpMarkings = array; + continue; + } + if (property.NameEquals("portCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + portCondition = AccessControlListPortCondition.DeserializeAccessControlListPortCondition(property.Value); + continue; + } + if (property.NameEquals("protocolTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("vlanMatchCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanMatchCondition = VlanMatchCondition.DeserializeVlanMatchCondition(property.Value); + continue; + } + if (property.NameEquals("ipCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipCondition = IPMatchCondition.DeserializeIPMatchCondition(property.Value); + continue; + } + } + return new AccessControlListMatchCondition(Optional.ToList(protocolTypes), vlanMatchCondition.Value, ipCondition.Value, Optional.ToList(etherTypes), Optional.ToList(fragments), Optional.ToList(ipLengths), Optional.ToList(ttlValues), Optional.ToList(dscpMarkings), portCondition.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.cs new file mode 100644 index 0000000000000..6f99fdf330863 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the match condition that is supported to filter the traffic. + public partial class AccessControlListMatchCondition : CommonMatchConditions + { + /// Initializes a new instance of AccessControlListMatchCondition. + public AccessControlListMatchCondition() + { + EtherTypes = new ChangeTrackingList(); + Fragments = new ChangeTrackingList(); + IPLengths = new ChangeTrackingList(); + TtlValues = new ChangeTrackingList(); + DscpMarkings = new ChangeTrackingList(); + } + + /// Initializes a new instance of AccessControlListMatchCondition. + /// List of the protocols that need to be matched. + /// Vlan match condition that needs to be matched. + /// IP condition that needs to be matched. + /// List of ether type values that need to be matched. + /// List of IP fragment packets that need to be matched. + /// List of IP Lengths that need to be matched. + /// List of TTL [Time To Live] values that need to be matched. + /// List of DSCP Markings that need to be matched. + /// Defines the port condition that needs to be matched. + internal AccessControlListMatchCondition(IList protocolTypes, VlanMatchCondition vlanMatchCondition, IPMatchCondition ipCondition, IList etherTypes, IList fragments, IList ipLengths, IList ttlValues, IList dscpMarkings, AccessControlListPortCondition portCondition) : base(protocolTypes, vlanMatchCondition, ipCondition) + { + EtherTypes = etherTypes; + Fragments = fragments; + IPLengths = ipLengths; + TtlValues = ttlValues; + DscpMarkings = dscpMarkings; + PortCondition = portCondition; + } + + /// List of ether type values that need to be matched. + public IList EtherTypes { get; } + /// List of IP fragment packets that need to be matched. + public IList Fragments { get; } + /// List of IP Lengths that need to be matched. + public IList IPLengths { get; } + /// List of TTL [Time To Live] values that need to be matched. + public IList TtlValues { get; } + /// List of DSCP Markings that need to be matched. + public IList DscpMarkings { get; } + /// Defines the port condition that needs to be matched. + public AccessControlListPortCondition PortCondition { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.Serialization.cs new file mode 100644 index 0000000000000..a4e805a444f5e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class AccessControlListMatchConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MatchConfigurationName)) + { + writer.WritePropertyName("matchConfigurationName"u8); + writer.WriteStringValue(MatchConfigurationName); + } + if (Optional.IsDefined(SequenceNumber)) + { + writer.WritePropertyName("sequenceNumber"u8); + writer.WriteNumberValue(SequenceNumber.Value); + } + if (Optional.IsDefined(IPAddressType)) + { + writer.WritePropertyName("ipAddressType"u8); + writer.WriteStringValue(IPAddressType.Value.ToString()); + } + if (Optional.IsCollectionDefined(MatchConditions)) + { + writer.WritePropertyName("matchConditions"u8); + writer.WriteStartArray(); + foreach (var item in MatchConditions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static AccessControlListMatchConfiguration DeserializeAccessControlListMatchConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional matchConfigurationName = default; + Optional sequenceNumber = default; + Optional ipAddressType = default; + Optional> matchConditions = default; + Optional> actions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("matchConfigurationName"u8)) + { + matchConfigurationName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sequenceNumber"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sequenceNumber = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("ipAddressType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAddressType = new IPAddressType(property.Value.GetString()); + continue; + } + if (property.NameEquals("matchConditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlListMatchCondition.DeserializeAccessControlListMatchCondition(item)); + } + matchConditions = array; + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AccessControlListAction.DeserializeAccessControlListAction(item)); + } + actions = array; + continue; + } + } + return new AccessControlListMatchConfiguration(matchConfigurationName.Value, Optional.ToNullable(sequenceNumber), Optional.ToNullable(ipAddressType), Optional.ToList(matchConditions), Optional.ToList(actions)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.cs new file mode 100644 index 0000000000000..e837f3d2217cd --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the match configuration that are supported to filter the traffic. + public partial class AccessControlListMatchConfiguration + { + /// Initializes a new instance of AccessControlListMatchConfiguration. + public AccessControlListMatchConfiguration() + { + MatchConditions = new ChangeTrackingList(); + Actions = new ChangeTrackingList(); + } + + /// Initializes a new instance of AccessControlListMatchConfiguration. + /// The name of the match configuration. + /// Sequence Number of the match configuration. + /// Type of IP Address. IPv4 or IPv6. + /// List of the match conditions. + /// List of actions that need to be performed for the matched conditions. + internal AccessControlListMatchConfiguration(string matchConfigurationName, long? sequenceNumber, IPAddressType? ipAddressType, IList matchConditions, IList actions) + { + MatchConfigurationName = matchConfigurationName; + SequenceNumber = sequenceNumber; + IPAddressType = ipAddressType; + MatchConditions = matchConditions; + Actions = actions; + } + + /// The name of the match configuration. + public string MatchConfigurationName { get; set; } + /// Sequence Number of the match configuration. + public long? SequenceNumber { get; set; } + /// Type of IP Address. IPv4 or IPv6. + public IPAddressType? IPAddressType { get; set; } + /// List of the match conditions. + public IList MatchConditions { get; } + /// List of actions that need to be performed for the matched conditions. + public IList Actions { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs index 8770e0ae230a7..b6237afe59778 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs @@ -28,26 +28,46 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(Annotation)) + if (Optional.IsDefined(ConfigurationType)) { - writer.WritePropertyName("annotation"u8); - writer.WriteStringValue(Annotation); + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(AclsUri)) + { + writer.WritePropertyName("aclsUrl"u8); + writer.WriteStringValue(AclsUri.AbsoluteUri); } - if (Optional.IsDefined(AddressFamily)) + if (Optional.IsDefined(DefaultAction)) { - writer.WritePropertyName("addressFamily"u8); - writer.WriteStringValue(AddressFamily.Value.ToString()); + writer.WritePropertyName("defaultAction"u8); + writer.WriteStringValue(DefaultAction.Value.ToString()); } - if (Optional.IsCollectionDefined(Conditions)) + if (Optional.IsCollectionDefined(MatchConfigurations)) { - writer.WritePropertyName("conditions"u8); + writer.WritePropertyName("matchConfigurations"u8); writer.WriteStartArray(); - foreach (var item in Conditions) + foreach (var item in MatchConfigurations) { writer.WriteObjectValue(item); } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(DynamicMatchConfigurations)) + { + writer.WritePropertyName("dynamicMatchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in DynamicMatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs index cee9c38a384fe..7c1f652a85242 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs @@ -5,28 +5,33 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The AccessControlList patch resource definition. - public partial class AccessControlListPatch + /// The Access Control Lists patch resource definition. + public partial class AccessControlListPatch : NetworkRackPatch { /// Initializes a new instance of AccessControlListPatch. public AccessControlListPatch() { - Tags = new ChangeTrackingDictionary(); - Conditions = new ChangeTrackingList(); + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); } - /// Resource tags. - public IDictionary Tags { get; } + /// Input method to configure Access Control List. + public ConfigurationType? ConfigurationType { get; set; } + /// Access Control List file URL. + public Uri AclsUri { get; set; } + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + public CommunityActionType? DefaultAction { get; set; } + /// List of match configurations. + public IList MatchConfigurations { get; } + /// List of dynamic match configurations. + public IList DynamicMatchConfigurations { get; } /// Switch configuration description. public string Annotation { get; set; } - /// IP address family. Example: ipv4 | ipv6. - public AddressFamily? AddressFamily { get; set; } - /// Access Control List conditions. - public IList Conditions { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.Serialization.cs new file mode 100644 index 0000000000000..83658bc869eac --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class AccessControlListPortCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Flags)) + { + writer.WritePropertyName("flags"u8); + writer.WriteStartArray(); + foreach (var item in Flags) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PortType)) + { + writer.WritePropertyName("portType"u8); + writer.WriteStringValue(PortType.Value.ToString()); + } + writer.WritePropertyName("layer4Protocol"u8); + writer.WriteStringValue(Layer4Protocol.ToString()); + if (Optional.IsCollectionDefined(Ports)) + { + writer.WritePropertyName("ports"u8); + writer.WriteStartArray(); + foreach (var item in Ports) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PortGroupNames)) + { + writer.WritePropertyName("portGroupNames"u8); + writer.WriteStartArray(); + foreach (var item in PortGroupNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static AccessControlListPortCondition DeserializeAccessControlListPortCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> flags = default; + Optional portType = default; + Layer4Protocol layer4Protocol = default; + Optional> ports = default; + Optional> portGroupNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("flags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + flags = array; + continue; + } + if (property.NameEquals("portType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + portType = new PortType(property.Value.GetString()); + continue; + } + if (property.NameEquals("layer4Protocol"u8)) + { + layer4Protocol = new Layer4Protocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("ports"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ports = array; + continue; + } + if (property.NameEquals("portGroupNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + portGroupNames = array; + continue; + } + } + return new AccessControlListPortCondition(Optional.ToNullable(portType), layer4Protocol, Optional.ToList(ports), Optional.ToList(portGroupNames), Optional.ToList(flags)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.cs new file mode 100644 index 0000000000000..f905f5f6f29c0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the port condition that needs to be matched. + public partial class AccessControlListPortCondition : PortCondition + { + /// Initializes a new instance of AccessControlListPortCondition. + /// Layer4 protocol type that needs to be matched. + public AccessControlListPortCondition(Layer4Protocol layer4Protocol) : base(layer4Protocol) + { + Flags = new ChangeTrackingList(); + } + + /// Initializes a new instance of AccessControlListPortCondition. + /// Port type that needs to be matched. + /// Layer4 protocol type that needs to be matched. + /// List of the Ports that need to be matched. + /// List of the port Group Names that need to be matched. + /// List of protocol flags that need to be matched. + internal AccessControlListPortCondition(PortType? portType, Layer4Protocol layer4Protocol, IList ports, IList portGroupNames, IList flags) : base(portType, layer4Protocol, ports, portGroupNames) + { + Flags = flags; + } + + /// List of protocol flags that need to be matched. + public IList Flags { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs index dbf97fd31b79d..6127839413dc3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of AccessControlLists. + /// List of Access Control Lists. internal partial class AccessControlListsListResult { /// Initializes a new instance of AccessControlListsListResult. @@ -21,7 +21,7 @@ internal AccessControlListsListResult() } /// Initializes a new instance of AccessControlListsListResult. - /// List of AccessControlList resources. + /// List of Access Control List resources. /// Url to follow for getting next page of resources. internal AccessControlListsListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal AccessControlListsListResult(IReadOnlyList value NextLink = nextLink; } - /// List of AccessControlList resources. + /// List of Access Control List resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AclActionType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AclActionType.cs new file mode 100644 index 0000000000000..089a27551c70f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AclActionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of actions that can be performed. + public readonly partial struct AclActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AclActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DropValue = "Drop"; + private const string CountValue = "Count"; + private const string LogValue = "Log"; + + /// Drop. + public static AclActionType Drop { get; } = new AclActionType(DropValue); + /// Count. + public static AclActionType Count { get; } = new AclActionType(CountValue); + /// Log. + public static AclActionType Log { get; } = new AclActionType(LogValue); + /// Determines if two values are the same. + public static bool operator ==(AclActionType left, AclActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AclActionType left, AclActionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AclActionType(string value) => new AclActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AclActionType other && Equals(other); + /// + public bool Equals(AclActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Action.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Action.cs new file mode 100644 index 0000000000000..d398a69abc149 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Action.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Specify action. + public readonly partial struct Action : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Action(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static Action Allow { get; } = new Action(AllowValue); + /// Deny. + public static Action Deny { get; } = new Action(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(Action left, Action right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Action left, Action right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Action(string value) => new Action(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Action other && Equals(other); + /// + public bool Equals(Action other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs index 6e310a9f9a86f..f8c3c8453e064 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs @@ -18,16 +18,16 @@ public ActionIPCommunityProperties() } /// Initializes a new instance of ActionIPCommunityProperties. - /// IP Community ID list properties. - /// IP Community ID list properties. - /// IP Community ID list properties. + /// List of IP Community IDs. + /// List of IP Community IDs. + /// List of IP Community IDs. internal ActionIPCommunityProperties(IPCommunityIdList @add, IPCommunityIdList delete, IPCommunityIdList @set) : base(@add) { Delete = delete; Set = @set; } - /// IP Community ID list properties. + /// List of IP Community IDs. internal IPCommunityIdList Delete { get; set; } /// List of IP Community resource IDs. public IList DeleteIPCommunityIds @@ -40,7 +40,7 @@ public IList DeleteIPCommunityIds } } - /// IP Community ID list properties. + /// List of IP Community IDs. internal IPCommunityIdList Set { get; set; } /// List of IP Community resource IDs. public IList SetIPCommunityIds diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs index 709ced775785f..4e5fd42fa0cfd 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs @@ -18,16 +18,16 @@ public ActionIPExtendedCommunityProperties() } /// Initializes a new instance of ActionIPExtendedCommunityProperties. - /// IP Extended Community Id list properties. - /// IP Extended Community Id list properties. - /// IP Extended Community Id list properties. + /// List of IP Extended Community IDs. + /// List of IP Extended Community IDs. + /// List of IP Extended Community IDs. internal ActionIPExtendedCommunityProperties(IPExtendedCommunityIdList @add, IPExtendedCommunityIdList delete, IPExtendedCommunityIdList @set) : base(@add) { Delete = delete; Set = @set; } - /// IP Extended Community Id list properties. + /// List of IP Extended Community IDs. internal IPExtendedCommunityIdList Delete { get; set; } /// List of IP Extended Community resource IDs. public IList DeleteIPExtendedCommunityIds @@ -40,7 +40,7 @@ public IList DeleteIPExtendedCommunityIds } } - /// IP Extended Community Id list properties. + /// List of IP Extended Community IDs. internal IPExtendedCommunityIdList Set { get; set; } /// List of IP Extended Community resource IDs. public IList SetIPExtendedCommunityIds diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamily.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamily.cs deleted file mode 100644 index 5a1f52e34648a..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamily.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// IP address family. Example: ipv4 | ipv6. - public readonly partial struct AddressFamily : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AddressFamily(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IPv4Value = "ipv4"; - private const string IPv6Value = "ipv6"; - - /// ipv4. - public static AddressFamily IPv4 { get; } = new AddressFamily(IPv4Value); - /// ipv6. - public static AddressFamily IPv6 { get; } = new AddressFamily(IPv6Value); - /// Determines if two values are the same. - public static bool operator ==(AddressFamily left, AddressFamily right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AddressFamily left, AddressFamily right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AddressFamily(string value) => new AddressFamily(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AddressFamily other && Equals(other); - /// - public bool Equals(AddressFamily other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamilyType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamilyType.cs new file mode 100644 index 0000000000000..0b040858a50cb --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamilyType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. + public readonly partial struct AddressFamilyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AddressFamilyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IPv4Value = "IPv4"; + private const string IPv6Value = "IPv6"; + + /// IPv4. + public static AddressFamilyType IPv4 { get; } = new AddressFamilyType(IPv4Value); + /// IPv6. + public static AddressFamilyType IPv6 { get; } = new AddressFamilyType(IPv6Value); + /// Determines if two values are the same. + public static bool operator ==(AddressFamilyType left, AddressFamilyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AddressFamilyType left, AddressFamilyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AddressFamilyType(string value) => new AddressFamilyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AddressFamilyType other && Equals(other); + /// + public bool Equals(AddressFamilyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs index 068e174f2de92..65f48dcefc792 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Administrative state. + /// State defined to represent administrative actions or post actions on a particular resource. public readonly partial struct AdministrativeState : IEquatable { private readonly string _value; @@ -22,13 +22,19 @@ public AdministrativeState(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string EnableValue = "Enable"; - private const string DisableValue = "Disable"; - - /// Enable. - public static AdministrativeState Enable { get; } = new AdministrativeState(EnableValue); - /// Disable. - public static AdministrativeState Disable { get; } = new AdministrativeState(DisableValue); + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string MATValue = "MAT"; + private const string RMAValue = "RMA"; + + /// Enabled. + public static AdministrativeState Enabled { get; } = new AdministrativeState(EnabledValue); + /// Disabled. + public static AdministrativeState Disabled { get; } = new AdministrativeState(DisabledValue); + /// MAT. + public static AdministrativeState MAT { get; } = new AdministrativeState(MATValue); + /// RMA. + public static AdministrativeState RMA { get; } = new AdministrativeState(RMAValue); /// Determines if two values are the same. public static bool operator ==(AdministrativeState left, AdministrativeState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.Serialization.cs index f9de3267c7e06..ff2527ba6db02 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.Serialization.cs @@ -15,11 +15,8 @@ public partial class AggregateRoute : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - writer.WriteStringValue(Prefix); - } + writer.WritePropertyName("prefix"u8); + writer.WriteStringValue(Prefix); writer.WriteEndObject(); } @@ -29,7 +26,7 @@ internal static AggregateRoute DeserializeAggregateRoute(JsonElement element) { return null; } - Optional prefix = default; + string prefix = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prefix"u8)) @@ -38,7 +35,7 @@ internal static AggregateRoute DeserializeAggregateRoute(JsonElement element) continue; } } - return new AggregateRoute(prefix.Value); + return new AggregateRoute(prefix); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.cs index af49a3ec15c50..1eda0f285daf2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRoute.cs @@ -5,24 +5,25 @@ #nullable disable +using System; +using Azure.Core; + namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Aggregate Route properties. + /// aggregateIpv4Route model. public partial class AggregateRoute { /// Initializes a new instance of AggregateRoute. - public AggregateRoute() + /// IPv4 Prefix of the aggregate Ipv4Route. + /// is null. + public AggregateRoute(string prefix) { - } + Argument.AssertNotNull(prefix, nameof(prefix)); - /// Initializes a new instance of AggregateRoute. - /// Prefix of the aggregate Route. - internal AggregateRoute(string prefix) - { Prefix = prefix; } - /// Prefix of the aggregate Route. + /// IPv4 Prefix of the aggregate Ipv4Route. public string Prefix { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRouteConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRouteConfiguration.cs index 53d5390fe6db8..928c13777aa1f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRouteConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AggregateRouteConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IPv4 and IPv6 route configurations. + /// List of IPv4 and IPv6 aggregate routes. public partial class AggregateRouteConfiguration { /// Initializes a new instance of AggregateRouteConfiguration. @@ -22,7 +22,7 @@ public AggregateRouteConfiguration() /// Initializes a new instance of AggregateRouteConfiguration. /// List of IPv4 Route prefixes. - /// List of IPv6 Routes prefixes. + /// List of Ipv6Routes prefixes. internal AggregateRouteConfiguration(IList ipv4Routes, IList ipv6Routes) { IPv4Routes = ipv4Routes; @@ -31,7 +31,7 @@ internal AggregateRouteConfiguration(IList ipv4Routes, IList List of IPv4 Route prefixes. public IList IPv4Routes { get; } - /// List of IPv6 Routes prefixes. + /// List of Ipv6Routes prefixes. public IList IPv6Routes { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdAdministrativeState.cs new file mode 100644 index 0000000000000..a418311a8c6e9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdAdministrativeState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Administrative state of the BfdConfiguration. Example: Enabled | Disabled. + public readonly partial struct BfdAdministrativeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BfdAdministrativeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string MATValue = "MAT"; + private const string RMAValue = "RMA"; + + /// Enabled. + public static BfdAdministrativeState Enabled { get; } = new BfdAdministrativeState(EnabledValue); + /// Disabled. + public static BfdAdministrativeState Disabled { get; } = new BfdAdministrativeState(DisabledValue); + /// MAT. + public static BfdAdministrativeState MAT { get; } = new BfdAdministrativeState(MATValue); + /// RMA. + public static BfdAdministrativeState RMA { get; } = new BfdAdministrativeState(RMAValue); + /// Determines if two values are the same. + public static bool operator ==(BfdAdministrativeState left, BfdAdministrativeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BfdAdministrativeState left, BfdAdministrativeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BfdAdministrativeState(string value) => new BfdAdministrativeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BfdAdministrativeState other && Equals(other); + /// + public bool Equals(BfdAdministrativeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.Serialization.cs index 320843c64d7c7..3d3a7854e1b8d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.Serialization.cs @@ -15,6 +15,16 @@ public partial class BfdConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(IntervalInMilliSeconds)) + { + writer.WritePropertyName("intervalInMilliSeconds"u8); + writer.WriteNumberValue(IntervalInMilliSeconds.Value); + } + if (Optional.IsDefined(Multiplier)) + { + writer.WritePropertyName("multiplier"u8); + writer.WriteNumberValue(Multiplier.Value); + } writer.WriteEndObject(); } @@ -24,8 +34,8 @@ internal static BfdConfiguration DeserializeBfdConfiguration(JsonElement element { return null; } - Optional administrativeState = default; - Optional interval = default; + Optional administrativeState = default; + Optional intervalInMilliSeconds = default; Optional multiplier = default; foreach (var property in element.EnumerateObject()) { @@ -35,16 +45,16 @@ internal static BfdConfiguration DeserializeBfdConfiguration(JsonElement element { continue; } - administrativeState = new EnabledDisabledState(property.Value.GetString()); + administrativeState = new BfdAdministrativeState(property.Value.GetString()); continue; } - if (property.NameEquals("interval"u8)) + if (property.NameEquals("intervalInMilliSeconds"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - interval = property.Value.GetInt32(); + intervalInMilliSeconds = property.Value.GetInt32(); continue; } if (property.NameEquals("multiplier"u8)) @@ -57,7 +67,7 @@ internal static BfdConfiguration DeserializeBfdConfiguration(JsonElement element continue; } } - return new BfdConfiguration(Optional.ToNullable(administrativeState), Optional.ToNullable(interval), Optional.ToNullable(multiplier)); + return new BfdConfiguration(Optional.ToNullable(administrativeState), Optional.ToNullable(intervalInMilliSeconds), Optional.ToNullable(multiplier)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.cs index 245d988b5a611..7682e59784112 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdConfiguration.cs @@ -17,20 +17,20 @@ public BfdConfiguration() /// Initializes a new instance of BfdConfiguration. /// Administrative state of the BfdConfiguration. Example: Enabled | Disabled. - /// interval in milliseconds. Example: 300. - /// Multiplier for the Bfd Configuration. Example: 3. - internal BfdConfiguration(EnabledDisabledState? administrativeState, int? interval, int? multiplier) + /// Interval in milliseconds. Example: 300. + /// Multiplier for the Bfd Configuration. Example: 5. + internal BfdConfiguration(BfdAdministrativeState? administrativeState, int? intervalInMilliSeconds, int? multiplier) { AdministrativeState = administrativeState; - Interval = interval; + IntervalInMilliSeconds = intervalInMilliSeconds; Multiplier = multiplier; } /// Administrative state of the BfdConfiguration. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// interval in milliseconds. Example: 300. - public int? Interval { get; } - /// Multiplier for the Bfd Configuration. Example: 3. - public int? Multiplier { get; } + public BfdAdministrativeState? AdministrativeState { get; } + /// Interval in milliseconds. Example: 300. + public int? IntervalInMilliSeconds { get; set; } + /// Multiplier for the Bfd Configuration. Example: 5. + public int? Multiplier { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.Serialization.cs index cb7c60c77c356..30a888c0b563e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.Serialization.cs @@ -36,8 +36,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("allowASOverride"u8); writer.WriteStringValue(AllowASOverride.Value.ToString()); } - writer.WritePropertyName("peerASN"u8); - writer.WriteNumberValue(PeerASN); + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } if (Optional.IsCollectionDefined(IPv4ListenRangePrefixes)) { writer.WritePropertyName("ipv4ListenRangePrefixes"u8); @@ -96,8 +99,8 @@ internal static BgpConfiguration DeserializeBgpConfiguration(JsonElement element Optional defaultRouteOriginate = default; Optional allowAS = default; Optional allowASOverride = default; - Optional fabricASN = default; - int peerASN = default; + Optional fabricASN = default; + Optional peerASN = default; Optional> ipv4ListenRangePrefixes = default; Optional> ipv6ListenRangePrefixes = default; Optional> ipv4NeighborAddress = default; @@ -147,12 +150,16 @@ internal static BgpConfiguration DeserializeBgpConfiguration(JsonElement element { continue; } - fabricASN = property.Value.GetInt32(); + fabricASN = property.Value.GetInt64(); continue; } if (property.NameEquals("peerASN"u8)) { - peerASN = property.Value.GetInt32(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerASN = property.Value.GetInt64(); continue; } if (property.NameEquals("ipv4ListenRangePrefixes"u8)) @@ -217,7 +224,7 @@ internal static BgpConfiguration DeserializeBgpConfiguration(JsonElement element continue; } } - return new BgpConfiguration(annotation.Value, bfdConfiguration.Value, Optional.ToNullable(defaultRouteOriginate), Optional.ToNullable(allowAS), Optional.ToNullable(allowASOverride), Optional.ToNullable(fabricASN), peerASN, Optional.ToList(ipv4ListenRangePrefixes), Optional.ToList(ipv6ListenRangePrefixes), Optional.ToList(ipv4NeighborAddress), Optional.ToList(ipv6NeighborAddress)); + return new BgpConfiguration(annotation.Value, bfdConfiguration.Value, Optional.ToNullable(defaultRouteOriginate), Optional.ToNullable(allowAS), Optional.ToNullable(allowASOverride), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), Optional.ToList(ipv4ListenRangePrefixes), Optional.ToList(ipv6ListenRangePrefixes), Optional.ToList(ipv4NeighborAddress), Optional.ToList(ipv6NeighborAddress)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs index f2d82d42d6d7b..d9d66e5e4159f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs @@ -14,10 +14,8 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models public partial class BgpConfiguration : AnnotationResource { /// Initializes a new instance of BgpConfiguration. - /// Peer ASN. Example: 65047. - public BgpConfiguration(int peerASN) + public BgpConfiguration() { - PeerASN = peerASN; IPv4ListenRangePrefixes = new ChangeTrackingList(); IPv6ListenRangePrefixes = new ChangeTrackingList(); IPv4NeighborAddress = new ChangeTrackingList(); @@ -32,11 +30,11 @@ public BgpConfiguration(int peerASN) /// Enable Or Disable state. /// ASN of Network Fabric. Example: 65048. /// Peer ASN. Example: 65047. - /// BGP Ipv4 ListenRange. - /// BGP Ipv6 ListenRange. - /// List with stringified ipv4NeighborAddresses. + /// List of BGP IPv4 Listen Range prefixes. + /// List of BGP IPv6 Listen Ranges prefixes. + /// List with stringified IPv4 Neighbor Addresses. /// List with stringified IPv6 Neighbor Address. - internal BgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, BooleanEnumProperty? defaultRouteOriginate, int? allowAS, AllowASOverride? allowASOverride, int? fabricASN, int peerASN, IList ipv4ListenRangePrefixes, IList ipv6ListenRangePrefixes, IList ipv4NeighborAddress, IList ipv6NeighborAddress) : base(annotation) + internal BgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, BooleanEnumProperty? defaultRouteOriginate, int? allowAS, AllowASOverride? allowASOverride, long? fabricASN, long? peerASN, IList ipv4ListenRangePrefixes, IList ipv6ListenRangePrefixes, IList ipv4NeighborAddress, IList ipv6NeighborAddress) : base(annotation) { BfdConfiguration = bfdConfiguration; DefaultRouteOriginate = defaultRouteOriginate; @@ -59,14 +57,14 @@ internal BgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, /// Enable Or Disable state. public AllowASOverride? AllowASOverride { get; set; } /// ASN of Network Fabric. Example: 65048. - public int? FabricASN { get; } + public long? FabricASN { get; } /// Peer ASN. Example: 65047. - public int PeerASN { get; set; } - /// BGP Ipv4 ListenRange. + public long? PeerASN { get; set; } + /// List of BGP IPv4 Listen Range prefixes. public IList IPv4ListenRangePrefixes { get; } - /// BGP Ipv6 ListenRange. + /// List of BGP IPv6 Listen Ranges prefixes. public IList IPv6ListenRangePrefixes { get; } - /// List with stringified ipv4NeighborAddresses. + /// List with stringified IPv4 Neighbor Addresses. public IList IPv4NeighborAddress { get; } /// List with stringified IPv6 Neighbor Address. public IList IPv6NeighborAddress { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.Serialization.cs new file mode 100644 index 0000000000000..bac19885dfdc0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class CommonDynamicMatchConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(IPGroups)) + { + writer.WritePropertyName("ipGroups"u8); + writer.WriteStartArray(); + foreach (var item in IPGroups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(VlanGroups)) + { + writer.WritePropertyName("vlanGroups"u8); + writer.WriteStartArray(); + foreach (var item in VlanGroups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PortGroups)) + { + writer.WritePropertyName("portGroups"u8); + writer.WriteStartArray(); + foreach (var item in PortGroups) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static CommonDynamicMatchConfiguration DeserializeCommonDynamicMatchConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> ipGroups = default; + Optional> vlanGroups = default; + Optional> portGroups = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(IPGroupProperties.DeserializeIPGroupProperties(item)); + } + ipGroups = array; + continue; + } + if (property.NameEquals("vlanGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VlanGroupProperties.DeserializeVlanGroupProperties(item)); + } + vlanGroups = array; + continue; + } + if (property.NameEquals("portGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PortGroupProperties.DeserializePortGroupProperties(item)); + } + portGroups = array; + continue; + } + } + return new CommonDynamicMatchConfiguration(Optional.ToList(ipGroups), Optional.ToList(vlanGroups), Optional.ToList(portGroups)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.cs new file mode 100644 index 0000000000000..d2319c2263b99 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Dynamic match configuration object. + public partial class CommonDynamicMatchConfiguration + { + /// Initializes a new instance of CommonDynamicMatchConfiguration. + public CommonDynamicMatchConfiguration() + { + IPGroups = new ChangeTrackingList(); + VlanGroups = new ChangeTrackingList(); + PortGroups = new ChangeTrackingList(); + } + + /// Initializes a new instance of CommonDynamicMatchConfiguration. + /// List of IP Groups. + /// List of vlan groups. + /// List of the port groups. + internal CommonDynamicMatchConfiguration(IList ipGroups, IList vlanGroups, IList portGroups) + { + IPGroups = ipGroups; + VlanGroups = vlanGroups; + PortGroups = portGroups; + } + + /// List of IP Groups. + public IList IPGroups { get; } + /// List of vlan groups. + public IList VlanGroups { get; } + /// List of the port groups. + public IList PortGroups { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.Serialization.cs new file mode 100644 index 0000000000000..3f0f9cb85a855 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class CommonMatchConditions : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ProtocolTypes)) + { + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(VlanMatchCondition)) + { + writer.WritePropertyName("vlanMatchCondition"u8); + writer.WriteObjectValue(VlanMatchCondition); + } + if (Optional.IsDefined(IPCondition)) + { + writer.WritePropertyName("ipCondition"u8); + writer.WriteObjectValue(IPCondition); + } + writer.WriteEndObject(); + } + + internal static CommonMatchConditions DeserializeCommonMatchConditions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> protocolTypes = default; + Optional vlanMatchCondition = default; + Optional ipCondition = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protocolTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("vlanMatchCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanMatchCondition = VlanMatchCondition.DeserializeVlanMatchCondition(property.Value); + continue; + } + if (property.NameEquals("ipCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipCondition = IPMatchCondition.DeserializeIPMatchCondition(property.Value); + continue; + } + } + return new CommonMatchConditions(Optional.ToList(protocolTypes), vlanMatchCondition.Value, ipCondition.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.cs new file mode 100644 index 0000000000000..48566e3cb9cce --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the common match conditions of the ACL and Network Tap Rule. + public partial class CommonMatchConditions + { + /// Initializes a new instance of CommonMatchConditions. + public CommonMatchConditions() + { + ProtocolTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of CommonMatchConditions. + /// List of the protocols that need to be matched. + /// Vlan match condition that needs to be matched. + /// IP condition that needs to be matched. + internal CommonMatchConditions(IList protocolTypes, VlanMatchCondition vlanMatchCondition, IPMatchCondition ipCondition) + { + ProtocolTypes = protocolTypes; + VlanMatchCondition = vlanMatchCondition; + IPCondition = ipCondition; + } + + /// List of the protocols that need to be matched. + public IList ProtocolTypes { get; } + /// Vlan match condition that needs to be matched. + public VlanMatchCondition VlanMatchCondition { get; set; } + /// IP condition that needs to be matched. + public IPMatchCondition IPCondition { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.Serialization.cs new file mode 100644 index 0000000000000..86d39e8573358 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class CommonPostActionResponseForDeviceUpdate + { + internal static CommonPostActionResponseForDeviceUpdate DeserializeCommonPostActionResponseForDeviceUpdate(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional configurationState = default; + Optional> successfulDevices = default; + Optional> failedDevices = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("successfulDevices"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + successfulDevices = array; + continue; + } + if (property.NameEquals("failedDevices"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + failedDevices = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new CommonPostActionResponseForDeviceUpdate(error.Value, Optional.ToNullable(configurationState), Optional.ToList(successfulDevices), Optional.ToList(failedDevices)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.cs new file mode 100644 index 0000000000000..ffa214e379da2 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForDeviceUpdate.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Common response for device updates. + public partial class CommonPostActionResponseForDeviceUpdate : ErrorResponse + { + /// Initializes a new instance of CommonPostActionResponseForDeviceUpdate. + internal CommonPostActionResponseForDeviceUpdate() + { + SuccessfulDevices = new ChangeTrackingList(); + FailedDevices = new ChangeTrackingList(); + } + + /// Initializes a new instance of CommonPostActionResponseForDeviceUpdate. + /// The error object. + /// Gets the configuration state. + /// List of ARM Resource IDs for which the given action applied successfully. + /// List of ARM Resource IDs for which the given action failed to apply. + internal CommonPostActionResponseForDeviceUpdate(ResponseError error, ConfigurationState? configurationState, IReadOnlyList successfulDevices, IReadOnlyList failedDevices) : base(error) + { + ConfigurationState = configurationState; + SuccessfulDevices = successfulDevices; + FailedDevices = failedDevices; + } + + /// Gets the configuration state. + public ConfigurationState? ConfigurationState { get; } + /// List of ARM Resource IDs for which the given action applied successfully. + public IReadOnlyList SuccessfulDevices { get; } + /// List of ARM Resource IDs for which the given action failed to apply. + public IReadOnlyList FailedDevices { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.Serialization.cs similarity index 54% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.Serialization.cs index 5c15537cdaf4a..b8ba1361c48f2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.Serialization.cs @@ -6,48 +6,43 @@ #nullable disable using System.Text.Json; +using Azure; using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class FabricBfdConfiguration : IUtf8JsonSerializable + public partial class CommonPostActionResponseForStateUpdate { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static FabricBfdConfiguration DeserializeFabricBfdConfiguration(JsonElement element) + internal static CommonPostActionResponseForStateUpdate DeserializeCommonPostActionResponseForStateUpdate(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional interval = default; - Optional multiplier = default; + Optional configurationState = default; + Optional error = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("interval"u8)) + if (property.NameEquals("configurationState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - interval = property.Value.GetInt32(); + configurationState = new ConfigurationState(property.Value.GetString()); continue; } - if (property.NameEquals("multiplier"u8)) + if (property.NameEquals("error"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - multiplier = property.Value.GetInt32(); + error = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } } - return new FabricBfdConfiguration(Optional.ToNullable(interval), Optional.ToNullable(multiplier)); + return new CommonPostActionResponseForStateUpdate(error.Value, Optional.ToNullable(configurationState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.cs new file mode 100644 index 0000000000000..4d5df46e7f792 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonPostActionResponseForStateUpdate.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Common response for the state updates. + public partial class CommonPostActionResponseForStateUpdate : ErrorResponse + { + /// Initializes a new instance of CommonPostActionResponseForStateUpdate. + internal CommonPostActionResponseForStateUpdate() + { + } + + /// Initializes a new instance of CommonPostActionResponseForStateUpdate. + /// The error object. + /// Gets the configuration state. + internal CommonPostActionResponseForStateUpdate(ResponseError error, ConfigurationState? configurationState) : base(error) + { + ConfigurationState = configurationState; + } + + /// Gets the configuration state. + public ConfigurationState? ConfigurationState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs index 7ed68ce4b1bd6..d68c3cd4719c6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs @@ -25,6 +25,7 @@ public Condition(string value) private const string EqualToValue = "EqualTo"; private const string GreaterThanOrEqualToValue = "GreaterThanOrEqualTo"; private const string LesserThanOrEqualToValue = "LesserThanOrEqualTo"; + private const string RangeValue = "Range"; /// EqualTo. public static Condition EqualTo { get; } = new Condition(EqualToValue); @@ -32,6 +33,8 @@ public Condition(string value) public static Condition GreaterThanOrEqualTo { get; } = new Condition(GreaterThanOrEqualToValue); /// LesserThanOrEqualTo. public static Condition LesserThanOrEqualTo { get; } = new Condition(LesserThanOrEqualToValue); + /// Range. + public static Condition Range { get; } = new Condition(RangeValue); /// Determines if two values are the same. public static bool operator ==(Condition left, Condition right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConditionActionType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConditionActionType.cs deleted file mode 100644 index 5d002335f98d2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConditionActionType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// action. Example: allow | deny. - public readonly partial struct ConditionActionType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ConditionActionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllowValue = "allow"; - private const string DenyValue = "deny"; - - /// allow. - public static ConditionActionType Allow { get; } = new ConditionActionType(AllowValue); - /// deny. - public static ConditionActionType Deny { get; } = new ConditionActionType(DenyValue); - /// Determines if two values are the same. - public static bool operator ==(ConditionActionType left, ConditionActionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ConditionActionType left, ConditionActionType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ConditionActionType(string value) => new ConditionActionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConditionActionType other && Equals(other); - /// - public bool Equals(ConditionActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationState.cs new file mode 100644 index 0000000000000..56058a8a28ab7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationState.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Configuration state for the resource. + public readonly partial struct ConfigurationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string RejectedValue = "Rejected"; + private const string AcceptedValue = "Accepted"; + private const string ProvisionedValue = "Provisioned"; + private const string ErrorProvisioningValue = "ErrorProvisioning"; + private const string DeprovisioningValue = "Deprovisioning"; + private const string DeprovisionedValue = "Deprovisioned"; + private const string ErrorDeprovisioningValue = "ErrorDeprovisioning"; + private const string DeferredControlValue = "DeferredControl"; + + /// Succeeded. + public static ConfigurationState Succeeded { get; } = new ConfigurationState(SucceededValue); + /// Failed. + public static ConfigurationState Failed { get; } = new ConfigurationState(FailedValue); + /// Rejected. + public static ConfigurationState Rejected { get; } = new ConfigurationState(RejectedValue); + /// Accepted. + public static ConfigurationState Accepted { get; } = new ConfigurationState(AcceptedValue); + /// Provisioned. + public static ConfigurationState Provisioned { get; } = new ConfigurationState(ProvisionedValue); + /// ErrorProvisioning. + public static ConfigurationState ErrorProvisioning { get; } = new ConfigurationState(ErrorProvisioningValue); + /// Deprovisioning. + public static ConfigurationState Deprovisioning { get; } = new ConfigurationState(DeprovisioningValue); + /// Deprovisioned. + public static ConfigurationState Deprovisioned { get; } = new ConfigurationState(DeprovisionedValue); + /// ErrorDeprovisioning. + public static ConfigurationState ErrorDeprovisioning { get; } = new ConfigurationState(ErrorDeprovisioningValue); + /// DeferredControl. + public static ConfigurationState DeferredControl { get; } = new ConfigurationState(DeferredControlValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationState left, ConfigurationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationState left, ConfigurationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ConfigurationState(string value) => new ConfigurationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationState other && Equals(other); + /// + public bool Equals(ConfigurationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationType.cs new file mode 100644 index 0000000000000..fdc17babef620 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Input method to configure Access Control List. + public readonly partial struct ConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FileValue = "File"; + private const string InlineValue = "Inline"; + + /// File. + public static ConfigurationType File { get; } = new ConfigurationType(FileValue); + /// Inline. + public static ConfigurationType Inline { get; } = new ConfigurationType(InlineValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationType left, ConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationType left, ConfigurationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ConfigurationType(string value) => new ConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationType other && Equals(other); + /// + public bool Equals(ConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.Serialization.cs index 86ea674cf5081..f3527ff1699ac 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.Serialization.cs @@ -15,11 +15,8 @@ public partial class ConnectedSubnet : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Prefix)) - { - writer.WritePropertyName("prefix"u8); - writer.WriteStringValue(Prefix); - } + writer.WritePropertyName("prefix"u8); + writer.WriteStringValue(Prefix); if (Optional.IsDefined(Annotation)) { writer.WritePropertyName("annotation"u8); @@ -34,7 +31,7 @@ internal static ConnectedSubnet DeserializeConnectedSubnet(JsonElement element) { return null; } - Optional prefix = default; + string prefix = default; Optional annotation = default; foreach (var property in element.EnumerateObject()) { @@ -49,7 +46,7 @@ internal static ConnectedSubnet DeserializeConnectedSubnet(JsonElement element) continue; } } - return new ConnectedSubnet(annotation.Value, prefix.Value); + return new ConnectedSubnet(annotation.Value, prefix); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.cs index 6ef72f1da60ae..3ae4bcfae1c94 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnet.cs @@ -5,25 +5,33 @@ #nullable disable +using System; +using Azure.Core; + namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Connected Subnet properties. public partial class ConnectedSubnet : AnnotationResource { /// Initializes a new instance of ConnectedSubnet. - public ConnectedSubnet() + /// Prefix of the Connected Subnet. + /// is null. + public ConnectedSubnet(string prefix) { + Argument.AssertNotNull(prefix, nameof(prefix)); + + Prefix = prefix; } /// Initializes a new instance of ConnectedSubnet. /// Switch configuration description. - /// Prefix of the connected Subnet. + /// Prefix of the Connected Subnet. internal ConnectedSubnet(string annotation, string prefix) : base(annotation) { Prefix = prefix; } - /// Prefix of the connected Subnet. + /// Prefix of the Connected Subnet. public string Prefix { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.Serialization.cs similarity index 55% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.Serialization.cs index 8e6efb5f07988..032a893631954 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy : IUtf8JsonSerializable + public partial class ConnectedSubnetRoutePolicy : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -20,35 +20,44 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("exportRoutePolicyId"u8); writer.WriteStringValue(ExportRoutePolicyId); } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } writer.WriteEndObject(); } - internal static L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy DeserializeL3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(JsonElement element) + internal static ConnectedSubnetRoutePolicy DeserializeConnectedSubnetRoutePolicy(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional exportRoutePolicyId = default; - Optional administrativeState = default; + Optional exportRoutePolicyId = default; + Optional exportRoutePolicy = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("exportRoutePolicyId"u8)) { - exportRoutePolicyId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportRoutePolicyId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("administrativeState"u8)) + if (property.NameEquals("exportRoutePolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property.Value.GetString()); + exportRoutePolicy = L3ExportRoutePolicy.DeserializeL3ExportRoutePolicy(property.Value); continue; } } - return new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(exportRoutePolicyId.Value, Optional.ToNullable(administrativeState)); + return new ConnectedSubnetRoutePolicy(exportRoutePolicyId.Value, exportRoutePolicy.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.cs new file mode 100644 index 0000000000000..b5789594a6d75 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Connected Subnet Route Policy properties. + public partial class ConnectedSubnetRoutePolicy + { + /// Initializes a new instance of ConnectedSubnetRoutePolicy. + public ConnectedSubnetRoutePolicy() + { + } + + /// Initializes a new instance of ConnectedSubnetRoutePolicy. + /// ARM Resource ID of the Route Policy. This is used for the backward compatibility. + /// Array of ARM Resource ID of the RoutePolicies. + internal ConnectedSubnetRoutePolicy(ResourceIdentifier exportRoutePolicyId, L3ExportRoutePolicy exportRoutePolicy) + { + ExportRoutePolicyId = exportRoutePolicyId; + ExportRoutePolicy = exportRoutePolicy; + } + + /// ARM Resource ID of the Route Policy. This is used for the backward compatibility. + public ResourceIdentifier ExportRoutePolicyId { get; set; } + /// Array of ARM Resource ID of the RoutePolicies. + public L3ExportRoutePolicy ExportRoutePolicy { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.Serialization.cs similarity index 87% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.Serialization.cs index c969af9627a3d..94db36ca5806b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class WorkloadServices + public partial class ControllerServices { - internal static WorkloadServices DeserializeWorkloadServices(JsonElement element) + internal static ControllerServices DeserializeControllerServices(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -52,7 +52,7 @@ internal static WorkloadServices DeserializeWorkloadServices(JsonElement element continue; } } - return new WorkloadServices(Optional.ToList(ipv4AddressSpaces), Optional.ToList(ipv6AddressSpaces)); + return new ControllerServices(Optional.ToList(ipv4AddressSpaces), Optional.ToList(ipv6AddressSpaces)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.cs similarity index 74% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.cs index cc1f4094e948a..57353074c8d18 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ControllerServices.cs @@ -10,20 +10,20 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// InfrastructureServices IP ranges. - public partial class InfrastructureServices + /// Network Fabric Controller services. + public partial class ControllerServices { - /// Initializes a new instance of InfrastructureServices. - internal InfrastructureServices() + /// Initializes a new instance of ControllerServices. + internal ControllerServices() { IPv4AddressSpaces = new ChangeTrackingList(); IPv6AddressSpaces = new ChangeTrackingList(); } - /// Initializes a new instance of InfrastructureServices. + /// Initializes a new instance of ControllerServices. /// The IPv4 Address space is optional, if the value is not defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. /// The IPv6 is not supported right now. - internal InfrastructureServices(IReadOnlyList ipv4AddressSpaces, IReadOnlyList ipv6AddressSpaces) + internal ControllerServices(IReadOnlyList ipv4AddressSpaces, IReadOnlyList ipv6AddressSpaces) { IPv4AddressSpaces = ipv4AddressSpaces; IPv6AddressSpaces = ipv6AddressSpaces; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.Serialization.cs new file mode 100644 index 0000000000000..518ff97d374b8 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class DestinationProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DestinationType)) + { + writer.WritePropertyName("destinationType"u8); + writer.WriteStringValue(DestinationType.Value.ToString()); + } + if (Optional.IsDefined(DestinationId)) + { + writer.WritePropertyName("destinationId"u8); + writer.WriteStringValue(DestinationId); + } + if (Optional.IsDefined(IsolationDomainProperties)) + { + writer.WritePropertyName("isolationDomainProperties"u8); + writer.WriteObjectValue(IsolationDomainProperties); + } + if (Optional.IsDefined(DestinationTapRuleId)) + { + writer.WritePropertyName("destinationTapRuleId"u8); + writer.WriteStringValue(DestinationTapRuleId); + } + writer.WriteEndObject(); + } + + internal static DestinationProperties DeserializeDestinationProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional destinationType = default; + Optional destinationId = default; + Optional isolationDomainProperties = default; + Optional destinationTapRuleId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("destinationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationType = new DestinationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("destinationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isolationDomainProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationDomainProperties = IsolationDomainProperties.DeserializeIsolationDomainProperties(property.Value); + continue; + } + if (property.NameEquals("destinationTapRuleId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationTapRuleId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new DestinationProperties(name.Value, Optional.ToNullable(destinationType), destinationId.Value, isolationDomainProperties.Value, destinationTapRuleId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.cs new file mode 100644 index 0000000000000..c07ad374ee16d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationProperties.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The network tap destination properties. + public partial class DestinationProperties + { + /// Initializes a new instance of DestinationProperties. + public DestinationProperties() + { + } + + /// Initializes a new instance of DestinationProperties. + /// Destination name. + /// Type of destination. Input can be IsolationDomain or Direct. + /// The destination Id. ARM Resource ID of either NNI or Internal Networks. + /// Isolation Domain Properties. + /// ARM Resource ID of destination Tap Rule that contains match configurations. + internal DestinationProperties(string name, DestinationType? destinationType, ResourceIdentifier destinationId, IsolationDomainProperties isolationDomainProperties, ResourceIdentifier destinationTapRuleId) + { + Name = name; + DestinationType = destinationType; + DestinationId = destinationId; + IsolationDomainProperties = isolationDomainProperties; + DestinationTapRuleId = destinationTapRuleId; + } + + /// Destination name. + public string Name { get; set; } + /// Type of destination. Input can be IsolationDomain or Direct. + public DestinationType? DestinationType { get; set; } + /// The destination Id. ARM Resource ID of either NNI or Internal Networks. + public ResourceIdentifier DestinationId { get; set; } + /// Isolation Domain Properties. + public IsolationDomainProperties IsolationDomainProperties { get; set; } + /// ARM Resource ID of destination Tap Rule that contains match configurations. + public ResourceIdentifier DestinationTapRuleId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationType.cs new file mode 100644 index 0000000000000..00ea356355bca --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DestinationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of destination. Input can be IsolationDomain or Direct. + public readonly partial struct DestinationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DestinationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IsolationDomainValue = "IsolationDomain"; + private const string DirectValue = "Direct"; + + /// IsolationDomain. + public static DestinationType IsolationDomain { get; } = new DestinationType(IsolationDomainValue); + /// Direct. + public static DestinationType Direct { get; } = new DestinationType(DirectValue); + /// Determines if two values are the same. + public static bool operator ==(DestinationType left, DestinationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DestinationType left, DestinationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DestinationType(string value) => new DestinationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DestinationType other && Equals(other); + /// + public bool Equals(DestinationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceAdministrativeState.cs new file mode 100644 index 0000000000000..0d178f2907f78 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceAdministrativeState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Administrative state. + public readonly partial struct DeviceAdministrativeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeviceAdministrativeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RMAValue = "RMA"; + private const string ResyncValue = "Resync"; + private const string GracefulQuarantineValue = "GracefulQuarantine"; + private const string QuarantineValue = "Quarantine"; + + /// RMA. + public static DeviceAdministrativeState RMA { get; } = new DeviceAdministrativeState(RMAValue); + /// Resync. + public static DeviceAdministrativeState Resync { get; } = new DeviceAdministrativeState(ResyncValue); + /// GracefulQuarantine. + public static DeviceAdministrativeState GracefulQuarantine { get; } = new DeviceAdministrativeState(GracefulQuarantineValue); + /// Quarantine. + public static DeviceAdministrativeState Quarantine { get; } = new DeviceAdministrativeState(QuarantineValue); + /// Determines if two values are the same. + public static bool operator ==(DeviceAdministrativeState left, DeviceAdministrativeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeviceAdministrativeState left, DeviceAdministrativeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeviceAdministrativeState(string value) => new DeviceAdministrativeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeviceAdministrativeState other && Equals(other); + /// + public bool Equals(DeviceAdministrativeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.Serialization.cs deleted file mode 100644 index 7d30bc2ff2f2f..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class DeviceLimits : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PhysicalInterfaceCount)) - { - writer.WritePropertyName("physicalInterfaceCount"u8); - writer.WriteNumberValue(PhysicalInterfaceCount.Value); - } - if (Optional.IsDefined(MaxSubInterfaces)) - { - writer.WritePropertyName("maxSubInterfaces"u8); - writer.WriteNumberValue(MaxSubInterfaces.Value); - } - if (Optional.IsDefined(MaxTunnelInterfaces)) - { - writer.WritePropertyName("maxTunnelInterfaces"u8); - writer.WriteNumberValue(MaxTunnelInterfaces.Value); - } - if (Optional.IsDefined(MaxVirtualRouterFunctions)) - { - writer.WritePropertyName("maxVirtualRouterFunctions"u8); - writer.WriteNumberValue(MaxVirtualRouterFunctions.Value); - } - if (Optional.IsDefined(MaxBorderGatewayProtocolPeers)) - { - writer.WritePropertyName("maxBorderGatewayProtocolPeers"u8); - writer.WriteNumberValue(MaxBorderGatewayProtocolPeers.Value); - } - if (Optional.IsDefined(MaxBidirectionalForwardingDetectionPeers)) - { - writer.WritePropertyName("maxBidirectionalForwardingDetectionPeers"u8); - writer.WriteNumberValue(MaxBidirectionalForwardingDetectionPeers.Value); - } - writer.WriteEndObject(); - } - - internal static DeviceLimits DeserializeDeviceLimits(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional physicalInterfaceCount = default; - Optional maxSubInterfaces = default; - Optional maxTunnelInterfaces = default; - Optional maxVirtualRouterFunctions = default; - Optional maxBorderGatewayProtocolPeers = default; - Optional maxBidirectionalForwardingDetectionPeers = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("physicalInterfaceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - physicalInterfaceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxSubInterfaces"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxSubInterfaces = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxTunnelInterfaces"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxTunnelInterfaces = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxVirtualRouterFunctions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxVirtualRouterFunctions = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxBorderGatewayProtocolPeers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxBorderGatewayProtocolPeers = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxBidirectionalForwardingDetectionPeers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxBidirectionalForwardingDetectionPeers = property.Value.GetInt32(); - continue; - } - } - return new DeviceLimits(Optional.ToNullable(physicalInterfaceCount), Optional.ToNullable(maxSubInterfaces), Optional.ToNullable(maxTunnelInterfaces), Optional.ToNullable(maxVirtualRouterFunctions), Optional.ToNullable(maxBorderGatewayProtocolPeers), Optional.ToNullable(maxBidirectionalForwardingDetectionPeers)); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.cs deleted file mode 100644 index b0c80083704fd..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Network device limits. - public partial class DeviceLimits - { - /// Initializes a new instance of DeviceLimits. - public DeviceLimits() - { - } - - /// Initializes a new instance of DeviceLimits. - /// Maximum number of physical interfaces. - /// Maximum number of sub-interfaces. - /// Maximum number of tunnel interfaces. - /// Maximum number of virtual router functions. - /// Maximum number of Border Gateway Protocol (BGP) peers. - /// Maximum number of Bidirectional Forwarding Detection (BFD) peers. - internal DeviceLimits(int? physicalInterfaceCount, int? maxSubInterfaces, int? maxTunnelInterfaces, int? maxVirtualRouterFunctions, int? maxBorderGatewayProtocolPeers, int? maxBidirectionalForwardingDetectionPeers) - { - PhysicalInterfaceCount = physicalInterfaceCount; - MaxSubInterfaces = maxSubInterfaces; - MaxTunnelInterfaces = maxTunnelInterfaces; - MaxVirtualRouterFunctions = maxVirtualRouterFunctions; - MaxBorderGatewayProtocolPeers = maxBorderGatewayProtocolPeers; - MaxBidirectionalForwardingDetectionPeers = maxBidirectionalForwardingDetectionPeers; - } - - /// Maximum number of physical interfaces. - public int? PhysicalInterfaceCount { get; set; } - /// Maximum number of sub-interfaces. - public int? MaxSubInterfaces { get; set; } - /// Maximum number of tunnel interfaces. - public int? MaxTunnelInterfaces { get; set; } - /// Maximum number of virtual router functions. - public int? MaxVirtualRouterFunctions { get; set; } - /// Maximum number of Border Gateway Protocol (BGP) peers. - public int? MaxBorderGatewayProtocolPeers { get; set; } - /// Maximum number of Bidirectional Forwarding Detection (BFD) peers. - public int? MaxBidirectionalForwardingDetectionPeers { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableState.cs new file mode 100644 index 0000000000000..70235eccde3d7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Administrative state. + public readonly partial struct EnableDisableState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnableDisableState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + + /// Enable. + public static EnableDisableState Enable { get; } = new EnableDisableState(EnableValue); + /// Disable. + public static EnableDisableState Disable { get; } = new EnableDisableState(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(EnableDisableState left, EnableDisableState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnableDisableState left, EnableDisableState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EnableDisableState(string value) => new EnableDisableState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnableDisableState other && Equals(other); + /// + public bool Equals(EnableDisableState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnabledDisabledState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnabledDisabledState.cs deleted file mode 100644 index c476989699881..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnabledDisabledState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// EnabledDisabledState state for the resource. - public readonly partial struct EnabledDisabledState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EnabledDisabledState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static EnabledDisabledState Enabled { get; } = new EnabledDisabledState(EnabledValue); - /// Disabled. - public static EnabledDisabledState Disabled { get; } = new EnabledDisabledState(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EnabledDisabledState left, EnabledDisabledState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EnabledDisabledState left, EnabledDisabledState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EnabledDisabledState(string value) => new EnabledDisabledState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EnabledDisabledState other && Equals(other); - /// - public bool Equals(EnabledDisabledState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Encapsulation.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Encapsulation.cs new file mode 100644 index 0000000000000..99f8b27666f99 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Encapsulation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of encapsulation. + public readonly partial struct Encapsulation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Encapsulation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string GREValue = "GRE"; + + /// None. + public static Encapsulation None { get; } = new Encapsulation(NoneValue); + /// GRE. + public static Encapsulation GRE { get; } = new Encapsulation(GREValue); + /// Determines if two values are the same. + public static bool operator ==(Encapsulation left, Encapsulation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Encapsulation left, Encapsulation right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Encapsulation(string value) => new Encapsulation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Encapsulation other && Equals(other); + /// + public bool Equals(Encapsulation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EncapsulationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EncapsulationType.cs new file mode 100644 index 0000000000000..646567031e4f5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EncapsulationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Encapsulation Type that needs to be matched. + public readonly partial struct EncapsulationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EncapsulationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string GTPv1Value = "GTPv1"; + + /// None. + public static EncapsulationType None { get; } = new EncapsulationType(NoneValue); + /// GTPv1. + public static EncapsulationType GTPv1 { get; } = new EncapsulationType(GTPv1Value); + /// Determines if two values are the same. + public static bool operator ==(EncapsulationType left, EncapsulationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EncapsulationType left, EncapsulationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EncapsulationType(string value) => new EncapsulationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EncapsulationType other && Equals(other); + /// + public bool Equals(EncapsulationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.Serialization.cs similarity index 50% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.Serialization.cs index 4fc0a35e56599..f813559d3cf99 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.Serialization.cs @@ -6,28 +6,33 @@ #nullable disable using System.Text.Json; +using Azure; using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class SupportPackageProperties + public partial class ErrorResponse { - internal static SupportPackageProperties DeserializeSupportPackageProperties(JsonElement element) + internal static ErrorResponse DeserializeErrorResponse(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - string supportPackageURL = default; + Optional error = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("supportPackageURL"u8)) + if (property.NameEquals("error"u8)) { - supportPackageURL = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } } - return new SupportPackageProperties(supportPackageURL); + return new ErrorResponse(error.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.cs new file mode 100644 index 0000000000000..aa29131b77ace --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ErrorResponse.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + public partial class ErrorResponse + { + /// Initializes a new instance of ErrorResponse. + internal ErrorResponse() + { + } + + /// Initializes a new instance of ErrorResponse. + /// The error object. + internal ErrorResponse(ResponseError error) + { + Error = error; + } + + /// The error object. + public ResponseError Error { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.Serialization.cs new file mode 100644 index 0000000000000..fcda58d4d0277 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ExportRoutePolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ExportIPv4RoutePolicyId)) + { + writer.WritePropertyName("exportIpv4RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv4RoutePolicyId); + } + if (Optional.IsDefined(ExportIPv6RoutePolicyId)) + { + writer.WritePropertyName("exportIpv6RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv6RoutePolicyId); + } + writer.WriteEndObject(); + } + + internal static ExportRoutePolicy DeserializeExportRoutePolicy(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional exportIPv4RoutePolicyId = default; + Optional exportIPv6RoutePolicyId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportIpv4RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv4RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("exportIpv6RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv6RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ExportRoutePolicy(exportIPv4RoutePolicyId.Value, exportIPv6RoutePolicyId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.cs new file mode 100644 index 0000000000000..43b8d35fac0ab --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Export Route Policy either IPv4 or IPv6. + public partial class ExportRoutePolicy + { + /// Initializes a new instance of ExportRoutePolicy. + public ExportRoutePolicy() + { + } + + /// Initializes a new instance of ExportRoutePolicy. + /// ARM resource ID of RoutePolicy. + /// ARM resource ID of RoutePolicy. + internal ExportRoutePolicy(ResourceIdentifier exportIPv4RoutePolicyId, ResourceIdentifier exportIPv6RoutePolicyId) + { + ExportIPv4RoutePolicyId = exportIPv4RoutePolicyId; + ExportIPv6RoutePolicyId = exportIPv6RoutePolicyId; + } + + /// ARM resource ID of RoutePolicy. + public ResourceIdentifier ExportIPv4RoutePolicyId { get; set; } + /// ARM resource ID of RoutePolicy. + public ResourceIdentifier ExportIPv6RoutePolicyId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.Serialization.cs new file mode 100644 index 0000000000000..63754a921be6c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ExportRoutePolicyInformation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ExportIPv4RoutePolicyId)) + { + writer.WritePropertyName("exportIpv4RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv4RoutePolicyId); + } + if (Optional.IsDefined(ExportIPv6RoutePolicyId)) + { + writer.WritePropertyName("exportIpv6RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv6RoutePolicyId); + } + writer.WriteEndObject(); + } + + internal static ExportRoutePolicyInformation DeserializeExportRoutePolicyInformation(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional exportIPv4RoutePolicyId = default; + Optional exportIPv6RoutePolicyId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportIpv4RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv4RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("exportIpv6RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv6RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ExportRoutePolicyInformation(exportIPv4RoutePolicyId.Value, exportIPv6RoutePolicyId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.cs new file mode 100644 index 0000000000000..e229da261d547 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Export Route Policy Configuration. + public partial class ExportRoutePolicyInformation + { + /// Initializes a new instance of ExportRoutePolicyInformation. + public ExportRoutePolicyInformation() + { + } + + /// Initializes a new instance of ExportRoutePolicyInformation. + /// Export IPv4 Route Policy Id. + /// Export IPv6 Route Policy Id. + internal ExportRoutePolicyInformation(ResourceIdentifier exportIPv4RoutePolicyId, ResourceIdentifier exportIPv6RoutePolicyId) + { + ExportIPv4RoutePolicyId = exportIPv4RoutePolicyId; + ExportIPv6RoutePolicyId = exportIPv6RoutePolicyId; + } + + /// Export IPv4 Route Policy Id. + public ResourceIdentifier ExportIPv4RoutePolicyId { get; set; } + /// Export IPv6 Route Policy Id. + public ResourceIdentifier ExportIPv6RoutePolicyId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.Serialization.cs index bdcc6a493d009..3a664ef64c2a3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.Serialization.cs @@ -31,13 +31,13 @@ internal static ExpressRouteConnectionInformation DeserializeExpressRouteConnect { return null; } - string expressRouteCircuitId = default; + ResourceIdentifier expressRouteCircuitId = default; Optional expressRouteAuthorizationKey = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("expressRouteCircuitId"u8)) { - expressRouteCircuitId = property.Value.GetString(); + expressRouteCircuitId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("expressRouteAuthorizationKey"u8)) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.cs index 34119acfdb620..5d47c7d8ca5ca 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExpressRouteConnectionInformation.cs @@ -16,7 +16,7 @@ public partial class ExpressRouteConnectionInformation /// Initializes a new instance of ExpressRouteConnectionInformation. /// The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute. /// is null. - public ExpressRouteConnectionInformation(string expressRouteCircuitId) + public ExpressRouteConnectionInformation(ResourceIdentifier expressRouteCircuitId) { Argument.AssertNotNull(expressRouteCircuitId, nameof(expressRouteCircuitId)); @@ -26,14 +26,14 @@ public ExpressRouteConnectionInformation(string expressRouteCircuitId) /// Initializes a new instance of ExpressRouteConnectionInformation. /// The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute. /// Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. - internal ExpressRouteConnectionInformation(string expressRouteCircuitId, string expressRouteAuthorizationKey) + internal ExpressRouteConnectionInformation(ResourceIdentifier expressRouteCircuitId, string expressRouteAuthorizationKey) { ExpressRouteCircuitId = expressRouteCircuitId; ExpressRouteAuthorizationKey = expressRouteAuthorizationKey; } /// The express route circuit Azure resource ID, must be of type Microsoft.Network/expressRouteCircuits/circuitName. The ExpressRoute Circuit is a mandatory attribute. - public string ExpressRouteCircuitId { get; set; } + public ResourceIdentifier ExpressRouteCircuitId { get; set; } /// Authorization key for the circuit, must be of type Microsoft.Network/expressRouteCircuits/authorizations. The Auth Key is a mandatory attribute. public string ExpressRouteAuthorizationKey { get; set; } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Extension.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Extension.cs new file mode 100644 index 0000000000000..ab9d842ad7423 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Extension.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Extension. Example: NoExtension | NPB. + public readonly partial struct Extension : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Extension(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoExtensionValue = "NoExtension"; + private const string NPBValue = "NPB"; + + /// NoExtension. + public static Extension NoExtension { get; } = new Extension(NoExtensionValue); + /// NPB. + public static Extension NPB { get; } = new Extension(NPBValue); + /// Determines if two values are the same. + public static bool operator ==(Extension left, Extension right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Extension left, Extension right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Extension(string value) => new Extension(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Extension other && Equals(other); + /// + public bool Equals(Extension other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs index b645c10e0b23d..4e84b0f409e1b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -25,6 +24,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } + if (Optional.IsDefined(ImportRoutePolicyId)) + { + writer.WritePropertyName("importRoutePolicyId"u8); + writer.WriteStringValue(ImportRoutePolicyId); + } + if (Optional.IsDefined(ExportRoutePolicyId)) + { + writer.WritePropertyName("exportRoutePolicyId"u8); + writer.WriteStringValue(ExportRoutePolicyId); + } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } writer.WritePropertyName("peeringOption"u8); writer.WriteStringValue(PeeringOption.ToString()); if (Optional.IsDefined(OptionBProperties)) @@ -37,16 +56,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("optionAProperties"u8); writer.WriteObjectValue(OptionAProperties); } - if (Optional.IsDefined(ImportRoutePolicyId)) - { - writer.WritePropertyName("importRoutePolicyId"u8); - writer.WriteStringValue(ImportRoutePolicyId); - } - if (Optional.IsDefined(ExportRoutePolicyId)) - { - writer.WritePropertyName("exportRoutePolicyId"u8); - writer.WriteStringValue(ExportRoutePolicyId); - } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -62,15 +71,17 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e ResourceType type = default; Optional systemData = default; Optional annotation = default; + Optional importRoutePolicyId = default; + Optional exportRoutePolicyId = default; + Optional importRoutePolicy = default; + Optional exportRoutePolicy = default; Optional networkToNetworkInterconnectId = default; - Optional> disabledOnResources = default; - Optional administrativeState = default; - Optional provisioningState = default; PeeringOption peeringOption = default; - Optional optionBProperties = default; + Optional optionBProperties = default; Optional optionAProperties = default; - Optional importRoutePolicyId = default; - Optional exportRoutePolicyId = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -111,41 +122,45 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("networkToNetworkInterconnectId"u8)) + if (property0.NameEquals("importRoutePolicyId"u8)) { - networkToNetworkInterconnectId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importRoutePolicyId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("disabledOnResources"u8)) + if (property0.NameEquals("exportRoutePolicyId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - disabledOnResources = array; + exportRoutePolicyId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("importRoutePolicy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + importRoutePolicy = ImportRoutePolicy.DeserializeImportRoutePolicy(property0.Value); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("exportRoutePolicy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + exportRoutePolicy = ExportRoutePolicy.DeserializeExportRoutePolicy(property0.Value); + continue; + } + if (property0.NameEquals("networkToNetworkInterconnectId"u8)) + { + networkToNetworkInterconnectId = property0.Value.GetString(); continue; } if (property0.NameEquals("peeringOption"u8)) @@ -159,7 +174,7 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e { continue; } - optionBProperties = OptionBProperties.DeserializeOptionBProperties(property0.Value); + optionBProperties = L3OptionBProperties.DeserializeL3OptionBProperties(property0.Value); continue; } if (property0.NameEquals("optionAProperties"u8)) @@ -171,21 +186,38 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e optionAProperties = ExternalNetworkPropertiesOptionAProperties.DeserializeExternalNetworkPropertiesOptionAProperties(property0.Value); continue; } - if (property0.NameEquals("importRoutePolicyId"u8)) + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) { - importRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("exportRoutePolicyId"u8)) + if (property0.NameEquals("administrativeState"u8)) { - exportRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new ExternalNetworkData(id, name, type, systemData.Value, annotation.Value, networkToNetworkInterconnectId.Value, Optional.ToList(disabledOnResources), Optional.ToNullable(administrativeState), Optional.ToNullable(provisioningState), peeringOption, optionBProperties.Value, optionAProperties.Value, importRoutePolicyId.Value, exportRoutePolicyId.Value); + return new ExternalNetworkData(id, name, type, systemData.Value, annotation.Value, importRoutePolicyId.Value, exportRoutePolicyId.Value, importRoutePolicy.Value, exportRoutePolicy.Value, networkToNetworkInterconnectId.Value, peeringOption, optionBProperties.Value, optionAProperties.Value, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs index 3bed17092fc17..82c8fea7b501a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs @@ -22,6 +22,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } + if (Optional.IsDefined(ImportRoutePolicyId)) + { + writer.WritePropertyName("importRoutePolicyId"u8); + writer.WriteStringValue(ImportRoutePolicyId); + } + if (Optional.IsDefined(ExportRoutePolicyId)) + { + writer.WritePropertyName("exportRoutePolicyId"u8); + writer.WriteStringValue(ExportRoutePolicyId); + } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } if (Optional.IsDefined(PeeringOption)) { writer.WritePropertyName("peeringOption"u8); @@ -37,16 +57,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("optionAProperties"u8); writer.WriteObjectValue(OptionAProperties); } - if (Optional.IsDefined(ImportRoutePolicyId)) - { - writer.WritePropertyName("importRoutePolicyId"u8); - writer.WriteStringValue(ImportRoutePolicyId); - } - if (Optional.IsDefined(ExportRoutePolicyId)) - { - writer.WritePropertyName("exportRoutePolicyId"u8); - writer.WriteStringValue(ExportRoutePolicyId); - } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs index 43e77f4855523..72d69f0dec2e9 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs @@ -5,6 +5,8 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// The ExternalNetwork patch resource definition. @@ -17,15 +19,19 @@ public ExternalNetworkPatch() /// Switch configuration description. public string Annotation { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ImportRoutePolicyId { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ExportRoutePolicyId { get; set; } + /// Import Route Policy either IPv4 or IPv6. + public ImportRoutePolicy ImportRoutePolicy { get; set; } + /// Export Route Policy either IPv4 or IPv6. + public ExportRoutePolicy ExportRoutePolicy { get; set; } /// Peering option list. public PeeringOption? PeeringOption { get; set; } /// option B properties object. - public OptionBProperties OptionBProperties { get; set; } + public L3OptionBProperties OptionBProperties { get; set; } /// option A properties object. - public Layer3OptionAProperties OptionAProperties { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ImportRoutePolicyId { get; set; } - /// ARM resource ID of exportRoutePolicy. - public string ExportRoutePolicyId { get; set; } + public ExternalNetworkPatchPropertiesOptionAProperties OptionAProperties { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.Serialization.cs new file mode 100644 index 0000000000000..0bed801e233df --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ExternalNetworkPatchPropertiesOptionAProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mtu)) + { + writer.WritePropertyName("mtu"u8); + writer.WriteNumberValue(Mtu.Value); + } + if (Optional.IsDefined(VlanId)) + { + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId.Value); + } + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } + if (Optional.IsDefined(PrimaryIPv4Prefix)) + { + writer.WritePropertyName("primaryIpv4Prefix"u8); + writer.WriteStringValue(PrimaryIPv4Prefix); + } + if (Optional.IsDefined(PrimaryIPv6Prefix)) + { + writer.WritePropertyName("primaryIpv6Prefix"u8); + writer.WriteStringValue(PrimaryIPv6Prefix); + } + if (Optional.IsDefined(SecondaryIPv4Prefix)) + { + writer.WritePropertyName("secondaryIpv4Prefix"u8); + writer.WriteStringValue(SecondaryIPv4Prefix); + } + if (Optional.IsDefined(SecondaryIPv6Prefix)) + { + writer.WritePropertyName("secondaryIpv6Prefix"u8); + writer.WriteStringValue(SecondaryIPv6Prefix); + } + writer.WriteEndObject(); + } + + internal static ExternalNetworkPatchPropertiesOptionAProperties DeserializeExternalNetworkPatchPropertiesOptionAProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mtu = default; + Optional vlanId = default; + Optional fabricASN = default; + Optional peerASN = default; + Optional bfdConfiguration = default; + Optional ingressAclId = default; + Optional egressAclId = default; + Optional primaryIPv4Prefix = default; + Optional primaryIPv6Prefix = default; + Optional secondaryIPv4Prefix = default; + Optional secondaryIPv6Prefix = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mtu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mtu = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vlanId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("fabricASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("peerASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("bfdConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); + continue; + } + if (property.NameEquals("ingressAclId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingressAclId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("egressAclId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + egressAclId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("primaryIpv4Prefix"u8)) + { + primaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryIpv6Prefix"u8)) + { + primaryIPv6Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv4Prefix"u8)) + { + secondaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv6Prefix"u8)) + { + secondaryIPv6Prefix = property.Value.GetString(); + continue; + } + } + return new ExternalNetworkPatchPropertiesOptionAProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), bfdConfiguration.Value, ingressAclId.Value, egressAclId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.cs new file mode 100644 index 0000000000000..c6b93130ef2c5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchPropertiesOptionAProperties.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// option A properties object. + public partial class ExternalNetworkPatchPropertiesOptionAProperties : Layer3IPPrefixProperties + { + /// Initializes a new instance of ExternalNetworkPatchPropertiesOptionAProperties. + public ExternalNetworkPatchPropertiesOptionAProperties() + { + } + + /// Initializes a new instance of ExternalNetworkPatchPropertiesOptionAProperties. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + /// MTU to use for option A peering. + /// Vlan identifier. Example : 501. + /// Fabric ASN number. Example 65001. + /// Peer ASN number.Example : 28. + /// BFD configuration properties. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. + internal ExternalNetworkPatchPropertiesOptionAProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, int? mtu, int? vlanId, long? fabricASN, long? peerASN, BfdConfiguration bfdConfiguration, ResourceIdentifier ingressAclId, ResourceIdentifier egressAclId) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) + { + Mtu = mtu; + VlanId = vlanId; + FabricASN = fabricASN; + PeerASN = peerASN; + BfdConfiguration = bfdConfiguration; + IngressAclId = ingressAclId; + EgressAclId = egressAclId; + } + + /// MTU to use for option A peering. + public int? Mtu { get; set; } + /// Vlan identifier. Example : 501. + public int? VlanId { get; set; } + /// Fabric ASN number. Example 65001. + public long? FabricASN { get; } + /// Peer ASN number.Example : 28. + public long? PeerASN { get; set; } + /// BFD configuration properties. + public BfdConfiguration BfdConfiguration { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs index f9c68c5cf19e4..0b68145bafe95 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs @@ -35,6 +35,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("bfdConfiguration"u8); writer.WriteObjectValue(BfdConfiguration); } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } if (Optional.IsDefined(PrimaryIPv4Prefix)) { writer.WritePropertyName("primaryIpv4Prefix"u8); @@ -66,9 +76,11 @@ internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNe } Optional mtu = default; Optional vlanId = default; - Optional fabricASN = default; - Optional peerASN = default; + Optional fabricASN = default; + Optional peerASN = default; Optional bfdConfiguration = default; + Optional ingressAclId = default; + Optional egressAclId = default; Optional primaryIPv4Prefix = default; Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; @@ -99,7 +111,7 @@ internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNe { continue; } - fabricASN = property.Value.GetInt32(); + fabricASN = property.Value.GetInt64(); continue; } if (property.NameEquals("peerASN"u8)) @@ -108,7 +120,7 @@ internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNe { continue; } - peerASN = property.Value.GetInt32(); + peerASN = property.Value.GetInt64(); continue; } if (property.NameEquals("bfdConfiguration"u8)) @@ -120,6 +132,24 @@ internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNe bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); continue; } + if (property.NameEquals("ingressAclId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingressAclId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("egressAclId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + egressAclId = new ResourceIdentifier(property.Value.GetString()); + continue; + } if (property.NameEquals("primaryIpv4Prefix"u8)) { primaryIPv4Prefix = property.Value.GetString(); @@ -141,7 +171,7 @@ internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNe continue; } } - return new ExternalNetworkPropertiesOptionAProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), bfdConfiguration.Value); + return new ExternalNetworkPropertiesOptionAProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), bfdConfiguration.Value, ingressAclId.Value, egressAclId.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs index 130227252c1e2..66085a8cd80d3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs @@ -5,10 +5,12 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// option A properties object. - public partial class ExternalNetworkPropertiesOptionAProperties : Layer3OptionAProperties + public partial class ExternalNetworkPropertiesOptionAProperties : Layer3IPPrefixProperties { /// Initializes a new instance of ExternalNetworkPropertiesOptionAProperties. public ExternalNetworkPropertiesOptionAProperties() @@ -16,17 +18,41 @@ public ExternalNetworkPropertiesOptionAProperties() } /// Initializes a new instance of ExternalNetworkPropertiesOptionAProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. /// MTU to use for option A peering. /// Vlan identifier. Example : 501. /// Fabric ASN number. Example 65001. /// Peer ASN number.Example : 28. /// BFD configuration properties. - internal ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, int? mtu, int? vlanId, int? fabricASN, int? peerASN, BfdConfiguration bfdConfiguration) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricASN, peerASN, bfdConfiguration) + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Egress Acl. ARM resource ID of Access Control Lists. + internal ExternalNetworkPropertiesOptionAProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, int? mtu, int? vlanId, long? fabricASN, long? peerASN, BfdConfiguration bfdConfiguration, ResourceIdentifier ingressAclId, ResourceIdentifier egressAclId) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) { + Mtu = mtu; + VlanId = vlanId; + FabricASN = fabricASN; + PeerASN = peerASN; + BfdConfiguration = bfdConfiguration; + IngressAclId = ingressAclId; + EgressAclId = egressAclId; } + + /// MTU to use for option A peering. + public int? Mtu { get; set; } + /// Vlan identifier. Example : 501. + public int? VlanId { get; set; } + /// Fabric ASN number. Example 65001. + public long? FabricASN { get; } + /// Peer ASN number.Example : 28. + public long? PeerASN { get; set; } + /// BFD configuration properties. + public BfdConfiguration BfdConfiguration { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs index 1feec11a8bb87..924cfce5e9313 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of ExternalNetworks. + /// List of External Networks. internal partial class ExternalNetworksList { /// Initializes a new instance of ExternalNetworksList. @@ -21,7 +21,7 @@ internal ExternalNetworksList() } /// Initializes a new instance of ExternalNetworksList. - /// List of ExternalNetworks resources. + /// List of External Network resources. /// Url to follow for getting next page of resources. internal ExternalNetworksList(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal ExternalNetworksList(IReadOnlyList value, string n NextLink = nextLink; } - /// List of ExternalNetworks resources. + /// List of External Network resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.cs deleted file mode 100644 index b824fabd3cd62..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// BFD Configuration properties. - public partial class FabricBfdConfiguration - { - /// Initializes a new instance of FabricBfdConfiguration. - public FabricBfdConfiguration() - { - } - - /// Initializes a new instance of FabricBfdConfiguration. - /// interval in seconds. Example: 300. - /// multiplier. Example: 3. - internal FabricBfdConfiguration(int? interval, int? multiplier) - { - Interval = interval; - Multiplier = multiplier; - } - - /// interval in seconds. Example: 300. - public int? Interval { get; } - /// multiplier. Example: 3. - public int? Multiplier { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricSkuType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricSkuType.cs new file mode 100644 index 0000000000000..3e6add689eb45 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricSkuType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of Network Fabric SKU. + public readonly partial struct FabricSkuType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FabricSkuType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleRackValue = "SingleRack"; + private const string MultiRackValue = "MultiRack"; + + /// SingleRack. + public static FabricSkuType SingleRack { get; } = new FabricSkuType(SingleRackValue); + /// MultiRack. + public static FabricSkuType MultiRack { get; } = new FabricSkuType(MultiRackValue); + /// Determines if two values are the same. + public static bool operator ==(FabricSkuType left, FabricSkuType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FabricSkuType left, FabricSkuType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FabricSkuType(string value) => new FabricSkuType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FabricSkuType other && Equals(other); + /// + public bool Equals(FabricSkuType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GatewayType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GatewayType.cs new file mode 100644 index 0000000000000..9b08a3025712a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GatewayType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Gateway Type of the resource. + public readonly partial struct GatewayType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GatewayType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfrastructureValue = "Infrastructure"; + private const string WorkloadValue = "Workload"; + + /// Infrastructure. + public static GatewayType Infrastructure { get; } = new GatewayType(InfrastructureValue); + /// Workload. + public static GatewayType Workload { get; } = new GatewayType(WorkloadValue); + /// Determines if two values are the same. + public static bool operator ==(GatewayType left, GatewayType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GatewayType left, GatewayType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator GatewayType(string value) => new GatewayType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GatewayType other && Equals(other); + /// + public bool Equals(GatewayType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.Serialization.cs deleted file mode 100644 index 4d7ca52c31cbc..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class GetDeviceStatusProperties - { - internal static GetDeviceStatusProperties DeserializeGetDeviceStatusProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OperationalStatus operationalStatus = default; - PowerCycleState powerCycleState = default; - string serialNumber = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("operationalStatus"u8)) - { - operationalStatus = new OperationalStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("powerCycleState"u8)) - { - powerCycleState = new PowerCycleState(property.Value.GetString()); - continue; - } - if (property.NameEquals("serialNumber"u8)) - { - serialNumber = property.Value.GetString(); - continue; - } - } - return new GetDeviceStatusProperties(operationalStatus, powerCycleState, serialNumber); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.cs deleted file mode 100644 index 7bd2426c4662e..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Get Device status response properties. - public partial class GetDeviceStatusProperties - { - /// Initializes a new instance of GetDeviceStatusProperties. - /// Primary or Secondary power end. - /// On or Off power cycle state. - /// The serial number of the device. - /// is null. - internal GetDeviceStatusProperties(OperationalStatus operationalStatus, PowerCycleState powerCycleState, string serialNumber) - { - Argument.AssertNotNull(serialNumber, nameof(serialNumber)); - - OperationalStatus = operationalStatus; - PowerCycleState = powerCycleState; - SerialNumber = serialNumber; - } - - /// Primary or Secondary power end. - public OperationalStatus OperationalStatus { get; } - /// On or Off power cycle state. - public PowerCycleState PowerCycleState { get; } - /// The serial number of the device. - public string SerialNumber { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPAddressType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPAddressType.cs new file mode 100644 index 0000000000000..b2951279b49c6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPAddressType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// IP Address type. + public readonly partial struct IPAddressType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IPAddressType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IPv4Value = "IPv4"; + private const string IPv6Value = "IPv6"; + + /// IPv4. + public static IPAddressType IPv4 { get; } = new IPAddressType(IPv4Value); + /// IPv6. + public static IPAddressType IPv6 { get; } = new IPAddressType(IPv6Value); + /// Determines if two values are the same. + public static bool operator ==(IPAddressType left, IPAddressType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IPAddressType left, IPAddressType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IPAddressType(string value) => new IPAddressType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IPAddressType other && Equals(other); + /// + public bool Equals(IPAddressType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs index 0abb9f43f22fd..fca3db0b36349 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IPCommunities. + /// List of IP Communities. internal partial class IPCommunitiesListResult { /// Initializes a new instance of IPCommunitiesListResult. @@ -21,7 +21,7 @@ internal IPCommunitiesListResult() } /// Initializes a new instance of IPCommunitiesListResult. - /// List of IpCommunity resources. + /// List of IP Community resources. /// Url to follow for getting next page of resources. internal IPCommunitiesListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal IPCommunitiesListResult(IReadOnlyList value, string ne NextLink = nextLink; } - /// List of IpCommunity resources. + /// List of IP Community resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs index df8380f68ff5d..e1d7ec19b0fa0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs @@ -18,13 +18,13 @@ public IPCommunityAddOperationProperties() } /// Initializes a new instance of IPCommunityAddOperationProperties. - /// IP Community ID list properties. + /// List of IP Community IDs. internal IPCommunityAddOperationProperties(IPCommunityIdList @add) { Add = @add; } - /// IP Community ID list properties. + /// List of IP Community IDs. internal IPCommunityIdList Add { get; set; } /// List of IP Community resource IDs. public IList AddIPCommunityIds diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs index 978654d129603..0fbfa8ef9094b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs @@ -38,28 +38,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(Action)) + if (Optional.IsCollectionDefined(IPCommunityRules)) { - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.Value.ToString()); - } - if (Optional.IsCollectionDefined(WellKnownCommunities)) - { - writer.WritePropertyName("wellKnownCommunities"u8); + writer.WritePropertyName("ipCommunityRules"u8); writer.WriteStartArray(); - foreach (var item in WellKnownCommunities) + foreach (var item in IPCommunityRules) { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CommunityMembers)) - { - writer.WritePropertyName("communityMembers"u8); - writer.WriteStartArray(); - foreach (var item in CommunityMembers) - { - writer.WriteStringValue(item); + writer.WriteObjectValue(item); } writer.WriteEndArray(); } @@ -80,10 +65,10 @@ internal static IPCommunityData DeserializeIPCommunityData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - Optional action = default; - Optional> wellKnownCommunities = default; - Optional> communityMembers = default; + Optional> ipCommunityRules = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -143,57 +128,52 @@ internal static IPCommunityData DeserializeIPCommunityData(JsonElement element) annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("action"u8)) + if (property0.NameEquals("ipCommunityRules"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - action = new CommunityActionType(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(IPCommunityRule.DeserializeIPCommunityRule(item)); + } + ipCommunityRules = array; continue; } - if (property0.NameEquals("wellKnownCommunities"u8)) + if (property0.NameEquals("configurationState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new WellKnownCommunity(item.GetString())); - } - wellKnownCommunities = array; + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } - if (property0.NameEquals("communityMembers"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - communityMembers = array; + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("administrativeState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new IPCommunityData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(action), Optional.ToList(wellKnownCommunities), Optional.ToList(communityMembers), Optional.ToNullable(provisioningState)); + return new IPCommunityData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToList(ipCommunityRules), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs index 6dec980aaeedc..7f08e97608469 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs @@ -26,6 +26,19 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(IPCommunityRules)) + { + writer.WritePropertyName("ipCommunityRules"u8); + writer.WriteStartArray(); + foreach (var item in IPCommunityRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs index b8d9a1841bfe1..0b222f60f00d7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs @@ -10,16 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The IPCommunity patch resource definition. - public partial class IPCommunityPatch + /// The IP Community patch resource definition. + public partial class IPCommunityPatch : NetworkRackPatch { /// Initializes a new instance of IPCommunityPatch. public IPCommunityPatch() { - Tags = new ChangeTrackingDictionary(); + IPCommunityRules = new ChangeTrackingList(); } - /// Resource tags. - public IDictionary Tags { get; } + /// List of IP Community Rules. + public IList IPCommunityRules { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.Serialization.cs new file mode 100644 index 0000000000000..8d90a3718827e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class IPCommunityRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + writer.WritePropertyName("sequenceNumber"u8); + writer.WriteNumberValue(SequenceNumber); + if (Optional.IsCollectionDefined(WellKnownCommunities)) + { + writer.WritePropertyName("wellKnownCommunities"u8); + writer.WriteStartArray(); + foreach (var item in WellKnownCommunities) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("communityMembers"u8); + writer.WriteStartArray(); + foreach (var item in CommunityMembers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static IPCommunityRule DeserializeIPCommunityRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunityActionType action = default; + long sequenceNumber = default; + Optional> wellKnownCommunities = default; + IList communityMembers = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = new CommunityActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sequenceNumber"u8)) + { + sequenceNumber = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("wellKnownCommunities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new WellKnownCommunity(item.GetString())); + } + wellKnownCommunities = array; + continue; + } + if (property.NameEquals("communityMembers"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + communityMembers = array; + continue; + } + } + return new IPCommunityRule(action, sequenceNumber, Optional.ToList(wellKnownCommunities), communityMembers); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.cs new file mode 100644 index 0000000000000..2cc12710c2059 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// IP Community patchable properties. + public partial class IPCommunityRule + { + /// Initializes a new instance of IPCommunityRule. + /// Action to be taken on the configuration. Example: Permit | Deny. + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + /// List the community members of IP Community. + /// is null. + public IPCommunityRule(CommunityActionType action, long sequenceNumber, IEnumerable communityMembers) + { + Argument.AssertNotNull(communityMembers, nameof(communityMembers)); + + Action = action; + SequenceNumber = sequenceNumber; + WellKnownCommunities = new ChangeTrackingList(); + CommunityMembers = communityMembers.ToList(); + } + + /// Initializes a new instance of IPCommunityRule. + /// Action to be taken on the configuration. Example: Permit | Deny. + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + /// Supported well known Community List. + /// List the community members of IP Community. + internal IPCommunityRule(CommunityActionType action, long sequenceNumber, IList wellKnownCommunities, IList communityMembers) + { + Action = action; + SequenceNumber = sequenceNumber; + WellKnownCommunities = wellKnownCommunities; + CommunityMembers = communityMembers; + } + + /// Action to be taken on the configuration. Example: Permit | Deny. + public CommunityActionType Action { get; set; } + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + public long SequenceNumber { get; set; } + /// Supported well known Community List. + public IList WellKnownCommunities { get; } + /// List the community members of IP Community. + public IList CommunityMembers { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs index fcc33c3919f2a..a16ca8edfb91c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs @@ -18,13 +18,13 @@ public IPExtendedCommunityAddOperationProperties() } /// Initializes a new instance of IPExtendedCommunityAddOperationProperties. - /// IP Extended Community Id list properties. + /// List of IP Extended Community IDs. internal IPExtendedCommunityAddOperationProperties(IPExtendedCommunityIdList @add) { Add = @add; } - /// IP Extended Community Id list properties. + /// List of IP Extended Community IDs. internal IPExtendedCommunityIdList Add { get; set; } /// List of IP Extended Community resource IDs. public IList AddIPExtendedCommunityIds diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs index d459483823188..98f674eef0de9 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs @@ -38,21 +38,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(Action)) + writer.WritePropertyName("ipExtendedCommunityRules"u8); + writer.WriteStartArray(); + foreach (var item in IPExtendedCommunityRules) { - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.Value.ToString()); - } - if (Optional.IsCollectionDefined(RouteTargets)) - { - writer.WritePropertyName("routeTargets"u8); - writer.WriteStartArray(); - foreach (var item in RouteTargets) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item); } + writer.WriteEndArray(); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -70,9 +62,10 @@ internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonE ResourceType type = default; Optional systemData = default; Optional annotation = default; - Optional action = default; - Optional> routeTargets = default; + IList ipExtendedCommunityRules = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -132,27 +125,23 @@ internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonE annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("action"u8)) + if (property0.NameEquals("ipExtendedCommunityRules"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) { - continue; + array.Add(IPExtendedCommunityRule.DeserializeIPExtendedCommunityRule(item)); } - action = new CommunityActionType(property0.Value.GetString()); + ipExtendedCommunityRules = array; continue; } - if (property0.NameEquals("routeTargets"u8)) + if (property0.NameEquals("configurationState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - routeTargets = array; + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -164,11 +153,20 @@ internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonE provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new IPExtendedCommunityData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(action), Optional.ToList(routeTargets), Optional.ToNullable(provisioningState)); + return new IPExtendedCommunityData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, ipExtendedCommunityRules, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs index 1b98a3ed19ddc..bc2e35dd424f3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IpExtendedCommunities. + /// List of IP Extended Communities. internal partial class IPExtendedCommunityListResult { /// Initializes a new instance of IPExtendedCommunityListResult. @@ -21,7 +21,7 @@ internal IPExtendedCommunityListResult() } /// Initializes a new instance of IPExtendedCommunityListResult. - /// List of IpExtendedCommunities resources. + /// List of IP Extended Communities resources. /// Url to follow for getting next page of resources. internal IPExtendedCommunityListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal IPExtendedCommunityListResult(IReadOnlyList va NextLink = nextLink; } - /// List of IpExtendedCommunities resources. + /// List of IP Extended Communities resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs index c4eb0fb37740e..fdd8b8004718b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs @@ -26,6 +26,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(IPExtendedCommunityRules)) + { + writer.WritePropertyName("ipExtendedCommunityRules"u8); + writer.WriteStartArray(); + foreach (var item in IPExtendedCommunityRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + writer.WriteEndObject(); writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs index 9fa7f46b9291e..77aeddb2db193 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs @@ -10,16 +10,18 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The IpExtendedCommunities patch resource definition. - public partial class IPExtendedCommunityPatch + /// The IP Extended Communities patch resource definition. + public partial class IPExtendedCommunityPatch : NetworkRackPatch { /// Initializes a new instance of IPExtendedCommunityPatch. public IPExtendedCommunityPatch() { - Tags = new ChangeTrackingDictionary(); + IPExtendedCommunityRules = new ChangeTrackingList(); } - /// Resource tags. - public IDictionary Tags { get; } + /// List of IP Extended Community Rules. + public IList IPExtendedCommunityRules { get; } + /// Switch configuration description. + public string Annotation { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.Serialization.cs new file mode 100644 index 0000000000000..092cb39262cde --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class IPExtendedCommunityRule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + writer.WritePropertyName("sequenceNumber"u8); + writer.WriteNumberValue(SequenceNumber); + writer.WritePropertyName("routeTargets"u8); + writer.WriteStartArray(); + foreach (var item in RouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static IPExtendedCommunityRule DeserializeIPExtendedCommunityRule(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunityActionType action = default; + long sequenceNumber = default; + IList routeTargets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = new CommunityActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sequenceNumber"u8)) + { + sequenceNumber = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("routeTargets"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + routeTargets = array; + continue; + } + } + return new IPExtendedCommunityRule(action, sequenceNumber, routeTargets); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.cs new file mode 100644 index 0000000000000..0351776a291c7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of IP Extended Community Rules. + public partial class IPExtendedCommunityRule + { + /// Initializes a new instance of IPExtendedCommunityRule. + /// Action to be taken on the configuration. Example: Permit | Deny. + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. + /// is null. + public IPExtendedCommunityRule(CommunityActionType action, long sequenceNumber, IEnumerable routeTargets) + { + Argument.AssertNotNull(routeTargets, nameof(routeTargets)); + + Action = action; + SequenceNumber = sequenceNumber; + RouteTargets = routeTargets.ToList(); + } + + /// Initializes a new instance of IPExtendedCommunityRule. + /// Action to be taken on the configuration. Example: Permit | Deny. + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. + internal IPExtendedCommunityRule(CommunityActionType action, long sequenceNumber, IList routeTargets) + { + Action = action; + SequenceNumber = sequenceNumber; + RouteTargets = routeTargets; + } + + /// Action to be taken on the configuration. Example: Permit | Deny. + public CommunityActionType Action { get; set; } + /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. + public long SequenceNumber { get; set; } + /// Route Target List.The expected formats are ASN(plain):NN >> example 4294967294:50, ASN.ASN:NN >> example 65533.65333:40, IP-address:NN >> example 10.10.10.10:65535. The possible values of ASN,NN are in range of 0-65535, ASN(plain) is in range of 0-4294967295. + public IList RouteTargets { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.Serialization.cs new file mode 100644 index 0000000000000..d0ba7f8be1739 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class IPGroupProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(IPAddressType)) + { + writer.WritePropertyName("ipAddressType"u8); + writer.WriteStringValue(IPAddressType.Value.ToString()); + } + if (Optional.IsCollectionDefined(IPPrefixes)) + { + writer.WritePropertyName("ipPrefixes"u8); + writer.WriteStartArray(); + foreach (var item in IPPrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static IPGroupProperties DeserializeIPGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional ipAddressType = default; + Optional> ipPrefixes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddressType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAddressType = new IPAddressType(property.Value.GetString()); + continue; + } + if (property.NameEquals("ipPrefixes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipPrefixes = array; + continue; + } + } + return new IPGroupProperties(name.Value, Optional.ToNullable(ipAddressType), Optional.ToList(ipPrefixes)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.cs new file mode 100644 index 0000000000000..86f1cb3b0b635 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPGroupProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// IP Group properties. + public partial class IPGroupProperties + { + /// Initializes a new instance of IPGroupProperties. + public IPGroupProperties() + { + IPPrefixes = new ChangeTrackingList(); + } + + /// Initializes a new instance of IPGroupProperties. + /// IP Group name. + /// IP Address type. + /// List of IP Prefixes. + internal IPGroupProperties(string name, IPAddressType? ipAddressType, IList ipPrefixes) + { + Name = name; + IPAddressType = ipAddressType; + IPPrefixes = ipPrefixes; + } + + /// IP Group name. + public string Name { get; set; } + /// IP Address type. + public IPAddressType? IPAddressType { get; set; } + /// List of IP Prefixes. + public IList IPPrefixes { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.Serialization.cs new file mode 100644 index 0000000000000..b01d6d20bbed8 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class IPMatchCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SourceDestinationType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(SourceDestinationType.Value.ToString()); + } + if (Optional.IsDefined(PrefixType)) + { + writer.WritePropertyName("prefixType"u8); + writer.WriteStringValue(PrefixType.Value.ToString()); + } + if (Optional.IsCollectionDefined(IPPrefixValues)) + { + writer.WritePropertyName("ipPrefixValues"u8); + writer.WriteStartArray(); + foreach (var item in IPPrefixValues) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPGroupNames)) + { + writer.WritePropertyName("ipGroupNames"u8); + writer.WriteStartArray(); + foreach (var item in IPGroupNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static IPMatchCondition DeserializeIPMatchCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional prefixType = default; + Optional> ipPrefixValues = default; + Optional> ipGroupNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new SourceDestinationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("prefixType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prefixType = new PrefixType(property.Value.GetString()); + continue; + } + if (property.NameEquals("ipPrefixValues"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipPrefixValues = array; + continue; + } + if (property.NameEquals("ipGroupNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipGroupNames = array; + continue; + } + } + return new IPMatchCondition(Optional.ToNullable(type), Optional.ToNullable(prefixType), Optional.ToList(ipPrefixValues), Optional.ToList(ipGroupNames)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.cs new file mode 100644 index 0000000000000..023a2271b6c40 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the condition that can be filtered using the selected IPs. + public partial class IPMatchCondition + { + /// Initializes a new instance of IPMatchCondition. + public IPMatchCondition() + { + IPPrefixValues = new ChangeTrackingList(); + IPGroupNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of IPMatchCondition. + /// IP Address type that needs to be matched. + /// IP Prefix Type that needs to be matched. + /// The list of IP Prefixes that need to be matched. + /// The List of IP Group Names that need to be matched. + internal IPMatchCondition(SourceDestinationType? sourceDestinationType, PrefixType? prefixType, IList ipPrefixValues, IList ipGroupNames) + { + SourceDestinationType = sourceDestinationType; + PrefixType = prefixType; + IPPrefixValues = ipPrefixValues; + IPGroupNames = ipGroupNames; + } + + /// IP Address type that needs to be matched. + public SourceDestinationType? SourceDestinationType { get; set; } + /// IP Prefix Type that needs to be matched. + public PrefixType? PrefixType { get; set; } + /// The list of IP Prefixes that need to be matched. + public IList IPPrefixValues { get; } + /// The List of IP Group Names that need to be matched. + public IList IPGroupNames { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs index 0fe92591b753a..44cac638776a7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs @@ -38,13 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - writer.WritePropertyName("ipPrefixRules"u8); - writer.WriteStartArray(); - foreach (var item in IPPrefixRules) + if (Optional.IsCollectionDefined(IPPrefixRules)) { - writer.WriteObjectValue(item); + writer.WritePropertyName("ipPrefixRules"u8); + writer.WriteStartArray(); + foreach (var item in IPPrefixRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -62,8 +65,10 @@ internal static IPPrefixData DeserializeIPPrefixData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - IList ipPrefixRules = default; + Optional> ipPrefixRules = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -125,14 +130,27 @@ internal static IPPrefixData DeserializeIPPrefixData(JsonElement element) } if (property0.NameEquals("ipPrefixRules"u8)) { - List array = new List(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(IPPrefixPropertiesIPPrefixRulesItem.DeserializeIPPrefixPropertiesIPPrefixRulesItem(item)); + array.Add(IPPrefixRule.DeserializeIPPrefixRule(item)); } ipPrefixRules = array; continue; } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -142,11 +160,20 @@ internal static IPPrefixData DeserializeIPPrefixData(JsonElement element) provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new IPPrefixData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, ipPrefixRules, Optional.ToNullable(provisioningState)); + return new IPPrefixData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToList(ipPrefixRules), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs index 6b523d751bfa6..cf1337a09c008 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs @@ -26,6 +26,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsCollectionDefined(IPPrefixRules)) + { + writer.WritePropertyName("ipPrefixRules"u8); + writer.WriteStartArray(); + foreach (var item in IPPrefixRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs index 68894e55ca883..c92f5bf080753 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs @@ -10,16 +10,18 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The IPPrefix patch resource definition. - public partial class IPPrefixPatch + /// The IP Prefix patch resource definition. + public partial class IPPrefixPatch : NetworkRackPatch { /// Initializes a new instance of IPPrefixPatch. public IPPrefixPatch() { - Tags = new ChangeTrackingDictionary(); + IPPrefixRules = new ChangeTrackingList(); } - /// Resource tags. - public IDictionary Tags { get; } + /// Switch configuration description. + public string Annotation { get; set; } + /// The list of IP Prefix Rules. + public IList IPPrefixRules { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.Serialization.cs similarity index 78% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.Serialization.cs index 0ba153e301ec3..2f8742805ba2e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class IPPrefixPropertiesIPPrefixRulesItem : IUtf8JsonSerializable + public partial class IPPrefixRule : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -29,12 +29,12 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(SubnetMaskLength)) { writer.WritePropertyName("subnetMaskLength"u8); - writer.WriteNumberValue(SubnetMaskLength.Value); + writer.WriteStringValue(SubnetMaskLength); } writer.WriteEndObject(); } - internal static IPPrefixPropertiesIPPrefixRulesItem DeserializeIPPrefixPropertiesIPPrefixRulesItem(JsonElement element) + internal static IPPrefixRule DeserializeIPPrefixRule(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -44,7 +44,7 @@ internal static IPPrefixPropertiesIPPrefixRulesItem DeserializeIPPrefixPropertie long sequenceNumber = default; string networkPrefix = default; Optional condition = default; - Optional subnetMaskLength = default; + Optional subnetMaskLength = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("action"u8)) @@ -73,15 +73,11 @@ internal static IPPrefixPropertiesIPPrefixRulesItem DeserializeIPPrefixPropertie } if (property.NameEquals("subnetMaskLength"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetMaskLength = property.Value.GetInt32(); + subnetMaskLength = property.Value.GetString(); continue; } } - return new IPPrefixPropertiesIPPrefixRulesItem(action, sequenceNumber, networkPrefix, Optional.ToNullable(condition), Optional.ToNullable(subnetMaskLength)); + return new IPPrefixRule(action, sequenceNumber, networkPrefix, Optional.ToNullable(condition), subnetMaskLength.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.cs similarity index 76% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.cs index 405e96fc10c95..3b554d1c839b1 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPropertiesIPPrefixRulesItem.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRule.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The IPPrefixPropertiesIPPrefixRulesItem. - public partial class IPPrefixPropertiesIPPrefixRulesItem + /// IP Prefix Rule properties. + public partial class IPPrefixRule { - /// Initializes a new instance of IPPrefixPropertiesIPPrefixRulesItem. + /// Initializes a new instance of IPPrefixRule. /// Action to be taken on the configuration. Example: Permit | Deny. /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. /// Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. /// is null. - public IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType action, long sequenceNumber, string networkPrefix) + public IPPrefixRule(CommunityActionType action, long sequenceNumber, string networkPrefix) { Argument.AssertNotNull(networkPrefix, nameof(networkPrefix)); @@ -27,13 +27,13 @@ public IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType action, long sequ NetworkPrefix = networkPrefix; } - /// Initializes a new instance of IPPrefixPropertiesIPPrefixRulesItem. + /// Initializes a new instance of IPPrefixRule. /// Action to be taken on the configuration. Example: Permit | Deny. /// Sequence to insert to/delete from existing route. Prefix lists are evaluated starting with the lowest sequence number and continue down the list until a match is made. Once a match is made, the permit or deny statement is applied to that network and the rest of the list is ignored. /// Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. /// Specify prefix-list bounds. - /// SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible values for IPv4 are 1 - 32. Possible values of IPv6 are 1 - 128. - internal IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType action, long sequenceNumber, string networkPrefix, Condition? condition, int? subnetMaskLength) + /// SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. + internal IPPrefixRule(CommunityActionType action, long sequenceNumber, string networkPrefix, Condition? condition, string subnetMaskLength) { Action = action; SequenceNumber = sequenceNumber; @@ -50,7 +50,7 @@ internal IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType action, long se public string NetworkPrefix { get; set; } /// Specify prefix-list bounds. public Condition? Condition { get; set; } - /// SubnetMaskLength gives the minimum NetworkPrefix length to be matched.Possible values for IPv4 are 1 - 32. Possible values of IPv6 are 1 - 128. - public int? SubnetMaskLength { get; set; } + /// SubnetMaskLength gives the minimum NetworkPrefix length to be matched. Possible values for IPv4 are 1 - 32 . Possible values of IPv6 are 1 - 128. + public string SubnetMaskLength { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs index 84ae37331f4d7..ef0e274c648e7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IpPrefixes. + /// List of IP Prefixes. internal partial class IPPrefixesListResult { /// Initializes a new instance of IPPrefixesListResult. @@ -21,7 +21,7 @@ internal IPPrefixesListResult() } /// Initializes a new instance of IPPrefixesListResult. - /// List of IPPrefix resources. + /// List of IP Prefix resources. /// Url to follow for getting next page of resources. internal IPPrefixesListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal IPPrefixesListResult(IReadOnlyList value, string nextLink NextLink = nextLink; } - /// List of IPPrefix resources. + /// List of IP Prefix resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.Serialization.cs new file mode 100644 index 0000000000000..2c38fac98a05f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ImportRoutePolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ImportIPv4RoutePolicyId)) + { + writer.WritePropertyName("importIpv4RoutePolicyId"u8); + writer.WriteStringValue(ImportIPv4RoutePolicyId); + } + if (Optional.IsDefined(ImportIPv6RoutePolicyId)) + { + writer.WritePropertyName("importIpv6RoutePolicyId"u8); + writer.WriteStringValue(ImportIPv6RoutePolicyId); + } + writer.WriteEndObject(); + } + + internal static ImportRoutePolicy DeserializeImportRoutePolicy(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional importIPv4RoutePolicyId = default; + Optional importIPv6RoutePolicyId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("importIpv4RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importIPv4RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("importIpv6RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importIPv6RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ImportRoutePolicy(importIPv4RoutePolicyId.Value, importIPv6RoutePolicyId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.cs new file mode 100644 index 0000000000000..80593b1ee7315 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Import Route Policy either IPv4 or IPv6. + public partial class ImportRoutePolicy + { + /// Initializes a new instance of ImportRoutePolicy. + public ImportRoutePolicy() + { + } + + /// Initializes a new instance of ImportRoutePolicy. + /// ARM resource ID of RoutePolicy. + /// ARM resource ID of RoutePolicy. + internal ImportRoutePolicy(ResourceIdentifier importIPv4RoutePolicyId, ResourceIdentifier importIPv6RoutePolicyId) + { + ImportIPv4RoutePolicyId = importIPv4RoutePolicyId; + ImportIPv6RoutePolicyId = importIPv6RoutePolicyId; + } + + /// ARM resource ID of RoutePolicy. + public ResourceIdentifier ImportIPv4RoutePolicyId { get; set; } + /// ARM resource ID of RoutePolicy. + public ResourceIdentifier ImportIPv6RoutePolicyId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.Serialization.cs new file mode 100644 index 0000000000000..530f202da72f7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ImportRoutePolicyInformation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ImportIPv4RoutePolicyId)) + { + writer.WritePropertyName("importIpv4RoutePolicyId"u8); + writer.WriteStringValue(ImportIPv4RoutePolicyId); + } + if (Optional.IsDefined(ImportIPv6RoutePolicyId)) + { + writer.WritePropertyName("importIpv6RoutePolicyId"u8); + writer.WriteStringValue(ImportIPv6RoutePolicyId); + } + writer.WriteEndObject(); + } + + internal static ImportRoutePolicyInformation DeserializeImportRoutePolicyInformation(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional importIPv4RoutePolicyId = default; + Optional importIPv6RoutePolicyId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("importIpv4RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importIPv4RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("importIpv6RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importIPv6RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new ImportRoutePolicyInformation(importIPv4RoutePolicyId.Value, importIPv6RoutePolicyId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.cs new file mode 100644 index 0000000000000..fb4c5ad142980 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Import Route Policy Configuration. + public partial class ImportRoutePolicyInformation + { + /// Initializes a new instance of ImportRoutePolicyInformation. + public ImportRoutePolicyInformation() + { + } + + /// Initializes a new instance of ImportRoutePolicyInformation. + /// Import IPv4 Route Policy Id. + /// Import IPv6 Route Policy Id. + internal ImportRoutePolicyInformation(ResourceIdentifier importIPv4RoutePolicyId, ResourceIdentifier importIPv6RoutePolicyId) + { + ImportIPv4RoutePolicyId = importIPv4RoutePolicyId; + ImportIPv6RoutePolicyId = importIPv6RoutePolicyId; + } + + /// Import IPv4 Route Policy Id. + public ResourceIdentifier ImportIPv4RoutePolicyId { get; set; } + /// Import IPv6 Route Policy Id. + public ResourceIdentifier ImportIPv6RoutePolicyId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.Serialization.cs deleted file mode 100644 index 46a4b54ba2b1b..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class InfrastructureServices - { - internal static InfrastructureServices DeserializeInfrastructureServices(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> ipv4AddressSpaces = default; - Optional> ipv6AddressSpaces = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ipv4AddressSpaces"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipv4AddressSpaces = array; - continue; - } - if (property.NameEquals("ipv6AddressSpaces"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipv6AddressSpaces = array; - continue; - } - } - return new InfrastructureServices(Optional.ToList(ipv4AddressSpaces), Optional.ToList(ipv6AddressSpaces)); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.Serialization.cs deleted file mode 100644 index fa1e672780053..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class InterfaceStatus - { - internal static InterfaceStatus DeserializeInterfaceStatus(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional administrativeState = default; - Optional operationalStatus = default; - Optional phyStatus = default; - Optional transceiverStatus = default; - Optional connectedTo = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("administrativeState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - administrativeState = new EnabledDisabledState(property.Value.GetString()); - continue; - } - if (property.NameEquals("operationalStatus"u8)) - { - operationalStatus = property.Value.GetString(); - continue; - } - if (property.NameEquals("phyStatus"u8)) - { - phyStatus = property.Value.GetString(); - continue; - } - if (property.NameEquals("transceiverStatus"u8)) - { - transceiverStatus = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectedTo"u8)) - { - connectedTo = property.Value.GetString(); - continue; - } - } - return new InterfaceStatus(Optional.ToNullable(administrativeState), operationalStatus.Value, phyStatus.Value, transceiverStatus.Value, connectedTo.Value); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.cs deleted file mode 100644 index b0d820c3482d4..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Interface running status properties. - public partial class InterfaceStatus - { - /// Initializes a new instance of InterfaceStatus. - internal InterfaceStatus() - { - } - - /// Initializes a new instance of InterfaceStatus. - /// The interface administrative state. - /// The interface operational status. - /// The physical status. - /// The interface transceiver type. Example: up or down. - /// Connected to ARM resource or external interface. - internal InterfaceStatus(EnabledDisabledState? administrativeState, string operationalStatus, string phyStatus, string transceiverStatus, string connectedTo) - { - AdministrativeState = administrativeState; - OperationalStatus = operationalStatus; - PhyStatus = phyStatus; - TransceiverStatus = transceiverStatus; - ConnectedTo = connectedTo; - } - - /// The interface administrative state. - public EnabledDisabledState? AdministrativeState { get; } - /// The interface operational status. - public string OperationalStatus { get; } - /// The physical status. - public string PhyStatus { get; } - /// The interface transceiver type. Example: up or down. - public string TransceiverStatus { get; } - /// Connected to ARM resource or external interface. - public string ConnectedTo { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs index 213b74b8c36cc..78cccc89830b6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs @@ -50,16 +50,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(StaticRouteConfiguration)) - { - writer.WritePropertyName("staticRouteConfiguration"u8); - writer.WriteObjectValue(StaticRouteConfiguration); - } - if (Optional.IsDefined(BgpConfiguration)) - { - writer.WritePropertyName("bgpConfiguration"u8); - writer.WriteObjectValue(BgpConfiguration); - } if (Optional.IsDefined(ImportRoutePolicyId)) { writer.WritePropertyName("importRoutePolicyId"u8); @@ -70,8 +60,48 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("exportRoutePolicyId"u8); writer.WriteStringValue(ExportRoutePolicyId); } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } + if (Optional.IsDefined(IsMonitoringEnabled)) + { + writer.WritePropertyName("isMonitoringEnabled"u8); + writer.WriteStringValue(IsMonitoringEnabled.Value.ToString()); + } + if (Optional.IsDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStringValue(Extension.Value.ToString()); + } writer.WritePropertyName("vlanId"u8); writer.WriteNumberValue(VlanId); + if (Optional.IsDefined(BgpConfiguration)) + { + writer.WritePropertyName("bgpConfiguration"u8); + writer.WriteObjectValue(BgpConfiguration); + } + if (Optional.IsDefined(StaticRouteConfiguration)) + { + writer.WritePropertyName("staticRouteConfiguration"u8); + writer.WriteObjectValue(StaticRouteConfiguration); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -90,17 +120,20 @@ internal static InternalNetworkData DeserializeInternalNetworkData(JsonElement e Optional mtu = default; Optional> connectedIPv4Subnets = default; Optional> connectedIPv6Subnets = default; - Optional staticRouteConfiguration = default; - Optional bgpConfiguration = default; - Optional importRoutePolicyId = default; - Optional exportRoutePolicyId = default; - Optional> disabledOnResources = default; - Optional administrativeState = default; - Optional> bgpDisabledOnResources = default; - Optional> bfdDisabledOnResources = default; - Optional> bfdForStaticRoutesDisabledOnResources = default; - Optional provisioningState = default; + Optional importRoutePolicyId = default; + Optional exportRoutePolicyId = default; + Optional importRoutePolicy = default; + Optional exportRoutePolicy = default; + Optional ingressAclId = default; + Optional egressAclId = default; + Optional isMonitoringEnabled = default; + Optional extension = default; int vlanId = default; + Optional bgpConfiguration = default; + Optional staticRouteConfiguration = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -178,97 +211,108 @@ internal static InternalNetworkData DeserializeInternalNetworkData(JsonElement e connectedIPv6Subnets = array; continue; } - if (property0.NameEquals("staticRouteConfiguration"u8)) + if (property0.NameEquals("importRoutePolicyId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - staticRouteConfiguration = StaticRouteConfiguration.DeserializeStaticRouteConfiguration(property0.Value); + importRoutePolicyId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("bgpConfiguration"u8)) + if (property0.NameEquals("exportRoutePolicyId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - bgpConfiguration = BgpConfiguration.DeserializeBgpConfiguration(property0.Value); + exportRoutePolicyId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("importRoutePolicyId"u8)) + if (property0.NameEquals("importRoutePolicy"u8)) { - importRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importRoutePolicy = ImportRoutePolicy.DeserializeImportRoutePolicy(property0.Value); continue; } - if (property0.NameEquals("exportRoutePolicyId"u8)) + if (property0.NameEquals("exportRoutePolicy"u8)) { - exportRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportRoutePolicy = ExportRoutePolicy.DeserializeExportRoutePolicy(property0.Value); continue; } - if (property0.NameEquals("disabledOnResources"u8)) + if (property0.NameEquals("ingressAclId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - disabledOnResources = array; + ingressAclId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("egressAclId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + egressAclId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("bgpDisabledOnResources"u8)) + if (property0.NameEquals("isMonitoringEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - bgpDisabledOnResources = array; + isMonitoringEnabled = new IsMonitoringEnabled(property0.Value.GetString()); continue; } - if (property0.NameEquals("bfdDisabledOnResources"u8)) + if (property0.NameEquals("extension"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) + extension = new Extension(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("vlanId"u8)) + { + vlanId = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("bgpConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + continue; } - bfdDisabledOnResources = array; + bgpConfiguration = InternalNetworkPropertiesBgpConfiguration.DeserializeInternalNetworkPropertiesBgpConfiguration(property0.Value); continue; } - if (property0.NameEquals("bfdForStaticRoutesDisabledOnResources"u8)) + if (property0.NameEquals("staticRouteConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) + staticRouteConfiguration = InternalNetworkPropertiesStaticRouteConfiguration.DeserializeInternalNetworkPropertiesStaticRouteConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + continue; } - bfdForStaticRoutesDisabledOnResources = array; + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -280,16 +324,20 @@ internal static InternalNetworkData DeserializeInternalNetworkData(JsonElement e provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("vlanId"u8)) + if (property0.NameEquals("administrativeState"u8)) { - vlanId = property0.Value.GetInt32(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new InternalNetworkData(id, name, type, systemData.Value, annotation.Value, Optional.ToNullable(mtu), Optional.ToList(connectedIPv4Subnets), Optional.ToList(connectedIPv6Subnets), staticRouteConfiguration.Value, bgpConfiguration.Value, importRoutePolicyId.Value, exportRoutePolicyId.Value, Optional.ToList(disabledOnResources), Optional.ToNullable(administrativeState), Optional.ToList(bgpDisabledOnResources), Optional.ToList(bfdDisabledOnResources), Optional.ToList(bfdForStaticRoutesDisabledOnResources), Optional.ToNullable(provisioningState), vlanId); + return new InternalNetworkData(id, name, type, systemData.Value, annotation.Value, Optional.ToNullable(mtu), Optional.ToList(connectedIPv4Subnets), Optional.ToList(connectedIPv6Subnets), importRoutePolicyId.Value, exportRoutePolicyId.Value, importRoutePolicy.Value, exportRoutePolicy.Value, ingressAclId.Value, egressAclId.Value, Optional.ToNullable(isMonitoringEnabled), Optional.ToNullable(extension), vlanId, bgpConfiguration.Value, staticRouteConfiguration.Value, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs index 60df815cb8232..87f38d9c03acc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs @@ -47,16 +47,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(StaticRouteConfiguration)) - { - writer.WritePropertyName("staticRouteConfiguration"u8); - writer.WriteObjectValue(StaticRouteConfiguration); - } - if (Optional.IsDefined(BgpConfiguration)) - { - writer.WritePropertyName("bgpConfiguration"u8); - writer.WriteObjectValue(BgpConfiguration); - } if (Optional.IsDefined(ImportRoutePolicyId)) { writer.WritePropertyName("importRoutePolicyId"u8); @@ -67,6 +57,41 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("exportRoutePolicyId"u8); writer.WriteStringValue(ExportRoutePolicyId); } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } + if (Optional.IsDefined(IsMonitoringEnabled)) + { + writer.WritePropertyName("isMonitoringEnabled"u8); + writer.WriteStringValue(IsMonitoringEnabled.Value.ToString()); + } + if (Optional.IsDefined(BgpConfiguration)) + { + writer.WritePropertyName("bgpConfiguration"u8); + writer.WriteObjectValue(BgpConfiguration); + } + if (Optional.IsDefined(StaticRouteConfiguration)) + { + writer.WritePropertyName("staticRouteConfiguration"u8); + writer.WriteObjectValue(StaticRouteConfiguration); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs index 4c0d2b45039c3..88046ab34be13 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs @@ -24,17 +24,27 @@ public InternalNetworkPatch() public string Annotation { get; set; } /// Maximum transmission unit. Default value is 1500. public int? Mtu { get; set; } - /// List with object connected IPv4 Subnets. + /// List of Connected IPv4 Subnets. public IList ConnectedIPv4Subnets { get; } - /// List with object connected IPv6 Subnets. + /// List of connected IPv6 Subnets. public IList ConnectedIPv6Subnets { get; } - /// Static Route Configuration properties. - public StaticRouteConfiguration StaticRouteConfiguration { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ImportRoutePolicyId { get; set; } + /// ARM Resource ID of the RoutePolicy. This is used for the backward compatibility. + public ResourceIdentifier ExportRoutePolicyId { get; set; } + /// Import Route Policy either IPv4 or IPv6. + public ImportRoutePolicy ImportRoutePolicy { get; set; } + /// Export Route Policy either IPv4 or IPv6. + public ExportRoutePolicy ExportRoutePolicy { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } + /// To check whether monitoring of internal network is enabled or not. + public IsMonitoringEnabled? IsMonitoringEnabled { get; set; } /// BGP configuration properties. public BgpConfiguration BgpConfiguration { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ImportRoutePolicyId { get; set; } - /// ARM resource ID of importRoutePolicy. - public string ExportRoutePolicyId { get; set; } + /// Static Route Configuration properties. + public StaticRouteConfiguration StaticRouteConfiguration { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.Serialization.cs new file mode 100644 index 0000000000000..2826e4eb23051 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class InternalNetworkPropertiesBgpConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } + if (Optional.IsDefined(DefaultRouteOriginate)) + { + writer.WritePropertyName("defaultRouteOriginate"u8); + writer.WriteStringValue(DefaultRouteOriginate.Value.ToString()); + } + if (Optional.IsDefined(AllowAS)) + { + writer.WritePropertyName("allowAS"u8); + writer.WriteNumberValue(AllowAS.Value); + } + if (Optional.IsDefined(AllowASOverride)) + { + writer.WritePropertyName("allowASOverride"u8); + writer.WriteStringValue(AllowASOverride.Value.ToString()); + } + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsCollectionDefined(IPv4ListenRangePrefixes)) + { + writer.WritePropertyName("ipv4ListenRangePrefixes"u8); + writer.WriteStartArray(); + foreach (var item in IPv4ListenRangePrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv6ListenRangePrefixes)) + { + writer.WritePropertyName("ipv6ListenRangePrefixes"u8); + writer.WriteStartArray(); + foreach (var item in IPv6ListenRangePrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv4NeighborAddress)) + { + writer.WritePropertyName("ipv4NeighborAddress"u8); + writer.WriteStartArray(); + foreach (var item in IPv4NeighborAddress) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv6NeighborAddress)) + { + writer.WritePropertyName("ipv6NeighborAddress"u8); + writer.WriteStartArray(); + foreach (var item in IPv6NeighborAddress) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + writer.WriteEndObject(); + } + + internal static InternalNetworkPropertiesBgpConfiguration DeserializeInternalNetworkPropertiesBgpConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional bfdConfiguration = default; + Optional defaultRouteOriginate = default; + Optional allowAS = default; + Optional allowASOverride = default; + Optional fabricASN = default; + Optional peerASN = default; + Optional> ipv4ListenRangePrefixes = default; + Optional> ipv6ListenRangePrefixes = default; + Optional> ipv4NeighborAddress = default; + Optional> ipv6NeighborAddress = default; + Optional annotation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bfdConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); + continue; + } + if (property.NameEquals("defaultRouteOriginate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultRouteOriginate = new BooleanEnumProperty(property.Value.GetString()); + continue; + } + if (property.NameEquals("allowAS"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowAS = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowASOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowASOverride = new AllowASOverride(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("peerASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("ipv4ListenRangePrefixes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipv4ListenRangePrefixes = array; + continue; + } + if (property.NameEquals("ipv6ListenRangePrefixes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipv6ListenRangePrefixes = array; + continue; + } + if (property.NameEquals("ipv4NeighborAddress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeighborAddress.DeserializeNeighborAddress(item)); + } + ipv4NeighborAddress = array; + continue; + } + if (property.NameEquals("ipv6NeighborAddress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeighborAddress.DeserializeNeighborAddress(item)); + } + ipv6NeighborAddress = array; + continue; + } + if (property.NameEquals("annotation"u8)) + { + annotation = property.Value.GetString(); + continue; + } + } + return new InternalNetworkPropertiesBgpConfiguration(annotation.Value, bfdConfiguration.Value, Optional.ToNullable(defaultRouteOriginate), Optional.ToNullable(allowAS), Optional.ToNullable(allowASOverride), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), Optional.ToList(ipv4ListenRangePrefixes), Optional.ToList(ipv6ListenRangePrefixes), Optional.ToList(ipv4NeighborAddress), Optional.ToList(ipv6NeighborAddress)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.cs new file mode 100644 index 0000000000000..50e41bd74fb67 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesBgpConfiguration.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// BGP configuration properties. + public partial class InternalNetworkPropertiesBgpConfiguration : BgpConfiguration + { + /// Initializes a new instance of InternalNetworkPropertiesBgpConfiguration. + public InternalNetworkPropertiesBgpConfiguration() + { + } + + /// Initializes a new instance of InternalNetworkPropertiesBgpConfiguration. + /// Switch configuration description. + /// BFD configuration properties. + /// Originate a defaultRoute. Ex: "True" | "False". + /// Allows for routes to be received and processed even if the router detects its own ASN in the AS-Path. 0 is disable, Possible values are 1-10, default is 2. + /// Enable Or Disable state. + /// ASN of Network Fabric. Example: 65048. + /// Peer ASN. Example: 65047. + /// List of BGP IPv4 Listen Range prefixes. + /// List of BGP IPv6 Listen Ranges prefixes. + /// List with stringified IPv4 Neighbor Addresses. + /// List with stringified IPv6 Neighbor Address. + internal InternalNetworkPropertiesBgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, BooleanEnumProperty? defaultRouteOriginate, int? allowAS, AllowASOverride? allowASOverride, long? fabricASN, long? peerASN, IList ipv4ListenRangePrefixes, IList ipv6ListenRangePrefixes, IList ipv4NeighborAddress, IList ipv6NeighborAddress) : base(annotation, bfdConfiguration, defaultRouteOriginate, allowAS, allowASOverride, fabricASN, peerASN, ipv4ListenRangePrefixes, ipv6ListenRangePrefixes, ipv4NeighborAddress, ipv6NeighborAddress) + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.Serialization.cs new file mode 100644 index 0000000000000..d5f180c739ba2 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.Serialization.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class InternalNetworkPropertiesStaticRouteConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStringValue(Extension.Value.ToString()); + } + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } + if (Optional.IsCollectionDefined(IPv4Routes)) + { + writer.WritePropertyName("ipv4Routes"u8); + writer.WriteStartArray(); + foreach (var item in IPv4Routes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv6Routes)) + { + writer.WritePropertyName("ipv6Routes"u8); + writer.WriteStartArray(); + foreach (var item in IPv6Routes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static InternalNetworkPropertiesStaticRouteConfiguration DeserializeInternalNetworkPropertiesStaticRouteConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional extension = default; + Optional bfdConfiguration = default; + Optional> ipv4Routes = default; + Optional> ipv6Routes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("extension"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extension = new Extension(property.Value.GetString()); + continue; + } + if (property.NameEquals("bfdConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); + continue; + } + if (property.NameEquals("ipv4Routes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticRouteProperties.DeserializeStaticRouteProperties(item)); + } + ipv4Routes = array; + continue; + } + if (property.NameEquals("ipv6Routes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticRouteProperties.DeserializeStaticRouteProperties(item)); + } + ipv6Routes = array; + continue; + } + } + return new InternalNetworkPropertiesStaticRouteConfiguration(bfdConfiguration.Value, Optional.ToList(ipv4Routes), Optional.ToList(ipv6Routes), Optional.ToNullable(extension)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.cs new file mode 100644 index 0000000000000..4d0b3d532e8c3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPropertiesStaticRouteConfiguration.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Static Route Configuration properties. + public partial class InternalNetworkPropertiesStaticRouteConfiguration : StaticRouteConfiguration + { + /// Initializes a new instance of InternalNetworkPropertiesStaticRouteConfiguration. + public InternalNetworkPropertiesStaticRouteConfiguration() + { + } + + /// Initializes a new instance of InternalNetworkPropertiesStaticRouteConfiguration. + /// BFD configuration properties. + /// List of IPv4 Routes. + /// List of IPv6 Routes. + /// Extension. Example: NoExtension | NPB. + internal InternalNetworkPropertiesStaticRouteConfiguration(BfdConfiguration bfdConfiguration, IList ipv4Routes, IList ipv6Routes, Extension? extension) : base(bfdConfiguration, ipv4Routes, ipv6Routes) + { + Extension = extension; + } + + /// Extension. Example: NoExtension | NPB. + public Extension? Extension { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs index 268403c880566..95795c314f1fa 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of InternalNetworks. + /// List of Internal Networks. internal partial class InternalNetworksList { /// Initializes a new instance of InternalNetworksList. @@ -21,7 +21,7 @@ internal InternalNetworksList() } /// Initializes a new instance of InternalNetworksList. - /// List of InternalNetworks resources. + /// List of Internal Network resources. /// Url to follow for getting next page of resources. internal InternalNetworksList(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal InternalNetworksList(IReadOnlyList value, string n NextLink = nextLink; } - /// List of InternalNetworks resources. + /// List of Internal Network resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayData.Serialization.cs new file mode 100644 index 0000000000000..b617cca1ec630 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayData.Serialization.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class InternetGatewayData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(InternetGatewayRuleId)) + { + writer.WritePropertyName("internetGatewayRuleId"u8); + writer.WriteStringValue(InternetGatewayRuleId); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(TypePropertiesType.ToString()); + writer.WritePropertyName("networkFabricControllerId"u8); + writer.WriteStringValue(NetworkFabricControllerId); + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static InternetGatewayData DeserializeInternetGatewayData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional annotation = default; + Optional internetGatewayRuleId = default; + Optional ipv4Address = default; + Optional port = default; + GatewayType type0 = default; + ResourceIdentifier networkFabricControllerId = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("annotation"u8)) + { + annotation = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("internetGatewayRuleId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + internetGatewayRuleId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("ipv4Address"u8)) + { + ipv4Address = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("port"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("type"u8)) + { + type0 = new GatewayType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("networkFabricControllerId"u8)) + { + networkFabricControllerId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new InternetGatewayData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, internetGatewayRuleId.Value, ipv4Address.Value, Optional.ToNullable(port), type0, networkFabricControllerId, Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.Serialization.cs new file mode 100644 index 0000000000000..0ad48bcb0fb8a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class InternetGatewayPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(InternetGatewayRuleId)) + { + writer.WritePropertyName("internetGatewayRuleId"u8); + writer.WriteStringValue(InternetGatewayRuleId); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.cs new file mode 100644 index 0000000000000..820a4df3c4458 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayPatch.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The Internet Gateway patch resource definition. + public partial class InternetGatewayPatch : NetworkRackPatch + { + /// Initializes a new instance of InternetGatewayPatch. + public InternetGatewayPatch() + { + } + + /// ARM Resource ID of the Internet Gateway Rule. + public ResourceIdentifier InternetGatewayRuleId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleData.Serialization.cs similarity index 51% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleData.Serialization.cs index a6dec84977b1f..c46c98b871097 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleData.Serialization.cs @@ -13,62 +13,74 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class NetworkRackSkuData : IUtf8JsonSerializable + public partial class InternetGatewayRuleData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("roleName"u8); - writer.WriteStringValue(RoleName.ToString()); - if (Optional.IsDefined(MaximumServerCount)) - { - writer.WritePropertyName("maximumServerCount"u8); - writer.WriteNumberValue(MaximumServerCount.Value); - } - if (Optional.IsDefined(MaximumStorageCount)) - { - writer.WritePropertyName("maximumStorageCount"u8); - writer.WriteNumberValue(MaximumStorageCount.Value); - } - if (Optional.IsDefined(MaximumUplinks)) + if (Optional.IsCollectionDefined(Tags)) { - writer.WritePropertyName("maximumUplinks"u8); - writer.WriteNumberValue(MaximumUplinks.Value); - } - if (Optional.IsCollectionDefined(NetworkDevices)) - { - writer.WritePropertyName("networkDevices"u8); - writer.WriteStartArray(); - foreach (var item in NetworkDevices) + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) { - writer.WriteObjectValue(item); + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); } - writer.WriteEndArray(); + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); } + writer.WritePropertyName("ruleProperties"u8); + writer.WriteObjectValue(RuleProperties); writer.WriteEndObject(); writer.WriteEndObject(); } - internal static NetworkRackSkuData DeserializeNetworkRackSkuData(JsonElement element) + internal static InternetGatewayRuleData DeserializeInternetGatewayRuleData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } + Optional> tags = default; + AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - NetworkRackRoleName roleName = default; - Optional maximumServerCount = default; - Optional maximumStorageCount = default; - Optional maximumUplinks = default; - Optional> networkDevices = default; + Optional annotation = default; + RuleProperties ruleProperties = default; Optional provisioningState = default; + Optional> internetGatewayIds = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -102,66 +114,44 @@ internal static NetworkRackSkuData DeserializeNetworkRackSkuData(JsonElement ele } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("roleName"u8)) - { - roleName = new NetworkRackRoleName(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("maximumServerCount"u8)) + if (property0.NameEquals("annotation"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximumServerCount = property0.Value.GetInt32(); + annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("maximumStorageCount"u8)) + if (property0.NameEquals("ruleProperties"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximumStorageCount = property0.Value.GetInt32(); + ruleProperties = RuleProperties.DeserializeRuleProperties(property0.Value); continue; } - if (property0.NameEquals("maximumUplinks"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - maximumUplinks = property0.Value.GetInt32(); + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("networkDevices"u8)) + if (property0.NameEquals("internetGatewayIds"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(NetworkDeviceRoleProperties.DeserializeNetworkDeviceRoleProperties(item)); + array.Add(item.GetString()); } - networkDevices = array; - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property0.Value.GetString()); + internetGatewayIds = array; continue; } } continue; } } - return new NetworkRackSkuData(id, name, type, systemData.Value, roleName, Optional.ToNullable(maximumServerCount), Optional.ToNullable(maximumStorageCount), Optional.ToNullable(maximumUplinks), Optional.ToList(networkDevices), Optional.ToNullable(provisioningState)); + return new InternetGatewayRuleData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, ruleProperties, Optional.ToNullable(provisioningState), Optional.ToList(internetGatewayIds)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.Serialization.cs new file mode 100644 index 0000000000000..d32537033643a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class InternetGatewayRulePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.cs new file mode 100644 index 0000000000000..236a3006f5551 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulePatch.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The Internet Gateway Rules patch resource definition. + public partial class InternetGatewayRulePatch : NetworkRackPatch + { + /// Initializes a new instance of InternetGatewayRulePatch. + public InternetGatewayRulePatch() + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.Serialization.cs new file mode 100644 index 0000000000000..97746c984ba96 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + internal partial class InternetGatewayRulesListResult + { + internal static InternetGatewayRulesListResult DeserializeInternetGatewayRulesListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InternetGatewayRuleData.DeserializeInternetGatewayRuleData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new InternetGatewayRulesListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.cs new file mode 100644 index 0000000000000..6cc45081c8e82 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of Internet Gateway Rules. + internal partial class InternetGatewayRulesListResult + { + /// Initializes a new instance of InternetGatewayRulesListResult. + internal InternetGatewayRulesListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of InternetGatewayRulesListResult. + /// List of Internet Gateway Rule resources. + /// Url to follow for getting next page of resources. + internal InternetGatewayRulesListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of Internet Gateway Rule resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.Serialization.cs new file mode 100644 index 0000000000000..b5738b6b58a3c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + internal partial class InternetGatewaysListResult + { + internal static InternetGatewaysListResult DeserializeInternetGatewaysListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InternetGatewayData.DeserializeInternetGatewayData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new InternetGatewaysListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.cs new file mode 100644 index 0000000000000..df7988b6e9cb5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of InternetGateways. + internal partial class InternetGatewaysListResult + { + /// Initializes a new instance of InternetGatewaysListResult. + internal InternetGatewaysListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of InternetGatewaysListResult. + /// Displays list of Internet Gateway resources. + /// Url to follow for getting next page of resources. + internal InternetGatewaysListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// Displays list of Internet Gateway resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsCurrentVersion.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsCurrentVersion.cs deleted file mode 100644 index d6907a2675160..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsCurrentVersion.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// If the current version is in use. - public readonly partial struct IsCurrentVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IsCurrentVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TrueValue = "true"; - private const string FalseValue = "false"; - - /// true. - public static IsCurrentVersion True { get; } = new IsCurrentVersion(TrueValue); - /// false. - public static IsCurrentVersion False { get; } = new IsCurrentVersion(FalseValue); - /// Determines if two values are the same. - public static bool operator ==(IsCurrentVersion left, IsCurrentVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IsCurrentVersion left, IsCurrentVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IsCurrentVersion(string value) => new IsCurrentVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IsCurrentVersion other && Equals(other); - /// - public bool Equals(IsCurrentVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsManagementType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsManagementType.cs new file mode 100644 index 0000000000000..1223e07d9ef03 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsManagementType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Configuration to use NNI for Infrastructure Management. Example: True/False. + public readonly partial struct IsManagementType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IsManagementType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static IsManagementType True { get; } = new IsManagementType(TrueValue); + /// False. + public static IsManagementType False { get; } = new IsManagementType(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(IsManagementType left, IsManagementType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IsManagementType left, IsManagementType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IsManagementType(string value) => new IsManagementType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsManagementType other && Equals(other); + /// + public bool Equals(IsManagementType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsMonitoringEnabled.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsMonitoringEnabled.cs new file mode 100644 index 0000000000000..f0f526bb2855d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsMonitoringEnabled.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// To check whether monitoring of internal network is enabled or not. + public readonly partial struct IsMonitoringEnabled : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IsMonitoringEnabled(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static IsMonitoringEnabled True { get; } = new IsMonitoringEnabled(TrueValue); + /// False. + public static IsMonitoringEnabled False { get; } = new IsMonitoringEnabled(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(IsMonitoringEnabled left, IsMonitoringEnabled right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IsMonitoringEnabled left, IsMonitoringEnabled right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IsMonitoringEnabled(string value) => new IsMonitoringEnabled(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsMonitoringEnabled other && Equals(other); + /// + public bool Equals(IsMonitoringEnabled other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsTestVersion.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsTestVersion.cs deleted file mode 100644 index 1ef2e145a8f56..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsTestVersion.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// If the current version is a test version. - public readonly partial struct IsTestVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IsTestVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TrueValue = "true"; - private const string FalseValue = "false"; - - /// true. - public static IsTestVersion True { get; } = new IsTestVersion(TrueValue); - /// false. - public static IsTestVersion False { get; } = new IsTestVersion(FalseValue); - /// Determines if two values are the same. - public static bool operator ==(IsTestVersion left, IsTestVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IsTestVersion left, IsTestVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IsTestVersion(string value) => new IsTestVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IsTestVersion other && Equals(other); - /// - public bool Equals(IsTestVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsWorkloadManagementNetworkEnabled.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsWorkloadManagementNetworkEnabled.cs new file mode 100644 index 0000000000000..4ac5edba9ec37 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsWorkloadManagementNetworkEnabled.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + public readonly partial struct IsWorkloadManagementNetworkEnabled : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IsWorkloadManagementNetworkEnabled(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static IsWorkloadManagementNetworkEnabled True { get; } = new IsWorkloadManagementNetworkEnabled(TrueValue); + /// False. + public static IsWorkloadManagementNetworkEnabled False { get; } = new IsWorkloadManagementNetworkEnabled(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(IsWorkloadManagementNetworkEnabled left, IsWorkloadManagementNetworkEnabled right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IsWorkloadManagementNetworkEnabled left, IsWorkloadManagementNetworkEnabled right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IsWorkloadManagementNetworkEnabled(string value) => new IsWorkloadManagementNetworkEnabled(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsWorkloadManagementNetworkEnabled other && Equals(other); + /// + public bool Equals(IsWorkloadManagementNetworkEnabled other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.Serialization.cs new file mode 100644 index 0000000000000..010f6ab6d8b9d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.Serialization.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class IsolationDomainProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Encapsulation)) + { + writer.WritePropertyName("encapsulation"u8); + writer.WriteStringValue(Encapsulation.Value.ToString()); + } + if (Optional.IsCollectionDefined(NeighborGroupIds)) + { + writer.WritePropertyName("neighborGroupIds"u8); + writer.WriteStartArray(); + foreach (var item in NeighborGroupIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static IsolationDomainProperties DeserializeIsolationDomainProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional encapsulation = default; + Optional> neighborGroupIds = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("encapsulation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encapsulation = new Encapsulation(property.Value.GetString()); + continue; + } + if (property.NameEquals("neighborGroupIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + neighborGroupIds = array; + continue; + } + } + return new IsolationDomainProperties(Optional.ToNullable(encapsulation), Optional.ToList(neighborGroupIds)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.cs new file mode 100644 index 0000000000000..5e1e99763842c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Isolation Domain Properties. + public partial class IsolationDomainProperties + { + /// Initializes a new instance of IsolationDomainProperties. + public IsolationDomainProperties() + { + NeighborGroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of IsolationDomainProperties. + /// Type of encapsulation. + /// List of Neighbor Group IDs. + internal IsolationDomainProperties(Encapsulation? encapsulation, IList neighborGroupIds) + { + Encapsulation = encapsulation; + NeighborGroupIds = neighborGroupIds; + } + + /// Type of encapsulation. + public Encapsulation? Encapsulation { get; set; } + /// List of Neighbor Group IDs. + public IList NeighborGroupIds { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs index 8e8ba4658a18f..51b42f8b29cde 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs @@ -38,16 +38,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(NetworkFabricId)) - { - writer.WritePropertyName("networkFabricId"u8); - writer.WriteStringValue(NetworkFabricId); - } - if (Optional.IsDefined(VlanId)) - { - writer.WritePropertyName("vlanId"u8); - writer.WriteNumberValue(VlanId.Value); - } + writer.WritePropertyName("networkFabricId"u8); + writer.WriteStringValue(NetworkFabricId); + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId); if (Optional.IsDefined(Mtu)) { writer.WritePropertyName("mtu"u8); @@ -70,12 +64,12 @@ internal static L2IsolationDomainData DeserializeL2IsolationDomainData(JsonEleme ResourceType type = default; Optional systemData = default; Optional annotation = default; - Optional networkFabricId = default; - Optional vlanId = default; + ResourceIdentifier networkFabricId = default; + int vlanId = default; Optional mtu = default; - Optional> disabledOnResources = default; - Optional administrativeState = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -137,15 +131,11 @@ internal static L2IsolationDomainData DeserializeL2IsolationDomainData(JsonEleme } if (property0.NameEquals("networkFabricId"u8)) { - networkFabricId = property0.Value.GetString(); + networkFabricId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("vlanId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } vlanId = property0.Value.GetInt32(); continue; } @@ -158,43 +148,38 @@ internal static L2IsolationDomainData DeserializeL2IsolationDomainData(JsonEleme mtu = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("disabledOnResources"u8)) + if (property0.NameEquals("configurationState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - disabledOnResources = array; + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("administrativeState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new L2IsolationDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, networkFabricId.Value, Optional.ToNullable(vlanId), Optional.ToNullable(mtu), Optional.ToList(disabledOnResources), Optional.ToNullable(administrativeState), Optional.ToNullable(provisioningState)); + return new L2IsolationDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, networkFabricId, vlanId, Optional.ToNullable(mtu), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs index 154d91d49ba58..ed6b03fd3ca11 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs @@ -5,25 +5,19 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The L2IsolationDomain patch resource definition. - public partial class L2IsolationDomainPatch + /// The L2 Isolation Domain patch resource definition. + public partial class L2IsolationDomainPatch : NetworkRackPatch { /// Initializes a new instance of L2IsolationDomainPatch. public L2IsolationDomainPatch() { - Tags = new ChangeTrackingDictionary(); } - /// Resource tags. - public IDictionary Tags { get; } /// Switch configuration description. public string Annotation { get; set; } - /// maximum transmission unit. Default value is 1500. + /// Maximum transmission unit. Default value is 1500. public int? Mtu { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs index 0e8dc175b547a..75ea0cea0d4ae 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of L2IsolationDomains. + /// List of L2 Isolation Domains. internal partial class L2IsolationDomainsListResult { /// Initializes a new instance of L2IsolationDomainsListResult. @@ -21,7 +21,7 @@ internal L2IsolationDomainsListResult() } /// Initializes a new instance of L2IsolationDomainsListResult. - /// Displays list of L2IsolationDomain resources. + /// Displays list of L2 Isolation Domain resources. /// Url to follow for getting next page of resources. internal L2IsolationDomainsListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal L2IsolationDomainsListResult(IReadOnlyList value NextLink = nextLink; } - /// Displays list of L2IsolationDomain resources. + /// Displays list of L2 Isolation Domain resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.Serialization.cs new file mode 100644 index 0000000000000..a2075a73b9f0e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class L3ExportRoutePolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ExportIPv4RoutePolicyId)) + { + writer.WritePropertyName("exportIpv4RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv4RoutePolicyId); + } + if (Optional.IsDefined(ExportIPv6RoutePolicyId)) + { + writer.WritePropertyName("exportIpv6RoutePolicyId"u8); + writer.WriteStringValue(ExportIPv6RoutePolicyId); + } + writer.WriteEndObject(); + } + + internal static L3ExportRoutePolicy DeserializeL3ExportRoutePolicy(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional exportIPv4RoutePolicyId = default; + Optional exportIPv6RoutePolicyId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exportIpv4RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv4RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("exportIpv6RoutePolicyId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportIPv6RoutePolicyId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new L3ExportRoutePolicy(exportIPv4RoutePolicyId.Value, exportIPv6RoutePolicyId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.cs new file mode 100644 index 0000000000000..b7f26eb2e7fba --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Array of ARM Resource ID of the RoutePolicies. + public partial class L3ExportRoutePolicy + { + /// Initializes a new instance of L3ExportRoutePolicy. + public L3ExportRoutePolicy() + { + } + + /// Initializes a new instance of L3ExportRoutePolicy. + /// ARM Resource ID of the RoutePolicy. + /// ARM Resource ID of the RoutePolicy. + internal L3ExportRoutePolicy(ResourceIdentifier exportIPv4RoutePolicyId, ResourceIdentifier exportIPv6RoutePolicyId) + { + ExportIPv4RoutePolicyId = exportIPv4RoutePolicyId; + ExportIPv6RoutePolicyId = exportIPv6RoutePolicyId; + } + + /// ARM Resource ID of the RoutePolicy. + public ResourceIdentifier ExportIPv4RoutePolicyId { get; set; } + /// ARM Resource ID of the RoutePolicy. + public ResourceIdentifier ExportIPv6RoutePolicyId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs index d61ff4e922c3e..d8106e8f3141b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs @@ -53,21 +53,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("aggregateRouteConfiguration"u8); writer.WriteObjectValue(AggregateRouteConfiguration); } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } if (Optional.IsDefined(ConnectedSubnetRoutePolicy)) { writer.WritePropertyName("connectedSubnetRoutePolicy"u8); writer.WriteObjectValue(ConnectedSubnetRoutePolicy); } - if (Optional.IsDefined(NetworkFabricId)) - { - writer.WritePropertyName("networkFabricId"u8); - writer.WriteStringValue(NetworkFabricId); - } + writer.WritePropertyName("networkFabricId"u8); + writer.WriteStringValue(NetworkFabricId); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -88,13 +80,11 @@ internal static L3IsolationDomainData DeserializeL3IsolationDomainData(JsonEleme Optional redistributeConnectedSubnets = default; Optional redistributeStaticRoutes = default; Optional aggregateRouteConfiguration = default; - Optional description = default; - Optional connectedSubnetRoutePolicy = default; - Optional networkFabricId = default; - Optional> disabledOnResources = default; - Optional administrativeState = default; - Optional> optionBDisabledOnResources = default; + Optional connectedSubnetRoutePolicy = default; + ResourceIdentifier networkFabricId = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -181,76 +171,52 @@ internal static L3IsolationDomainData DeserializeL3IsolationDomainData(JsonEleme aggregateRouteConfiguration = AggregateRouteConfiguration.DeserializeAggregateRouteConfiguration(property0.Value); continue; } - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } if (property0.NameEquals("connectedSubnetRoutePolicy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - connectedSubnetRoutePolicy = L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.DeserializeL3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(property0.Value); + connectedSubnetRoutePolicy = ConnectedSubnetRoutePolicy.DeserializeConnectedSubnetRoutePolicy(property0.Value); continue; } if (property0.NameEquals("networkFabricId"u8)) { - networkFabricId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("disabledOnResources"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - disabledOnResources = array; + networkFabricId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("configurationState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } - if (property0.NameEquals("optionBDisabledOnResources"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - optionBDisabledOnResources = array; + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("administrativeState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new L3IsolationDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(redistributeConnectedSubnets), Optional.ToNullable(redistributeStaticRoutes), aggregateRouteConfiguration.Value, description.Value, connectedSubnetRoutePolicy.Value, networkFabricId.Value, Optional.ToList(disabledOnResources), Optional.ToNullable(administrativeState), Optional.ToList(optionBDisabledOnResources), Optional.ToNullable(provisioningState)); + return new L3IsolationDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(redistributeConnectedSubnets), Optional.ToNullable(redistributeStaticRoutes), aggregateRouteConfiguration.Value, connectedSubnetRoutePolicy.Value, networkFabricId, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs index d9ac48aa3935d..347aed9a2d42b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs @@ -28,6 +28,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } if (Optional.IsDefined(RedistributeConnectedSubnets)) { writer.WritePropertyName("redistributeConnectedSubnets"u8); @@ -43,11 +48,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("aggregateRouteConfiguration"u8); writer.WriteObjectValue(AggregateRouteConfiguration); } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } if (Optional.IsDefined(ConnectedSubnetRoutePolicy)) { writer.WritePropertyName("connectedSubnetRoutePolicy"u8); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs index 2b5c25bc91067..f8669c39b7baf 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs @@ -5,31 +5,25 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The L3IsolationDomain patch resource definition. - public partial class L3IsolationDomainPatch + /// The L3 Isolation Domain patch resource definition. + public partial class L3IsolationDomainPatch : NetworkRackPatch { /// Initializes a new instance of L3IsolationDomainPatch. public L3IsolationDomainPatch() { - Tags = new ChangeTrackingDictionary(); } - /// Resource tags. - public IDictionary Tags { get; } + /// Switch configuration description. + public string Annotation { get; set; } /// Advertise Connected Subnets. Ex: "True" | "False". public RedistributeConnectedSubnet? RedistributeConnectedSubnets { get; set; } /// Advertise Static Routes. Ex: "True" | "False". public RedistributeStaticRoute? RedistributeStaticRoutes { get; set; } - /// List of Ipv4 and Ipv6 route configurations. + /// Aggregate route configurations. public AggregateRouteConfiguration AggregateRouteConfiguration { get; set; } - /// L3 Isolation Domain description. - public string Description { get; set; } /// Connected Subnet RoutePolicy. - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } + public ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.cs deleted file mode 100644 index 4843f761890d0..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Connected Subnet RoutePolicy. - public partial class L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy - { - /// Initializes a new instance of L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy. - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - { - } - - /// Initializes a new instance of L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy. - /// exportRoutePolicyId value. - /// Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. - internal L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(string exportRoutePolicyId, EnabledDisabledState? administrativeState) - { - ExportRoutePolicyId = exportRoutePolicyId; - AdministrativeState = administrativeState; - } - - /// exportRoutePolicyId value. - public string ExportRoutePolicyId { get; set; } - /// Enabled/Disabled connected subnet route policy. Ex: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs index 94cde07adc972..d7edc3ac3c9e8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of L3IsolationDomains. + /// List of L3 Isolation Domains. internal partial class L3IsolationDomainsListResult { /// Initializes a new instance of L3IsolationDomainsListResult. @@ -21,7 +21,7 @@ internal L3IsolationDomainsListResult() } /// Initializes a new instance of L3IsolationDomainsListResult. - /// List of L3IsolationDomain resources. + /// List of L3 Isolation Domain resources. /// Url to follow for getting next page of resources. internal L3IsolationDomainsListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal L3IsolationDomainsListResult(IReadOnlyList value NextLink = nextLink; } - /// List of L3IsolationDomain resources. + /// List of L3 Isolation Domain resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.Serialization.cs new file mode 100644 index 0000000000000..eadb460c3fae0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class L3OptionBProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ImportRouteTargets)) + { + writer.WritePropertyName("importRouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ImportRouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExportRouteTargets)) + { + writer.WritePropertyName("exportRouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ExportRouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RouteTargets)) + { + writer.WritePropertyName("routeTargets"u8); + writer.WriteObjectValue(RouteTargets); + } + writer.WriteEndObject(); + } + + internal static L3OptionBProperties DeserializeL3OptionBProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> importRouteTargets = default; + Optional> exportRouteTargets = default; + Optional routeTargets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("importRouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + importRouteTargets = array; + continue; + } + if (property.NameEquals("exportRouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + exportRouteTargets = array; + continue; + } + if (property.NameEquals("routeTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + routeTargets = RouteTargetInformation.DeserializeRouteTargetInformation(property.Value); + continue; + } + } + return new L3OptionBProperties(Optional.ToList(importRouteTargets), Optional.ToList(exportRouteTargets), routeTargets.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.cs new file mode 100644 index 0000000000000..2da760c733f37 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Option B configuration. + public partial class L3OptionBProperties + { + /// Initializes a new instance of L3OptionBProperties. + public L3OptionBProperties() + { + ImportRouteTargets = new ChangeTrackingList(); + ExportRouteTargets = new ChangeTrackingList(); + } + + /// Initializes a new instance of L3OptionBProperties. + /// RouteTargets to be applied. This is used for the backward compatibility. + /// RouteTargets to be applied. This is used for the backward compatibility. + /// RouteTargets to be applied. + internal L3OptionBProperties(IList importRouteTargets, IList exportRouteTargets, RouteTargetInformation routeTargets) + { + ImportRouteTargets = importRouteTargets; + ExportRouteTargets = exportRouteTargets; + RouteTargets = routeTargets; + } + + /// RouteTargets to be applied. This is used for the backward compatibility. + public IList ImportRouteTargets { get; } + /// RouteTargets to be applied. This is used for the backward compatibility. + public IList ExportRouteTargets { get; } + /// RouteTargets to be applied. + public RouteTargetInformation RouteTargets { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.Serialization.cs index d31d7d4108c6d..f2ee151277b75 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.Serialization.cs @@ -16,13 +16,26 @@ public partial class Layer2Configuration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(PortCount)) + if (Optional.IsDefined(Mtu)) { - writer.WritePropertyName("portCount"u8); - writer.WriteNumberValue(PortCount.Value); + writer.WritePropertyName("mtu"u8); + writer.WriteNumberValue(Mtu.Value); + } + if (Optional.IsCollectionDefined(Interfaces)) + { + writer.WritePropertyName("interfaces"u8); + writer.WriteStartArray(); + foreach (var item in Interfaces) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WritePropertyName("mtu"u8); - writer.WriteNumberValue(Mtu); writer.WriteEndObject(); } @@ -32,22 +45,16 @@ internal static Layer2Configuration DeserializeLayer2Configuration(JsonElement e { return null; } - Optional portCount = default; - int mtu = default; - Optional> interfaces = default; + Optional mtu = default; + Optional> interfaces = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("portCount"u8)) + if (property.NameEquals("mtu"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - portCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("mtu"u8)) - { mtu = property.Value.GetInt32(); continue; } @@ -57,16 +64,23 @@ internal static Layer2Configuration DeserializeLayer2Configuration(JsonElement e { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } interfaces = array; continue; } } - return new Layer2Configuration(Optional.ToNullable(portCount), mtu, Optional.ToList(interfaces)); + return new Layer2Configuration(Optional.ToNullable(mtu), Optional.ToList(interfaces)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.cs index 63f0a21bc50e0..f77e8b0eb82d0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer2Configuration.cs @@ -10,33 +10,27 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// layer2Configuration. + /// Common properties for Layer2 Configuration. public partial class Layer2Configuration { /// Initializes a new instance of Layer2Configuration. - /// MTU of the packets between PE & CE. - public Layer2Configuration(int mtu) + public Layer2Configuration() { - Mtu = mtu; - Interfaces = new ChangeTrackingList(); + Interfaces = new ChangeTrackingList(); } /// Initializes a new instance of Layer2Configuration. - /// Number of ports connected between PE/CE. Maximum value depends on FabricSKU. /// MTU of the packets between PE & CE. /// List of network device interfaces resource IDs. - internal Layer2Configuration(int? portCount, int mtu, IReadOnlyList interfaces) + internal Layer2Configuration(int? mtu, IList interfaces) { - PortCount = portCount; Mtu = mtu; Interfaces = interfaces; } - /// Number of ports connected between PE/CE. Maximum value depends on FabricSKU. - public int? PortCount { get; set; } /// MTU of the packets between PE & CE. - public int Mtu { get; set; } + public int? Mtu { get; set; } /// List of network device interfaces resource IDs. - public IReadOnlyList Interfaces { get; } + public IList Interfaces { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.cs deleted file mode 100644 index 0e872807f4426..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// layer3Configuration. - public partial class Layer3Configuration : NetworkFabricLayer3IPPrefixProperties - { - /// Initializes a new instance of Layer3Configuration. - public Layer3Configuration() - { - } - - /// Initializes a new instance of Layer3Configuration. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// importRoutePolicyId. - /// exportRoutePolicyId. - /// ASN of PE devices for CE/PE connectivity.Example : 28. - /// VLAN for CE/PE Layer 3 connectivity.Example : 501. - /// ASN of CE devices for CE/PE connectivity. - internal Layer3Configuration(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, string importRoutePolicyId, string exportRoutePolicyId, int? peerASN, int? vlanId, int? fabricASN) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) - { - ImportRoutePolicyId = importRoutePolicyId; - ExportRoutePolicyId = exportRoutePolicyId; - PeerASN = peerASN; - VlanId = vlanId; - FabricASN = fabricASN; - } - - /// importRoutePolicyId. - public string ImportRoutePolicyId { get; set; } - /// exportRoutePolicyId. - public string ExportRoutePolicyId { get; set; } - /// ASN of PE devices for CE/PE connectivity.Example : 28. - public int? PeerASN { get; set; } - /// VLAN for CE/PE Layer 3 connectivity.Example : 501. - public int? VlanId { get; set; } - /// ASN of CE devices for CE/PE connectivity. - public int? FabricASN { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3IPPrefixProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3IPPrefixProperties.cs index 32af3627b41b3..ad8cf7688b467 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3IPPrefixProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3IPPrefixProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Layer 3 primary and secondary ip address prefixes. + /// Layer 3 primary and secondary IP Address prefixes. public partial class Layer3IPPrefixProperties { /// Initializes a new instance of Layer3IPPrefixProperties. @@ -16,10 +16,10 @@ public Layer3IPPrefixProperties() } /// Initializes a new instance of Layer3IPPrefixProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. internal Layer3IPPrefixProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) { PrimaryIPv4Prefix = primaryIPv4Prefix; @@ -28,13 +28,13 @@ internal Layer3IPPrefixProperties(string primaryIPv4Prefix, string primaryIPv6Pr SecondaryIPv6Prefix = secondaryIPv6Prefix; } - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// IPv4 Address Prefix. public string PrimaryIPv4Prefix { get; set; } - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// IPv6 Address Prefix. public string PrimaryIPv6Prefix { get; set; } - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// Secondary IPv4 Address Prefix. public string SecondaryIPv4Prefix { get; set; } - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. + /// Secondary IPv6 Address Prefix. public string SecondaryIPv6Prefix { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.cs deleted file mode 100644 index 79f478acaabb8..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Peering optionA properties. - public partial class Layer3OptionAProperties : Layer3IPPrefixProperties - { - /// Initializes a new instance of Layer3OptionAProperties. - public Layer3OptionAProperties() - { - } - - /// Initializes a new instance of Layer3OptionAProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// MTU to use for option A peering. - /// Vlan identifier. Example : 501. - /// Fabric ASN number. Example 65001. - /// Peer ASN number.Example : 28. - /// BFD configuration properties. - internal Layer3OptionAProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, int? mtu, int? vlanId, int? fabricASN, int? peerASN, BfdConfiguration bfdConfiguration) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) - { - Mtu = mtu; - VlanId = vlanId; - FabricASN = fabricASN; - PeerASN = peerASN; - BfdConfiguration = bfdConfiguration; - } - - /// MTU to use for option A peering. - public int? Mtu { get; set; } - /// Vlan identifier. Example : 501. - public int? VlanId { get; set; } - /// Fabric ASN number. Example 65001. - public int? FabricASN { get; } - /// Peer ASN number.Example : 28. - public int? PeerASN { get; set; } - /// BFD configuration properties. - public BfdConfiguration BfdConfiguration { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer4Protocol.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer4Protocol.cs new file mode 100644 index 0000000000000..929e1cd7dbf93 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer4Protocol.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Layer4 protocol type that needs to be matched. + public readonly partial struct Layer4Protocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Layer4Protocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TCPValue = "TCP"; + private const string UDPValue = "UDP"; + + /// TCP. + public static Layer4Protocol TCP { get; } = new Layer4Protocol(TCPValue); + /// UDP. + public static Layer4Protocol UDP { get; } = new Layer4Protocol(UDPValue); + /// Determines if two values are the same. + public static bool operator ==(Layer4Protocol left, Layer4Protocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Layer4Protocol left, Layer4Protocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Layer4Protocol(string value) => new Layer4Protocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Layer4Protocol other && Equals(other); + /// + public bool Equals(Layer4Protocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.Serialization.cs new file mode 100644 index 0000000000000..e4b2c721ef906 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ManagementNetworkConfigurationPatchableProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InfrastructureVpnConfiguration)) + { + writer.WritePropertyName("infrastructureVpnConfiguration"u8); + writer.WriteObjectValue(InfrastructureVpnConfiguration); + } + if (Optional.IsDefined(WorkloadVpnConfiguration)) + { + writer.WritePropertyName("workloadVpnConfiguration"u8); + writer.WriteObjectValue(WorkloadVpnConfiguration); + } + writer.WriteEndObject(); + } + + internal static ManagementNetworkConfigurationPatchableProperties DeserializeManagementNetworkConfigurationPatchableProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional infrastructureVpnConfiguration = default; + Optional workloadVpnConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("infrastructureVpnConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureVpnConfiguration = VpnConfigurationPatchableProperties.DeserializeVpnConfigurationPatchableProperties(property.Value); + continue; + } + if (property.NameEquals("workloadVpnConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workloadVpnConfiguration = VpnConfigurationPatchableProperties.DeserializeVpnConfigurationPatchableProperties(property.Value); + continue; + } + } + return new ManagementNetworkConfigurationPatchableProperties(infrastructureVpnConfiguration.Value, workloadVpnConfiguration.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.cs new file mode 100644 index 0000000000000..d49e8e593c686 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Configuration to be used to setup the management network. + public partial class ManagementNetworkConfigurationPatchableProperties + { + /// Initializes a new instance of ManagementNetworkConfigurationPatchableProperties. + public ManagementNetworkConfigurationPatchableProperties() + { + } + + /// Initializes a new instance of ManagementNetworkConfigurationPatchableProperties. + /// VPN Configuration properties. + /// VPN Configuration properties. + internal ManagementNetworkConfigurationPatchableProperties(VpnConfigurationPatchableProperties infrastructureVpnConfiguration, VpnConfigurationPatchableProperties workloadVpnConfiguration) + { + InfrastructureVpnConfiguration = infrastructureVpnConfiguration; + WorkloadVpnConfiguration = workloadVpnConfiguration; + } + + /// VPN Configuration properties. + public VpnConfigurationPatchableProperties InfrastructureVpnConfiguration { get; set; } + /// VPN Configuration properties. + public VpnConfigurationPatchableProperties WorkloadVpnConfiguration { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.Serialization.cs similarity index 82% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.Serialization.cs index 642a492b6f583..02da9a8ab707b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class ManagementNetworkConfiguration : IUtf8JsonSerializable + public partial class ManagementNetworkConfigurationProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -22,7 +22,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ManagementNetworkConfiguration DeserializeManagementNetworkConfiguration(JsonElement element) + internal static ManagementNetworkConfigurationProperties DeserializeManagementNetworkConfigurationProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -43,7 +43,7 @@ internal static ManagementNetworkConfiguration DeserializeManagementNetworkConfi continue; } } - return new ManagementNetworkConfiguration(infrastructureVpnConfiguration, workloadVpnConfiguration); + return new ManagementNetworkConfigurationProperties(infrastructureVpnConfiguration, workloadVpnConfiguration); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.cs similarity index 65% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.cs index 62818c65294f3..c4336cbdf35c5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationProperties.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Configuration to be used to setup the management network. - public partial class ManagementNetworkConfiguration + public partial class ManagementNetworkConfigurationProperties { - /// Initializes a new instance of ManagementNetworkConfiguration. - /// Configuration for infrastructure vpn. - /// Configuration for workload vpn. + /// Initializes a new instance of ManagementNetworkConfigurationProperties. + /// VPN Configuration properties. + /// VPN Configuration properties. /// or is null. - public ManagementNetworkConfiguration(VpnConfigurationProperties infrastructureVpnConfiguration, VpnConfigurationProperties workloadVpnConfiguration) + public ManagementNetworkConfigurationProperties(VpnConfigurationProperties infrastructureVpnConfiguration, VpnConfigurationProperties workloadVpnConfiguration) { Argument.AssertNotNull(infrastructureVpnConfiguration, nameof(infrastructureVpnConfiguration)); Argument.AssertNotNull(workloadVpnConfiguration, nameof(workloadVpnConfiguration)); @@ -26,9 +26,9 @@ public ManagementNetworkConfiguration(VpnConfigurationProperties infrastructureV WorkloadVpnConfiguration = workloadVpnConfiguration; } - /// Configuration for infrastructure vpn. + /// VPN Configuration properties. public VpnConfigurationProperties InfrastructureVpnConfiguration { get; set; } - /// Configuration for workload vpn. + /// VPN Configuration properties. public VpnConfigurationProperties WorkloadVpnConfiguration { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.Serialization.cs index 25469878c19fd..b5b4090a5c3e8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.Serialization.cs @@ -30,7 +30,7 @@ internal static NeighborAddress DeserializeNeighborAddress(JsonElement element) return null; } Optional address = default; - Optional operationalState = default; + Optional configurationState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("address"u8)) @@ -38,13 +38,17 @@ internal static NeighborAddress DeserializeNeighborAddress(JsonElement element) address = property.Value.GetString(); continue; } - if (property.NameEquals("operationalState"u8)) + if (property.NameEquals("configurationState"u8)) { - operationalState = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property.Value.GetString()); continue; } } - return new NeighborAddress(address.Value, operationalState.Value); + return new NeighborAddress(address.Value, Optional.ToNullable(configurationState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.cs index e05a0e2ac83b0..2a6d60d2b2b57 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborAddress.cs @@ -17,16 +17,16 @@ public NeighborAddress() /// Initializes a new instance of NeighborAddress. /// IP Address. - /// OperationalState of the NeighborAddress. - internal NeighborAddress(string address, string operationalState) + /// Configuration state of the resource. + internal NeighborAddress(string address, ConfigurationState? configurationState) { Address = address; - OperationalState = operationalState; + ConfigurationState = configurationState; } /// IP Address. public string Address { get; set; } - /// OperationalState of the NeighborAddress. - public string OperationalState { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupData.Serialization.cs new file mode 100644 index 0000000000000..d4a523cf278ae --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupData.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class NeighborGroupData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(Destination)) + { + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NeighborGroupData DeserializeNeighborGroupData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional annotation = default; + Optional destination = default; + Optional> networkTapIds = default; + Optional> networkTapRuleIds = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("annotation"u8)) + { + annotation = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("destination"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destination = NeighborGroupDestination.DeserializeNeighborGroupDestination(property0.Value); + continue; + } + if (property0.NameEquals("networkTapIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + networkTapIds = array; + continue; + } + if (property0.NameEquals("networkTapRuleIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + networkTapRuleIds = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NeighborGroupData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, destination.Value, Optional.ToList(networkTapIds), Optional.ToList(networkTapRuleIds), Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.Serialization.cs new file mode 100644 index 0000000000000..6d6d32b9a22c7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NeighborGroupDestination : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(IPv4Addresses)) + { + writer.WritePropertyName("ipv4Addresses"u8); + writer.WriteStartArray(); + foreach (var item in IPv4Addresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv6Addresses)) + { + writer.WritePropertyName("ipv6Addresses"u8); + writer.WriteStartArray(); + foreach (var item in IPv6Addresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static NeighborGroupDestination DeserializeNeighborGroupDestination(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> ipv4Addresses = default; + Optional> ipv6Addresses = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipv4Addresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipv4Addresses = array; + continue; + } + if (property.NameEquals("ipv6Addresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipv6Addresses = array; + continue; + } + } + return new NeighborGroupDestination(Optional.ToList(ipv4Addresses), Optional.ToList(ipv6Addresses)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.cs new file mode 100644 index 0000000000000..a324344fcb29e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// An array of destination IPv4 Addresses or IPv6 Addresses. + public partial class NeighborGroupDestination + { + /// Initializes a new instance of NeighborGroupDestination. + public NeighborGroupDestination() + { + IPv4Addresses = new ChangeTrackingList(); + IPv6Addresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of NeighborGroupDestination. + /// Array of IPv4 Addresses. + /// Array of IPv6 Addresses. + internal NeighborGroupDestination(IList ipv4Addresses, IList ipv6Addresses) + { + IPv4Addresses = ipv4Addresses; + IPv6Addresses = ipv6Addresses; + } + + /// Array of IPv4 Addresses. + public IList IPv4Addresses { get; } + /// Array of IPv6 Addresses. + public IList IPv6Addresses { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.Serialization.cs new file mode 100644 index 0000000000000..5784ee4f2eeba --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NeighborGroupPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(Destination)) + { + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.cs new file mode 100644 index 0000000000000..700665860797e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupPatch.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The Neighbor Group Patch definition. + public partial class NeighborGroupPatch : NetworkRackPatch + { + /// Initializes a new instance of NeighborGroupPatch. + public NeighborGroupPatch() + { + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// An array of destination IPv4 Addresses or IPv6 Addresses. + public NeighborGroupDestination Destination { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.Serialization.cs new file mode 100644 index 0000000000000..df0afc9206b36 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + internal partial class NeighborGroupsListResult + { + internal static NeighborGroupsListResult DeserializeNeighborGroupsListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeighborGroupData.DeserializeNeighborGroupData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new NeighborGroupsListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.cs new file mode 100644 index 0000000000000..83283c1b4f3ad --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of Neighbor Group. + internal partial class NeighborGroupsListResult + { + /// Initializes a new instance of NeighborGroupsListResult. + internal NeighborGroupsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of NeighborGroupsListResult. + /// List of Neighbor Group resources. + /// Url to follow for getting next page of resources. + internal NeighborGroupsListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of Neighbor Group resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceData.Serialization.cs index 5a629bd5b435a..0661d61dec47c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceData.Serialization.cs @@ -53,11 +53,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("networkDeviceSku"u8); writer.WriteStringValue(NetworkDeviceSku); } - if (Optional.IsDefined(NetworkDeviceRole)) - { - writer.WritePropertyName("networkDeviceRole"u8); - writer.WriteStringValue(NetworkDeviceRole.Value.ToString()); - } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -79,9 +74,13 @@ internal static NetworkDeviceData DeserializeNetworkDeviceData(JsonElement eleme Optional serialNumber = default; Optional version = default; Optional networkDeviceSku = default; - Optional networkDeviceRole = default; - Optional provisioningState = default; + Optional networkDeviceRole = default; Optional networkRackId = default; + Optional managementIPv4Address = default; + Optional managementIPv6Address = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -167,7 +166,31 @@ internal static NetworkDeviceData DeserializeNetworkDeviceData(JsonElement eleme { continue; } - networkDeviceRole = new NetworkDeviceRoleType(property0.Value.GetString()); + networkDeviceRole = new NetworkDeviceRole(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("networkRackId"u8)) + { + networkRackId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("managementIpv4Address"u8)) + { + managementIPv4Address = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("managementIpv6Address"u8)) + { + managementIPv6Address = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -179,16 +202,20 @@ internal static NetworkDeviceData DeserializeNetworkDeviceData(JsonElement eleme provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("networkRackId"u8)) + if (property0.NameEquals("administrativeState"u8)) { - networkRackId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new NetworkDeviceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, hostName.Value, serialNumber.Value, version.Value, networkDeviceSku.Value, Optional.ToNullable(networkDeviceRole), Optional.ToNullable(provisioningState), networkRackId.Value); + return new NetworkDeviceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, hostName.Value, serialNumber.Value, version.Value, networkDeviceSku.Value, Optional.ToNullable(networkDeviceRole), networkRackId.Value, managementIPv4Address.Value, managementIPv6Address.Value, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDevicePatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDevicePatch.cs index 927c00a9b44bd..0899d458ce44e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDevicePatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDevicePatch.cs @@ -5,27 +5,21 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The NetworkDevicePatchParameters resource definition. - public partial class NetworkDevicePatch + /// The Network Device Patch Parameters defines the patch parameters of the resource. + public partial class NetworkDevicePatch : NetworkRackPatch { /// Initializes a new instance of NetworkDevicePatch. public NetworkDevicePatch() { - Tags = new ChangeTrackingDictionary(); } - /// Azure resource tags that will replace the existing ones. - public IDictionary Tags { get; } /// Switch configuration description. public string Annotation { get; set; } - /// The host Name of the device. + /// The host name of the device. public string HostName { get; set; } - /// serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + /// Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. public string SerialNumber { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRackRoleType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRackRoleType.cs deleted file mode 100644 index 5cfdc6db8ee0f..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRackRoleType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Role for the network device. - public readonly partial struct NetworkDeviceRackRoleType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NetworkDeviceRackRoleType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CEValue = "CE"; - private const string ToRValue = "ToR"; - private const string NPBValue = "NPB"; - private const string TSValue = "TS"; - private const string ManagementValue = "Management"; - - /// CE. - public static NetworkDeviceRackRoleType CE { get; } = new NetworkDeviceRackRoleType(CEValue); - /// ToR. - public static NetworkDeviceRackRoleType ToR { get; } = new NetworkDeviceRackRoleType(ToRValue); - /// NPB. - public static NetworkDeviceRackRoleType NPB { get; } = new NetworkDeviceRackRoleType(NPBValue); - /// TS. - public static NetworkDeviceRackRoleType TS { get; } = new NetworkDeviceRackRoleType(TSValue); - /// Management. - public static NetworkDeviceRackRoleType Management { get; } = new NetworkDeviceRackRoleType(ManagementValue); - /// Determines if two values are the same. - public static bool operator ==(NetworkDeviceRackRoleType left, NetworkDeviceRackRoleType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NetworkDeviceRackRoleType left, NetworkDeviceRackRoleType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NetworkDeviceRackRoleType(string value) => new NetworkDeviceRackRoleType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NetworkDeviceRackRoleType other && Equals(other); - /// - public bool Equals(NetworkDeviceRackRoleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRole.cs similarity index 53% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleType.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRole.cs index 32eb780b1ac36..5c7e70c69b76d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleType.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRole.cs @@ -10,14 +10,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Available roles for the network device. - public readonly partial struct NetworkDeviceRoleType : IEquatable + /// NetworkDeviceRole is the device role: Example: CE | ToR. + public readonly partial struct NetworkDeviceRole : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public NetworkDeviceRoleType(string value) + public NetworkDeviceRole(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -29,27 +29,27 @@ public NetworkDeviceRoleType(string value) private const string ManagementValue = "Management"; /// CE. - public static NetworkDeviceRoleType CE { get; } = new NetworkDeviceRoleType(CEValue); + public static NetworkDeviceRole CE { get; } = new NetworkDeviceRole(CEValue); /// ToR. - public static NetworkDeviceRoleType ToR { get; } = new NetworkDeviceRoleType(ToRValue); + public static NetworkDeviceRole ToR { get; } = new NetworkDeviceRole(ToRValue); /// NPB. - public static NetworkDeviceRoleType NPB { get; } = new NetworkDeviceRoleType(NPBValue); + public static NetworkDeviceRole NPB { get; } = new NetworkDeviceRole(NPBValue); /// TS. - public static NetworkDeviceRoleType TS { get; } = new NetworkDeviceRoleType(TSValue); + public static NetworkDeviceRole TS { get; } = new NetworkDeviceRole(TSValue); /// Management. - public static NetworkDeviceRoleType Management { get; } = new NetworkDeviceRoleType(ManagementValue); - /// Determines if two values are the same. - public static bool operator ==(NetworkDeviceRoleType left, NetworkDeviceRoleType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NetworkDeviceRoleType left, NetworkDeviceRoleType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NetworkDeviceRoleType(string value) => new NetworkDeviceRoleType(value); + public static NetworkDeviceRole Management { get; } = new NetworkDeviceRole(ManagementValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkDeviceRole left, NetworkDeviceRole right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkDeviceRole left, NetworkDeviceRole right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkDeviceRole(string value) => new NetworkDeviceRole(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NetworkDeviceRoleType other && Equals(other); + public override bool Equals(object obj) => obj is NetworkDeviceRole other && Equals(other); /// - public bool Equals(NetworkDeviceRoleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(NetworkDeviceRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.Serialization.cs deleted file mode 100644 index 19449c051207b..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class NetworkDeviceRoleProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(NetworkDeviceSkuName)) - { - writer.WritePropertyName("networkDeviceSkuName"u8); - writer.WriteStringValue(NetworkDeviceSkuName); - } - if (Optional.IsDefined(RoleType)) - { - writer.WritePropertyName("roleType"u8); - writer.WriteStringValue(RoleType.Value.ToString()); - } - if (Optional.IsDefined(RackSlot)) - { - writer.WritePropertyName("rackSlot"u8); - writer.WriteNumberValue(RackSlot.Value); - } - writer.WriteEndObject(); - } - - internal static NetworkDeviceRoleProperties DeserializeNetworkDeviceRoleProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional networkDeviceSkuName = default; - Optional roleType = default; - Optional rackSlot = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("networkDeviceSkuName"u8)) - { - networkDeviceSkuName = property.Value.GetString(); - continue; - } - if (property.NameEquals("roleType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - roleType = new NetworkDeviceRackRoleType(property.Value.GetString()); - continue; - } - if (property.NameEquals("rackSlot"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rackSlot = property.Value.GetInt32(); - continue; - } - } - return new NetworkDeviceRoleProperties(networkDeviceSkuName.Value, Optional.ToNullable(roleType), Optional.ToNullable(rackSlot)); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.cs deleted file mode 100644 index 35237b216bff8..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Network device properties / role for the Network Rack. - public partial class NetworkDeviceRoleProperties - { - /// Initializes a new instance of NetworkDeviceRoleProperties. - public NetworkDeviceRoleProperties() - { - } - - /// Initializes a new instance of NetworkDeviceRoleProperties. - /// Name of the associated Network Device SKU. - /// Role for the network device. - /// Rack slot for the network device. - internal NetworkDeviceRoleProperties(string networkDeviceSkuName, NetworkDeviceRackRoleType? roleType, int? rackSlot) - { - NetworkDeviceSkuName = networkDeviceSkuName; - RoleType = roleType; - RackSlot = rackSlot; - } - - /// Name of the associated Network Device SKU. - public string NetworkDeviceSkuName { get; set; } - /// Role for the network device. - public NetworkDeviceRackRoleType? RoleType { get; set; } - /// Rack slot for the network device. - public int? RackSlot { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkuData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkuData.Serialization.cs index 24a4c5ba1625f..cfe3a2771644c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkuData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkuData.Serialization.cs @@ -37,11 +37,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsDefined(Limits)) - { - writer.WritePropertyName("limits"u8); - writer.WriteObjectValue(Limits); - } if (Optional.IsCollectionDefined(SupportedRoleTypes)) { writer.WritePropertyName("supportedRoleTypes"u8); @@ -79,7 +74,6 @@ internal static NetworkDeviceSkuData DeserializeNetworkDeviceSkuData(JsonElement string model = default; Optional manufacturer = default; Optional> supportedVersions = default; - Optional limits = default; Optional> supportedRoleTypes = default; Optional> interfaces = default; Optional provisioningState = default; @@ -142,15 +136,6 @@ internal static NetworkDeviceSkuData DeserializeNetworkDeviceSkuData(JsonElement supportedVersions = array; continue; } - if (property0.NameEquals("limits"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - limits = DeviceLimits.DeserializeDeviceLimits(property0.Value); - continue; - } if (property0.NameEquals("supportedRoleTypes"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -192,7 +177,7 @@ internal static NetworkDeviceSkuData DeserializeNetworkDeviceSkuData(JsonElement continue; } } - return new NetworkDeviceSkuData(id, name, type, systemData.Value, model, manufacturer.Value, Optional.ToList(supportedVersions), limits.Value, Optional.ToList(supportedRoleTypes), Optional.ToList(interfaces), Optional.ToNullable(provisioningState)); + return new NetworkDeviceSkuData(id, name, type, systemData.Value, model, manufacturer.Value, Optional.ToList(supportedVersions), Optional.ToList(supportedRoleTypes), Optional.ToList(interfaces), Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkusListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkusListResult.cs index 18b1997e77241..d906ea3213fba 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkusListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceSkusListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkDeviceSkus. + /// List of Network Device SKUs. internal partial class NetworkDeviceSkusListResult { /// Initializes a new instance of NetworkDeviceSkusListResult. @@ -21,7 +21,7 @@ internal NetworkDeviceSkusListResult() } /// Initializes a new instance of NetworkDeviceSkusListResult. - /// List of NetworkDeviceSku resources. + /// List of Network Device SKU resources. /// Url to follow for getting next page of resources. internal NetworkDeviceSkusListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal NetworkDeviceSkusListResult(IReadOnlyList value, NextLink = nextLink; } - /// List of NetworkDeviceSku resources. + /// List of Network Device SKU resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerData.Serialization.cs index a1c5a3dc5a18d..9757464699b1e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerData.Serialization.cs @@ -63,6 +63,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("managedResourceGroupConfiguration"u8); writer.WriteObjectValue(ManagedResourceGroupConfiguration); } + if (Optional.IsDefined(IsWorkloadManagementNetworkEnabled)) + { + writer.WritePropertyName("isWorkloadManagementNetworkEnabled"u8); + writer.WriteStringValue(IsWorkloadManagementNetworkEnabled.Value.ToString()); + } if (Optional.IsDefined(IPv4AddressSpace)) { writer.WritePropertyName("ipv4AddressSpace"u8); @@ -73,6 +78,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("ipv6AddressSpace"u8); writer.WriteStringValue(IPv6AddressSpace); } + if (Optional.IsDefined(NfcSku)) + { + writer.WritePropertyName("nfcSku"u8); + writer.WriteStringValue(NfcSku.Value.ToString()); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -92,14 +102,16 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa Optional annotation = default; Optional> infrastructureExpressRouteConnections = default; Optional> workloadExpressRouteConnections = default; - Optional infrastructureServices = default; - Optional workloadServices = default; + Optional infrastructureServices = default; + Optional workloadServices = default; Optional managedResourceGroupConfiguration = default; - Optional> networkFabricIds = default; + Optional> networkFabricIds = default; Optional workloadManagementNetwork = default; + Optional isWorkloadManagementNetworkEnabled = default; + Optional> tenantInternetGatewayIds = default; Optional ipv4AddressSpace = default; Optional ipv6AddressSpace = default; - Optional operationalState = default; + Optional nfcSku = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { @@ -194,7 +206,7 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - infrastructureServices = InfrastructureServices.DeserializeInfrastructureServices(property0.Value); + infrastructureServices = ControllerServices.DeserializeControllerServices(property0.Value); continue; } if (property0.NameEquals("workloadServices"u8)) @@ -203,7 +215,7 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - workloadServices = WorkloadServices.DeserializeWorkloadServices(property0.Value); + workloadServices = ControllerServices.DeserializeControllerServices(property0.Value); continue; } if (property0.NameEquals("managedResourceGroupConfiguration"u8)) @@ -221,10 +233,17 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } networkFabricIds = array; continue; @@ -238,6 +257,36 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa workloadManagementNetwork = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("isWorkloadManagementNetworkEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isWorkloadManagementNetworkEnabled = new IsWorkloadManagementNetworkEnabled(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("tenantInternetGatewayIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + tenantInternetGatewayIds = array; + continue; + } if (property0.NameEquals("ipv4AddressSpace"u8)) { ipv4AddressSpace = property0.Value.GetString(); @@ -248,13 +297,13 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa ipv6AddressSpace = property0.Value.GetString(); continue; } - if (property0.NameEquals("operationalState"u8)) + if (property0.NameEquals("nfcSku"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - operationalState = new NetworkFabricControllerOperationalState(property0.Value.GetString()); + nfcSku = new NfcSku(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -270,7 +319,7 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa continue; } } - return new NetworkFabricControllerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToList(infrastructureExpressRouteConnections), Optional.ToList(workloadExpressRouteConnections), infrastructureServices.Value, workloadServices.Value, managedResourceGroupConfiguration.Value, Optional.ToList(networkFabricIds), Optional.ToNullable(workloadManagementNetwork), ipv4AddressSpace.Value, ipv6AddressSpace.Value, Optional.ToNullable(operationalState), Optional.ToNullable(provisioningState)); + return new NetworkFabricControllerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToList(infrastructureExpressRouteConnections), Optional.ToList(workloadExpressRouteConnections), infrastructureServices.Value, workloadServices.Value, managedResourceGroupConfiguration.Value, Optional.ToList(networkFabricIds), Optional.ToNullable(workloadManagementNetwork), Optional.ToNullable(isWorkloadManagementNetworkEnabled), Optional.ToList(tenantInternetGatewayIds), ipv4AddressSpace.Value, ipv6AddressSpace.Value, Optional.ToNullable(nfcSku), Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerOperationalState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerOperationalState.cs deleted file mode 100644 index 5b86c9a028e51..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerOperationalState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Operational state for the resource. - public readonly partial struct NetworkFabricControllerOperationalState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NetworkFabricControllerOperationalState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ConfiguringValue = "Configuring"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - - /// Configuring. - public static NetworkFabricControllerOperationalState Configuring { get; } = new NetworkFabricControllerOperationalState(ConfiguringValue); - /// Succeeded. - public static NetworkFabricControllerOperationalState Succeeded { get; } = new NetworkFabricControllerOperationalState(SucceededValue); - /// Failed. - public static NetworkFabricControllerOperationalState Failed { get; } = new NetworkFabricControllerOperationalState(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(NetworkFabricControllerOperationalState left, NetworkFabricControllerOperationalState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NetworkFabricControllerOperationalState left, NetworkFabricControllerOperationalState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NetworkFabricControllerOperationalState(string value) => new NetworkFabricControllerOperationalState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NetworkFabricControllerOperationalState other && Equals(other); - /// - public bool Equals(NetworkFabricControllerOperationalState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerPatch.cs index c97198db7d21a..6f14cac535430 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerPatch.cs @@ -10,19 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The NetworkFabricControllerPatch payload definition. - public partial class NetworkFabricControllerPatch + /// The Network Fabric Controller Patch payload definition. + public partial class NetworkFabricControllerPatch : NetworkRackPatch { /// Initializes a new instance of NetworkFabricControllerPatch. public NetworkFabricControllerPatch() { - Tags = new ChangeTrackingDictionary(); InfrastructureExpressRouteConnections = new ChangeTrackingList(); WorkloadExpressRouteConnections = new ChangeTrackingList(); } - /// Azure resource tags that will replace the existing ones. - public IDictionary Tags { get; } /// As part of an update, the Infrastructure ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure services. (This is a Mandatory attribute). public IList InfrastructureExpressRouteConnections { get; } /// As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute). diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllersListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllersListResult.cs index 5134def3a3549..1bf7b2a4e13cc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllersListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllersListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkFabricControllers. + /// List of Network Fabric Controllers. internal partial class NetworkFabricControllersListResult { /// Initializes a new instance of NetworkFabricControllersListResult. @@ -21,7 +21,7 @@ internal NetworkFabricControllersListResult() } /// Initializes a new instance of NetworkFabricControllersListResult. - /// List of NetworkFabricController resources. + /// List of Network Fabric Controller resources. /// Url to follow for getting next page of resources. internal NetworkFabricControllersListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal NetworkFabricControllersListResult(IReadOnlyList List of NetworkFabricController resources. + /// List of Network Fabric Controller resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricData.Serialization.cs index 271254c737332..aa3727d5b30f4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricData.Serialization.cs @@ -38,51 +38,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(NetworkFabricSku)) - { - writer.WritePropertyName("networkFabricSku"u8); - writer.WriteStringValue(NetworkFabricSku); - } + writer.WritePropertyName("networkFabricSku"u8); + writer.WriteStringValue(NetworkFabricSku); + writer.WritePropertyName("networkFabricControllerId"u8); + writer.WriteStringValue(NetworkFabricControllerId); if (Optional.IsDefined(RackCount)) { writer.WritePropertyName("rackCount"u8); writer.WriteNumberValue(RackCount.Value); } - if (Optional.IsDefined(ServerCountPerRack)) - { - writer.WritePropertyName("serverCountPerRack"u8); - writer.WriteNumberValue(ServerCountPerRack.Value); - } - if (Optional.IsDefined(IPv4Prefix)) - { - writer.WritePropertyName("ipv4Prefix"u8); - writer.WriteStringValue(IPv4Prefix); - } + writer.WritePropertyName("serverCountPerRack"u8); + writer.WriteNumberValue(ServerCountPerRack); + writer.WritePropertyName("ipv4Prefix"u8); + writer.WriteStringValue(IPv4Prefix); if (Optional.IsDefined(IPv6Prefix)) { writer.WritePropertyName("ipv6Prefix"u8); writer.WriteStringValue(IPv6Prefix); } - if (Optional.IsDefined(FabricASN)) - { - writer.WritePropertyName("fabricASN"u8); - writer.WriteNumberValue(FabricASN.Value); - } - if (Optional.IsDefined(NetworkFabricControllerId)) - { - writer.WritePropertyName("networkFabricControllerId"u8); - writer.WriteStringValue(NetworkFabricControllerId); - } - if (Optional.IsDefined(TerminalServerConfiguration)) - { - writer.WritePropertyName("terminalServerConfiguration"u8); - writer.WriteObjectValue(TerminalServerConfiguration); - } - if (Optional.IsDefined(ManagementNetworkConfiguration)) - { - writer.WritePropertyName("managementNetworkConfiguration"u8); - writer.WriteObjectValue(ManagementNetworkConfiguration); - } + writer.WritePropertyName("fabricASN"u8); + writer.WriteNumberValue(FabricASN); + writer.WritePropertyName("terminalServerConfiguration"u8); + writer.WriteObjectValue(TerminalServerConfiguration); + writer.WritePropertyName("managementNetworkConfiguration"u8); + writer.WriteObjectValue(ManagementNetworkConfiguration); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -100,21 +79,23 @@ internal static NetworkFabricData DeserializeNetworkFabricData(JsonElement eleme ResourceType type = default; Optional systemData = default; Optional annotation = default; + string networkFabricSku = default; + Optional fabricVersion = default; + Optional> routerIds = default; + ResourceIdentifier networkFabricControllerId = default; + Optional rackCount = default; + int serverCountPerRack = default; + string ipv4Prefix = default; + Optional ipv6Prefix = default; + long fabricASN = default; + TerminalServerConfiguration terminalServerConfiguration = default; + ManagementNetworkConfigurationProperties managementNetworkConfiguration = default; Optional> racks = default; Optional> l2IsolationDomains = default; Optional> l3IsolationDomains = default; - Optional networkFabricSku = default; - Optional rackCount = default; - Optional serverCountPerRack = default; - Optional ipv4Prefix = default; - Optional ipv6Prefix = default; - Optional routerId = default; - Optional fabricASN = default; - Optional networkFabricControllerId = default; - Optional terminalServerConfiguration = default; - Optional managementNetworkConfiguration = default; - Optional operationalState = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -174,35 +155,17 @@ internal static NetworkFabricData DeserializeNetworkFabricData(JsonElement eleme annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("racks"u8)) + if (property0.NameEquals("networkFabricSku"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - racks = array; + networkFabricSku = property0.Value.GetString(); continue; } - if (property0.NameEquals("l2IsolationDomains"u8)) + if (property0.NameEquals("fabricVersion"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - l2IsolationDomains = array; + fabricVersion = property0.Value.GetString(); continue; } - if (property0.NameEquals("l3IsolationDomains"u8)) + if (property0.NameEquals("routerIds"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { @@ -213,12 +176,12 @@ internal static NetworkFabricData DeserializeNetworkFabricData(JsonElement eleme { array.Add(item.GetString()); } - l3IsolationDomains = array; + routerIds = array; continue; } - if (property0.NameEquals("networkFabricSku"u8)) + if (property0.NameEquals("networkFabricControllerId"u8)) { - networkFabricSku = property0.Value.GetString(); + networkFabricControllerId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("rackCount"u8)) @@ -232,10 +195,6 @@ internal static NetworkFabricData DeserializeNetworkFabricData(JsonElement eleme } if (property0.NameEquals("serverCountPerRack"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } serverCountPerRack = property0.Value.GetInt32(); continue; } @@ -249,66 +208,95 @@ internal static NetworkFabricData DeserializeNetworkFabricData(JsonElement eleme ipv6Prefix = property0.Value.GetString(); continue; } - if (property0.NameEquals("routerId"u8)) + if (property0.NameEquals("fabricASN"u8)) { - routerId = property0.Value.GetString(); + fabricASN = property0.Value.GetInt64(); continue; } - if (property0.NameEquals("fabricASN"u8)) + if (property0.NameEquals("terminalServerConfiguration"u8)) + { + terminalServerConfiguration = TerminalServerConfiguration.DeserializeTerminalServerConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("managementNetworkConfiguration"u8)) + { + managementNetworkConfiguration = ManagementNetworkConfigurationProperties.DeserializeManagementNetworkConfigurationProperties(property0.Value); + continue; + } + if (property0.NameEquals("racks"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - fabricASN = property0.Value.GetInt32(); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + racks = array; continue; } - if (property0.NameEquals("networkFabricControllerId"u8)) + if (property0.NameEquals("l2IsolationDomains"u8)) { - networkFabricControllerId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + l2IsolationDomains = array; continue; } - if (property0.NameEquals("terminalServerConfiguration"u8)) + if (property0.NameEquals("l3IsolationDomains"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - terminalServerConfiguration = TerminalServerConfiguration.DeserializeTerminalServerConfiguration(property0.Value); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + l3IsolationDomains = array; continue; } - if (property0.NameEquals("managementNetworkConfiguration"u8)) + if (property0.NameEquals("configurationState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - managementNetworkConfiguration = ManagementNetworkConfiguration.DeserializeManagementNetworkConfiguration(property0.Value); + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } - if (property0.NameEquals("operationalState"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - operationalState = new NetworkFabricOperationalState(property0.Value.GetString()); + provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("administrativeState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + administrativeState = new AdministrativeState(property0.Value.GetString()); continue; } } continue; } } - return new NetworkFabricData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToList(racks), Optional.ToList(l2IsolationDomains), Optional.ToList(l3IsolationDomains), networkFabricSku.Value, Optional.ToNullable(rackCount), Optional.ToNullable(serverCountPerRack), ipv4Prefix.Value, ipv6Prefix.Value, routerId.Value, Optional.ToNullable(fabricASN), networkFabricControllerId.Value, terminalServerConfiguration.Value, managementNetworkConfiguration.Value, Optional.ToNullable(operationalState), Optional.ToNullable(provisioningState)); + return new NetworkFabricData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, networkFabricSku, fabricVersion.Value, Optional.ToList(routerIds), networkFabricControllerId, Optional.ToNullable(rackCount), serverCountPerRack, ipv4Prefix, ipv6Prefix.Value, fabricASN, terminalServerConfiguration, managementNetworkConfiguration, Optional.ToList(racks), Optional.ToList(l2IsolationDomains), Optional.ToList(l3IsolationDomains), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.cs deleted file mode 100644 index 4d413ba15b588..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Layer 3 primary and secondary ip address prefixes. - public partial class NetworkFabricLayer3IPPrefixProperties - { - /// Initializes a new instance of NetworkFabricLayer3IPPrefixProperties. - public NetworkFabricLayer3IPPrefixProperties() - { - } - - /// Initializes a new instance of NetworkFabricLayer3IPPrefixProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - internal NetworkFabricLayer3IPPrefixProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) - { - PrimaryIPv4Prefix = primaryIPv4Prefix; - PrimaryIPv6Prefix = primaryIPv6Prefix; - SecondaryIPv4Prefix = secondaryIPv4Prefix; - SecondaryIPv6Prefix = secondaryIPv6Prefix; - } - - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - public string PrimaryIPv4Prefix { get; set; } - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - public string PrimaryIPv6Prefix { get; set; } - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - public string SecondaryIPv4Prefix { get; set; } - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - public string SecondaryIPv6Prefix { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOperationalState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOperationalState.cs deleted file mode 100644 index 8a8b498717dd0..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOperationalState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Operational state for the resource. - public readonly partial struct NetworkFabricOperationalState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NetworkFabricOperationalState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ProvisioningValue = "Provisioning"; - private const string ProvisionedValue = "Provisioned"; - private const string ErrorProvisioningValue = "ErrorProvisioning"; - private const string DeprovisioningValue = "Deprovisioning"; - private const string DeprovisionedValue = "Deprovisioned"; - private const string ErrorDeprovisioningValue = "ErrorDeprovisioning"; - private const string DeferredControlValue = "DeferredControl"; - - /// Provisioning. - public static NetworkFabricOperationalState Provisioning { get; } = new NetworkFabricOperationalState(ProvisioningValue); - /// Provisioned. - public static NetworkFabricOperationalState Provisioned { get; } = new NetworkFabricOperationalState(ProvisionedValue); - /// ErrorProvisioning. - public static NetworkFabricOperationalState ErrorProvisioning { get; } = new NetworkFabricOperationalState(ErrorProvisioningValue); - /// Deprovisioning. - public static NetworkFabricOperationalState Deprovisioning { get; } = new NetworkFabricOperationalState(DeprovisioningValue); - /// Deprovisioned. - public static NetworkFabricOperationalState Deprovisioned { get; } = new NetworkFabricOperationalState(DeprovisionedValue); - /// ErrorDeprovisioning. - public static NetworkFabricOperationalState ErrorDeprovisioning { get; } = new NetworkFabricOperationalState(ErrorDeprovisioningValue); - /// DeferredControl. - public static NetworkFabricOperationalState DeferredControl { get; } = new NetworkFabricOperationalState(DeferredControlValue); - /// Determines if two values are the same. - public static bool operator ==(NetworkFabricOperationalState left, NetworkFabricOperationalState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NetworkFabricOperationalState left, NetworkFabricOperationalState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NetworkFabricOperationalState(string value) => new NetworkFabricOperationalState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NetworkFabricOperationalState other && Equals(other); - /// - public bool Equals(NetworkFabricOperationalState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.cs deleted file mode 100644 index 8f8bd6acb15ea..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Peering optionA properties. - public partial class NetworkFabricOptionAProperties : NetworkFabricLayer3IPPrefixProperties - { - /// Initializes a new instance of NetworkFabricOptionAProperties. - public NetworkFabricOptionAProperties() - { - } - - /// Initializes a new instance of NetworkFabricOptionAProperties. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// MTU to use for option A peering. - /// Vlan identifier. Example : 501. - /// Peer ASN number.Example : 28. - /// BFD Configuration properties. - internal NetworkFabricOptionAProperties(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, int? mtu, int? vlanId, int? peerASN, FabricBfdConfiguration bfdConfiguration) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) - { - Mtu = mtu; - VlanId = vlanId; - PeerASN = peerASN; - BfdConfiguration = bfdConfiguration; - } - - /// MTU to use for option A peering. - public int? Mtu { get; set; } - /// Vlan identifier. Example : 501. - public int? VlanId { get; set; } - /// Peer ASN number.Example : 28. - public int? PeerASN { get; set; } - /// BFD Configuration properties. - public FabricBfdConfiguration BfdConfiguration { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.Serialization.cs deleted file mode 100644 index 5e9f4a315850b..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.Serialization.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class NetworkFabricOptionBProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("importRouteTargets"u8); - writer.WriteStartArray(); - foreach (var item in ImportRouteTargets) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("exportRouteTargets"u8); - writer.WriteStartArray(); - foreach (var item in ExportRouteTargets) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static NetworkFabricOptionBProperties DeserializeNetworkFabricOptionBProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList importRouteTargets = default; - IList exportRouteTargets = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("importRouteTargets"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - importRouteTargets = array; - continue; - } - if (property.NameEquals("exportRouteTargets"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - exportRouteTargets = array; - continue; - } - } - return new NetworkFabricOptionBProperties(importRouteTargets, exportRouteTargets); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.cs deleted file mode 100644 index 9e2c8ef906e99..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Option B configuration. - public partial class NetworkFabricOptionBProperties - { - /// Initializes a new instance of NetworkFabricOptionBProperties. - /// Route Targets to be applied for incoming routes into CE. - /// Route Targets to be applied for outgoing routes from CE. - /// or is null. - public NetworkFabricOptionBProperties(IEnumerable importRouteTargets, IEnumerable exportRouteTargets) - { - Argument.AssertNotNull(importRouteTargets, nameof(importRouteTargets)); - Argument.AssertNotNull(exportRouteTargets, nameof(exportRouteTargets)); - - ImportRouteTargets = importRouteTargets.ToList(); - ExportRouteTargets = exportRouteTargets.ToList(); - } - - /// Initializes a new instance of NetworkFabricOptionBProperties. - /// Route Targets to be applied for incoming routes into CE. - /// Route Targets to be applied for outgoing routes from CE. - internal NetworkFabricOptionBProperties(IList importRouteTargets, IList exportRouteTargets) - { - ImportRouteTargets = importRouteTargets; - ExportRouteTargets = exportRouteTargets; - } - - /// Route Targets to be applied for incoming routes into CE. - public IList ImportRouteTargets { get; } - /// Route Targets to be applied for outgoing routes from CE. - public IList ExportRouteTargets { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.Serialization.cs index 30a7874ee4307..c5a4c20ce5593 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.Serialization.cs @@ -33,11 +33,41 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } + if (Optional.IsDefined(RackCount)) + { + writer.WritePropertyName("rackCount"u8); + writer.WriteNumberValue(RackCount.Value); + } + if (Optional.IsDefined(ServerCountPerRack)) + { + writer.WritePropertyName("serverCountPerRack"u8); + writer.WriteNumberValue(ServerCountPerRack.Value); + } + if (Optional.IsDefined(IPv4Prefix)) + { + writer.WritePropertyName("ipv4Prefix"u8); + writer.WriteStringValue(IPv4Prefix); + } + if (Optional.IsDefined(IPv6Prefix)) + { + writer.WritePropertyName("ipv6Prefix"u8); + writer.WriteStringValue(IPv6Prefix); + } + if (Optional.IsDefined(FabricASN)) + { + writer.WritePropertyName("fabricASN"u8); + writer.WriteNumberValue(FabricASN.Value); + } if (Optional.IsDefined(TerminalServerConfiguration)) { writer.WritePropertyName("terminalServerConfiguration"u8); writer.WriteObjectValue(TerminalServerConfiguration); } + if (Optional.IsDefined(ManagementNetworkConfiguration)) + { + writer.WritePropertyName("managementNetworkConfiguration"u8); + writer.WriteObjectValue(ManagementNetworkConfiguration); + } writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.cs index 6616e45e70f2f..0aba9e49df156 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatch.cs @@ -5,34 +5,31 @@ #nullable disable -using System.Collections.Generic; -using Azure.Core; - namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The NetworkFabric resource definition. - public partial class NetworkFabricPatch + /// The Network Fabric resource definition. + public partial class NetworkFabricPatch : NetworkRackPatch { /// Initializes a new instance of NetworkFabricPatch. public NetworkFabricPatch() { - Tags = new ChangeTrackingDictionary(); - Racks = new ChangeTrackingList(); - L2IsolationDomains = new ChangeTrackingList(); - L3IsolationDomains = new ChangeTrackingList(); } - /// Azure resource tags that will replace the existing ones. - public IDictionary Tags { get; } /// Switch configuration description. public string Annotation { get; set; } + /// Number of compute racks associated to Network Fabric. + public int? RackCount { get; set; } + /// Number of servers.Possible values are from 1-16. + public int? ServerCountPerRack { get; set; } + /// IPv4Prefix for Management Network. Example: 10.1.0.0/19. + public string IPv4Prefix { get; set; } + /// IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. + public string IPv6Prefix { get; set; } + /// ASN of CE devices for CE/PE connectivity. + public long? FabricASN { get; set; } /// Network and credentials configuration already applied to terminal server. - public TerminalServerPatchableProperties TerminalServerConfiguration { get; set; } - /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. - public IReadOnlyList Racks { get; } - /// List of L2IsolationDomain resource IDs under the Network Fabric. - public IReadOnlyList L2IsolationDomains { get; } - /// List of L3IsolationDomain resource IDs under the Network Fabric. - public IReadOnlyList L3IsolationDomains { get; } + public NetworkFabricPatchablePropertiesTerminalServerConfiguration TerminalServerConfiguration { get; set; } + /// Configuration to be used to setup the management network. + public ManagementNetworkConfigurationPatchableProperties ManagementNetworkConfiguration { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.Serialization.cs similarity index 58% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.Serialization.cs index b06221531d416..24c2620984f1d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class NetworkFabricLayer3IPPrefixProperties : IUtf8JsonSerializable + public partial class NetworkFabricPatchablePropertiesTerminalServerConfiguration : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -35,10 +35,25 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("secondaryIpv6Prefix"u8); writer.WriteStringValue(SecondaryIPv6Prefix); } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(SerialNumber)) + { + writer.WritePropertyName("serialNumber"u8); + writer.WriteStringValue(SerialNumber); + } writer.WriteEndObject(); } - internal static NetworkFabricLayer3IPPrefixProperties DeserializeNetworkFabricLayer3IPPrefixProperties(JsonElement element) + internal static NetworkFabricPatchablePropertiesTerminalServerConfiguration DeserializeNetworkFabricPatchablePropertiesTerminalServerConfiguration(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -48,6 +63,9 @@ internal static NetworkFabricLayer3IPPrefixProperties DeserializeNetworkFabricLa Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; Optional secondaryIPv6Prefix = default; + Optional username = default; + Optional password = default; + Optional serialNumber = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryIpv4Prefix"u8)) @@ -70,8 +88,23 @@ internal static NetworkFabricLayer3IPPrefixProperties DeserializeNetworkFabricLa secondaryIPv6Prefix = property.Value.GetString(); continue; } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("serialNumber"u8)) + { + serialNumber = property.Value.GetString(); + continue; + } } - return new NetworkFabricLayer3IPPrefixProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value); + return new NetworkFabricPatchablePropertiesTerminalServerConfiguration(username.Value, password.Value, serialNumber.Value, primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.cs new file mode 100644 index 0000000000000..c035fa96705a7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Network and credentials configuration already applied to terminal server. + public partial class NetworkFabricPatchablePropertiesTerminalServerConfiguration : TerminalServerPatchableProperties + { + /// Initializes a new instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration. + public NetworkFabricPatchablePropertiesTerminalServerConfiguration() + { + } + + /// Initializes a new instance of NetworkFabricPatchablePropertiesTerminalServerConfiguration. + /// Username for the terminal server connection. + /// Password for the terminal server connection. + /// Serial Number of Terminal server. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + internal NetworkFabricPatchablePropertiesTerminalServerConfiguration(string username, string password, string serialNumber, string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) : base(username, password, serialNumber) + { + PrimaryIPv4Prefix = primaryIPv4Prefix; + PrimaryIPv6Prefix = primaryIPv6Prefix; + SecondaryIPv4Prefix = secondaryIPv4Prefix; + SecondaryIPv6Prefix = secondaryIPv6Prefix; + } + + /// IPv4 Address Prefix. + public string PrimaryIPv4Prefix { get; set; } + /// IPv6 Address Prefix. + public string PrimaryIPv6Prefix { get; set; } + /// Secondary IPv4 Address Prefix. + public string SecondaryIPv4Prefix { get; set; } + /// Secondary IPv6 Address Prefix. + public string SecondaryIPv6Prefix { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuData.Serialization.cs index 7d25252fe7b1f..7189c119a3a25 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuData.Serialization.cs @@ -5,7 +5,7 @@ #nullable disable -using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -25,6 +25,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("maxComputeRacks"u8); writer.WriteNumberValue(MaxComputeRacks.Value); } + if (Optional.IsDefined(MaximumServerCount)) + { + writer.WritePropertyName("maximumServerCount"u8); + writer.WriteNumberValue(MaximumServerCount.Value); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -39,11 +44,11 @@ internal static NetworkFabricSkuData DeserializeNetworkFabricSkuData(JsonElement string name = default; ResourceType type = default; Optional systemData = default; - Optional type0 = default; + Optional type0 = default; Optional maxComputeRacks = default; - Optional minSupportedVer = default; - Optional maxSupportedVer = default; - Optional detailsUri = default; + Optional maximumServerCount = default; + Optional> supportedVersions = default; + Optional details = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { @@ -82,7 +87,11 @@ internal static NetworkFabricSkuData DeserializeNetworkFabricSkuData(JsonElement { if (property0.NameEquals("type"u8)) { - type0 = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type0 = new FabricSkuType(property0.Value.GetString()); continue; } if (property0.NameEquals("maxComputeRacks"u8)) @@ -94,23 +103,32 @@ internal static NetworkFabricSkuData DeserializeNetworkFabricSkuData(JsonElement maxComputeRacks = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("minSupportedVer"u8)) - { - minSupportedVer = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("maxSupportedVer"u8)) + if (property0.NameEquals("maximumServerCount"u8)) { - maxSupportedVer = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumServerCount = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("detailsUri"u8)) + if (property0.NameEquals("supportedVersions"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - detailsUri = new Uri(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedVersions = array; + continue; + } + if (property0.NameEquals("details"u8)) + { + details = property0.Value.GetString(); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -126,7 +144,7 @@ internal static NetworkFabricSkuData DeserializeNetworkFabricSkuData(JsonElement continue; } } - return new NetworkFabricSkuData(id, name, type, systemData.Value, type0.Value, Optional.ToNullable(maxComputeRacks), minSupportedVer.Value, maxSupportedVer.Value, detailsUri.Value, Optional.ToNullable(provisioningState)); + return new NetworkFabricSkuData(id, name, type, systemData.Value, Optional.ToNullable(type0), Optional.ToNullable(maxComputeRacks), Optional.ToNullable(maximumServerCount), Optional.ToList(supportedVersions), details.Value, Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkusListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkusListResult.cs index f823e2bdfa96a..45f9d384787c3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkusListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkusListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkFabricSkus. + /// List of Network Fabric SKUs. internal partial class NetworkFabricSkusListResult { /// Initializes a new instance of NetworkFabricSkusListResult. @@ -21,7 +21,7 @@ internal NetworkFabricSkusListResult() } /// Initializes a new instance of NetworkFabricSkusListResult. - /// List of NetworkFabricSku resources. + /// List of Network Fabric SKU resources. /// Url to follow for getting next page of resources. internal NetworkFabricSkusListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal NetworkFabricSkusListResult(IReadOnlyList value, NextLink = nextLink; } - /// List of NetworkFabricSku resources. + /// List of Network Fabric SKU resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricsListResult.cs index 44b7d72dfeeb0..78b087be94c93 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricsListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkFabrics. + /// List of Network Fabrics. internal partial class NetworkFabricsListResult { /// Initializes a new instance of NetworkFabricsListResult. @@ -21,7 +21,7 @@ internal NetworkFabricsListResult() } /// Initializes a new instance of NetworkFabricsListResult. - /// List of NetworkFabric resources. + /// List of Network Fabric resources. /// Url to follow for getting next page of resources. internal NetworkFabricsListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal NetworkFabricsListResult(IReadOnlyList value, string NextLink = nextLink; } - /// List of NetworkFabric resources. + /// List of Network Fabric resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs index 1bee966a4e033..d21e949a1c2d1 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs @@ -40,12 +40,12 @@ internal static NetworkInterfaceData DeserializeNetworkInterfaceData(JsonElement Optional systemData = default; Optional annotation = default; Optional physicalIdentifier = default; - Optional administrativeState = default; - Optional provisioningState = default; Optional connectedTo = default; Optional interfaceType = default; Optional ipv4Address = default; Optional ipv6Address = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -91,24 +91,6 @@ internal static NetworkInterfaceData DeserializeNetworkInterfaceData(JsonElement physicalIdentifier = property0.Value.GetString(); continue; } - if (property0.NameEquals("administrativeState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property0.Value.GetString()); - continue; - } if (property0.NameEquals("connectedTo"u8)) { connectedTo = property0.Value.GetString(); @@ -133,11 +115,29 @@ internal static NetworkInterfaceData DeserializeNetworkInterfaceData(JsonElement ipv6Address = property0.Value.GetString(); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new NetworkInterfaceData(id, name, type, systemData.Value, annotation.Value, physicalIdentifier.Value, Optional.ToNullable(administrativeState), Optional.ToNullable(provisioningState), connectedTo.Value, Optional.ToNullable(interfaceType), ipv4Address.Value, ipv6Address.Value); + return new NetworkInterfaceData(id, name, type, systemData.Value, annotation.Value, physicalIdentifier.Value, connectedTo.Value, Optional.ToNullable(interfaceType), ipv4Address.Value, ipv6Address.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerData.Serialization.cs new file mode 100644 index 0000000000000..ca30b6834bf33 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerData.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class NetworkPacketBrokerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("networkFabricId"u8); + writer.WriteStringValue(NetworkFabricId); + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NetworkPacketBrokerData DeserializeNetworkPacketBrokerData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + ResourceIdentifier networkFabricId = default; + Optional> networkDeviceIds = default; + Optional> sourceInterfaceIds = default; + Optional> networkTapIds = default; + Optional> neighborGroupIds = default; + Optional provisioningState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("networkFabricId"u8)) + { + networkFabricId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("networkDeviceIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + networkDeviceIds = array; + continue; + } + if (property0.NameEquals("sourceInterfaceIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + sourceInterfaceIds = array; + continue; + } + if (property0.NameEquals("networkTapIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + networkTapIds = array; + continue; + } + if (property0.NameEquals("neighborGroupIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + neighborGroupIds = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkPacketBrokerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, networkFabricId, Optional.ToList(networkDeviceIds), Optional.ToList(sourceInterfaceIds), Optional.ToList(networkTapIds), Optional.ToList(neighborGroupIds), Optional.ToNullable(provisioningState)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs new file mode 100644 index 0000000000000..94dc864e9b2f6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkPacketBrokerPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.cs new file mode 100644 index 0000000000000..e63efeb029d69 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The NetworkPacketBroker patch resource definition. + public partial class NetworkPacketBrokerPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkPacketBrokerPatch. + public NetworkPacketBrokerPatch() + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs new file mode 100644 index 0000000000000..1fd329eb8d2bc --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + internal partial class NetworkPacketBrokersListResult + { + internal static NetworkPacketBrokersListResult DeserializeNetworkPacketBrokersListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new NetworkPacketBrokersListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.cs new file mode 100644 index 0000000000000..102eaa729c377 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of NetworkPacketBrokers. + internal partial class NetworkPacketBrokersListResult + { + /// Initializes a new instance of NetworkPacketBrokersListResult. + internal NetworkPacketBrokersListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkPacketBrokersListResult. + /// List of NetworkPacketBroker resources. + /// Url to follow for getting next page of resources. + internal NetworkPacketBrokersListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of NetworkPacketBroker resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackData.Serialization.cs index 1f0c0daf12af9..1f515b38de7f2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackData.Serialization.cs @@ -38,8 +38,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - writer.WritePropertyName("networkRackSku"u8); - writer.WriteStringValue(NetworkRackSku); + if (Optional.IsDefined(NetworkRackType)) + { + writer.WritePropertyName("networkRackType"u8); + writer.WriteStringValue(NetworkRackType.Value.ToString()); + } writer.WritePropertyName("networkFabricId"u8); writer.WriteStringValue(NetworkFabricId); writer.WriteEndObject(); @@ -59,9 +62,9 @@ internal static NetworkRackData DeserializeNetworkRackData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - string networkRackSku = default; - string networkFabricId = default; - Optional> networkDevices = default; + Optional networkRackType = default; + ResourceIdentifier networkFabricId = default; + Optional> networkDevices = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { @@ -122,14 +125,18 @@ internal static NetworkRackData DeserializeNetworkRackData(JsonElement element) annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("networkRackSku"u8)) + if (property0.NameEquals("networkRackType"u8)) { - networkRackSku = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRackType = new NetworkRackType(property0.Value.GetString()); continue; } if (property0.NameEquals("networkFabricId"u8)) { - networkFabricId = property0.Value.GetString(); + networkFabricId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("networkDevices"u8)) @@ -138,10 +145,17 @@ internal static NetworkRackData DeserializeNetworkRackData(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } networkDevices = array; continue; @@ -159,7 +173,7 @@ internal static NetworkRackData DeserializeNetworkRackData(JsonElement element) continue; } } - return new NetworkRackData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, networkRackSku, networkFabricId, Optional.ToList(networkDevices), Optional.ToNullable(provisioningState)); + return new NetworkRackData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(networkRackType), networkFabricId, Optional.ToList(networkDevices), Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.Serialization.cs index 99afad24d5f83..b63a3d5a07492 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.Serialization.cs @@ -15,15 +15,6 @@ public partial class NetworkRackPatch : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Properties); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Properties.ToString()).RootElement); -#endif - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.cs index d5ff93d8e2d68..40496046a2d83 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackPatch.cs @@ -5,13 +5,12 @@ #nullable disable -using System; using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The NetworkRack patch resource definition. + /// Base tracked resource type for PATCH updates. public partial class NetworkRackPatch { /// Initializes a new instance of NetworkRackPatch. @@ -20,37 +19,6 @@ public NetworkRackPatch() Tags = new ChangeTrackingDictionary(); } - /// - /// Resource properties. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Properties { get; set; } /// Resource tags. public IDictionary Tags { get; } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackRoleName.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackRoleName.cs deleted file mode 100644 index edfc5344111d2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackRoleName.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// The role of the Network Rack: Aggregate or Compute. - public readonly partial struct NetworkRackRoleName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NetworkRackRoleName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ComputeRackValue = "ComputeRack"; - private const string AggregateRackValue = "AggregateRack"; - - /// ComputeRack. - public static NetworkRackRoleName ComputeRack { get; } = new NetworkRackRoleName(ComputeRackValue); - /// AggregateRack. - public static NetworkRackRoleName AggregateRack { get; } = new NetworkRackRoleName(AggregateRackValue); - /// Determines if two values are the same. - public static bool operator ==(NetworkRackRoleName left, NetworkRackRoleName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NetworkRackRoleName left, NetworkRackRoleName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NetworkRackRoleName(string value) => new NetworkRackRoleName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NetworkRackRoleName other && Equals(other); - /// - public bool Equals(NetworkRackRoleName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.cs deleted file mode 100644 index bbe49b80e27cb..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// List of NetworkRackSkus. - internal partial class NetworkRackSkusListResult - { - /// Initializes a new instance of NetworkRackSkusListResult. - internal NetworkRackSkusListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of NetworkRackSkusListResult. - /// List of NetworkRackSku resources. - /// Url to follow for getting next page of resources. - internal NetworkRackSkusListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of NetworkRackSku resources. - public IReadOnlyList Value { get; } - /// Url to follow for getting next page of resources. - public string NextLink { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackType.cs new file mode 100644 index 0000000000000..132f7ff1d509f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Network Rack SKU name. + public readonly partial struct NetworkRackType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkRackType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AggregateValue = "Aggregate"; + private const string ComputeValue = "Compute"; + private const string CombinedValue = "Combined"; + + /// Aggregate. + public static NetworkRackType Aggregate { get; } = new NetworkRackType(AggregateValue); + /// Compute. + public static NetworkRackType Compute { get; } = new NetworkRackType(ComputeValue); + /// Combined. + public static NetworkRackType Combined { get; } = new NetworkRackType(CombinedValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkRackType left, NetworkRackType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkRackType left, NetworkRackType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkRackType(string value) => new NetworkRackType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkRackType other && Equals(other); + /// + public bool Equals(NetworkRackType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRacksListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRacksListResult.cs index 20af0fd30c60d..59f7afd314142 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRacksListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRacksListResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkRacks. + /// List of Network Racks. internal partial class NetworkRacksListResult { /// Initializes a new instance of NetworkRacksListResult. @@ -21,7 +21,7 @@ internal NetworkRacksListResult() } /// Initializes a new instance of NetworkRacksListResult. - /// List of NetworkRack resources. + /// List of Network Rack resources. /// Url to follow for getting next page of resources. internal NetworkRacksListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal NetworkRacksListResult(IReadOnlyList value, string nex NextLink = nextLink; } - /// List of NetworkRack resources. + /// List of Network Rack resources. public IReadOnlyList Value { get; } /// Url to follow for getting next page of resources. public string NextLink { get; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapData.Serialization.cs new file mode 100644 index 0000000000000..bc86a3ac75105 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapData.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class NetworkTapData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + writer.WritePropertyName("networkPacketBrokerId"u8); + writer.WriteStringValue(NetworkPacketBrokerId); + writer.WritePropertyName("destinations"u8); + writer.WriteStartArray(); + foreach (var item in Destinations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(PollingType)) + { + writer.WritePropertyName("pollingType"u8); + writer.WriteStringValue(PollingType.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NetworkTapData DeserializeNetworkTapData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional annotation = default; + ResourceIdentifier networkPacketBrokerId = default; + Optional sourceTapRuleId = default; + IList destinations = default; + Optional pollingType = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("annotation"u8)) + { + annotation = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("networkPacketBrokerId"u8)) + { + networkPacketBrokerId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("sourceTapRuleId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceTapRuleId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("destinations"u8)) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(NetworkTapPropertiesDestinationsItem.DeserializeNetworkTapPropertiesDestinationsItem(item)); + } + destinations = array; + continue; + } + if (property0.NameEquals("pollingType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pollingType = new PollingType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkTapData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, networkPacketBrokerId, sourceTapRuleId.Value, destinations, Optional.ToNullable(pollingType), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs new file mode 100644 index 0000000000000..46366c69f5a5a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(PollingType)) + { + writer.WritePropertyName("pollingType"u8); + writer.WriteStringValue(PollingType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Destinations)) + { + writer.WritePropertyName("destinations"u8); + writer.WriteStartArray(); + foreach (var item in Destinations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.cs new file mode 100644 index 0000000000000..3fdad3ec9dc11 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The NetworkFabric resource definition. + public partial class NetworkTapPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkTapPatch. + public NetworkTapPatch() + { + Destinations = new ChangeTrackingList(); + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Polling type. + public PollingType? PollingType { get; set; } + /// List of destination properties to send the filter traffic. + public IList Destinations { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.Serialization.cs new file mode 100644 index 0000000000000..4e5f1a7e4b6f0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapPatchableParametersDestinationsItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DestinationType)) + { + writer.WritePropertyName("destinationType"u8); + writer.WriteStringValue(DestinationType.Value.ToString()); + } + if (Optional.IsDefined(DestinationId)) + { + writer.WritePropertyName("destinationId"u8); + writer.WriteStringValue(DestinationId); + } + if (Optional.IsDefined(IsolationDomainProperties)) + { + writer.WritePropertyName("isolationDomainProperties"u8); + writer.WriteObjectValue(IsolationDomainProperties); + } + if (Optional.IsDefined(DestinationTapRuleId)) + { + writer.WritePropertyName("destinationTapRuleId"u8); + writer.WriteStringValue(DestinationTapRuleId); + } + writer.WriteEndObject(); + } + + internal static NetworkTapPatchableParametersDestinationsItem DeserializeNetworkTapPatchableParametersDestinationsItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional destinationType = default; + Optional destinationId = default; + Optional isolationDomainProperties = default; + Optional destinationTapRuleId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("destinationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationType = new DestinationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("destinationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isolationDomainProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationDomainProperties = IsolationDomainProperties.DeserializeIsolationDomainProperties(property.Value); + continue; + } + if (property.NameEquals("destinationTapRuleId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationTapRuleId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new NetworkTapPatchableParametersDestinationsItem(name.Value, Optional.ToNullable(destinationType), destinationId.Value, isolationDomainProperties.Value, destinationTapRuleId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.cs new file mode 100644 index 0000000000000..063cd37852468 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Destination. + public partial class NetworkTapPatchableParametersDestinationsItem : DestinationProperties + { + /// Initializes a new instance of NetworkTapPatchableParametersDestinationsItem. + public NetworkTapPatchableParametersDestinationsItem() + { + } + + /// Initializes a new instance of NetworkTapPatchableParametersDestinationsItem. + /// Destination name. + /// Type of destination. Input can be IsolationDomain or Direct. + /// The destination Id. ARM Resource ID of either NNI or Internal Networks. + /// Isolation Domain Properties. + /// ARM Resource ID of destination Tap Rule that contains match configurations. + internal NetworkTapPatchableParametersDestinationsItem(string name, DestinationType? destinationType, ResourceIdentifier destinationId, IsolationDomainProperties isolationDomainProperties, ResourceIdentifier destinationTapRuleId) : base(name, destinationType, destinationId, isolationDomainProperties, destinationTapRuleId) + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.Serialization.cs new file mode 100644 index 0000000000000..8151ee430d682 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.Serialization.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapPropertiesDestinationsItem : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DestinationType)) + { + writer.WritePropertyName("destinationType"u8); + writer.WriteStringValue(DestinationType.Value.ToString()); + } + if (Optional.IsDefined(DestinationId)) + { + writer.WritePropertyName("destinationId"u8); + writer.WriteStringValue(DestinationId); + } + if (Optional.IsDefined(IsolationDomainProperties)) + { + writer.WritePropertyName("isolationDomainProperties"u8); + writer.WriteObjectValue(IsolationDomainProperties); + } + if (Optional.IsDefined(DestinationTapRuleId)) + { + writer.WritePropertyName("destinationTapRuleId"u8); + writer.WriteStringValue(DestinationTapRuleId); + } + writer.WriteEndObject(); + } + + internal static NetworkTapPropertiesDestinationsItem DeserializeNetworkTapPropertiesDestinationsItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional destinationType = default; + Optional destinationId = default; + Optional isolationDomainProperties = default; + Optional destinationTapRuleId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("destinationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationType = new DestinationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("destinationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isolationDomainProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationDomainProperties = IsolationDomainProperties.DeserializeIsolationDomainProperties(property.Value); + continue; + } + if (property.NameEquals("destinationTapRuleId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationTapRuleId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new NetworkTapPropertiesDestinationsItem(name.Value, Optional.ToNullable(destinationType), destinationId.Value, isolationDomainProperties.Value, destinationTapRuleId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.cs new file mode 100644 index 0000000000000..5f6a74e47c54f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Destination. + public partial class NetworkTapPropertiesDestinationsItem : DestinationProperties + { + /// Initializes a new instance of NetworkTapPropertiesDestinationsItem. + public NetworkTapPropertiesDestinationsItem() + { + } + + /// Initializes a new instance of NetworkTapPropertiesDestinationsItem. + /// Destination name. + /// Type of destination. Input can be IsolationDomain or Direct. + /// The destination Id. ARM Resource ID of either NNI or Internal Networks. + /// Isolation Domain Properties. + /// ARM Resource ID of destination Tap Rule that contains match configurations. + internal NetworkTapPropertiesDestinationsItem(string name, DestinationType? destinationType, ResourceIdentifier destinationId, IsolationDomainProperties isolationDomainProperties, ResourceIdentifier destinationTapRuleId) : base(name, destinationType, destinationId, isolationDomainProperties, destinationTapRuleId) + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.Serialization.cs new file mode 100644 index 0000000000000..cca28f398ba88 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapRuleAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TapRuleActionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(TapRuleActionType.Value.ToString()); + } + if (Optional.IsDefined(Truncate)) + { + writer.WritePropertyName("truncate"u8); + writer.WriteStringValue(Truncate); + } + if (Optional.IsDefined(IsTimestampEnabled)) + { + writer.WritePropertyName("isTimestampEnabled"u8); + writer.WriteStringValue(IsTimestampEnabled.Value.ToString()); + } + if (Optional.IsDefined(DestinationId)) + { + writer.WritePropertyName("destinationId"u8); + writer.WriteStringValue(DestinationId); + } + if (Optional.IsDefined(MatchConfigurationName)) + { + writer.WritePropertyName("matchConfigurationName"u8); + writer.WriteStringValue(MatchConfigurationName); + } + writer.WriteEndObject(); + } + + internal static NetworkTapRuleAction DeserializeNetworkTapRuleAction(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional truncate = default; + Optional isTimestampEnabled = default; + Optional destinationId = default; + Optional matchConfigurationName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new TapRuleActionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("truncate"u8)) + { + truncate = property.Value.GetString(); + continue; + } + if (property.NameEquals("isTimestampEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTimestampEnabled = new BooleanEnumProperty(property.Value.GetString()); + continue; + } + if (property.NameEquals("destinationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("matchConfigurationName"u8)) + { + matchConfigurationName = property.Value.GetString(); + continue; + } + } + return new NetworkTapRuleAction(Optional.ToNullable(type), truncate.Value, Optional.ToNullable(isTimestampEnabled), destinationId.Value, matchConfigurationName.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.cs new file mode 100644 index 0000000000000..aabfe2d93f820 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Action that need to performed. + public partial class NetworkTapRuleAction + { + /// Initializes a new instance of NetworkTapRuleAction. + public NetworkTapRuleAction() + { + } + + /// Initializes a new instance of NetworkTapRuleAction. + /// Type of actions that can be performed. + /// Truncate. 0 indicates do not truncate. + /// The parameter to enable or disable the timestamp. + /// Destination Id. The ARM resource Id may be either Network To Network Interconnect or NeighborGroup. + /// The name of the match configuration. This is used when Goto type is provided. If Goto type is selected and no match configuration name is provided. It goes to next configuration. + internal NetworkTapRuleAction(TapRuleActionType? tapRuleActionType, string truncate, BooleanEnumProperty? isTimestampEnabled, ResourceIdentifier destinationId, string matchConfigurationName) + { + TapRuleActionType = tapRuleActionType; + Truncate = truncate; + IsTimestampEnabled = isTimestampEnabled; + DestinationId = destinationId; + MatchConfigurationName = matchConfigurationName; + } + + /// Type of actions that can be performed. + public TapRuleActionType? TapRuleActionType { get; set; } + /// Truncate. 0 indicates do not truncate. + public string Truncate { get; set; } + /// The parameter to enable or disable the timestamp. + public BooleanEnumProperty? IsTimestampEnabled { get; set; } + /// Destination Id. The ARM resource Id may be either Network To Network Interconnect or NeighborGroup. + public ResourceIdentifier DestinationId { get; set; } + /// The name of the match configuration. This is used when Goto type is provided. If Goto type is selected and no match configuration name is provided. It goes to next configuration. + public string MatchConfigurationName { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleData.Serialization.cs new file mode 100644 index 0000000000000..f9ea890b96e10 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleData.Serialization.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class NetworkTapRuleData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(ConfigurationType)) + { + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(TapRulesUri)) + { + writer.WritePropertyName("tapRulesUrl"u8); + writer.WriteStringValue(TapRulesUri.AbsoluteUri); + } + if (Optional.IsCollectionDefined(MatchConfigurations)) + { + writer.WritePropertyName("matchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in MatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DynamicMatchConfigurations)) + { + writer.WritePropertyName("dynamicMatchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in DynamicMatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PollingIntervalInSeconds)) + { + writer.WritePropertyName("pollingIntervalInSeconds"u8); + writer.WriteNumberValue(PollingIntervalInSeconds.Value.ToSerialInt32()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NetworkTapRuleData DeserializeNetworkTapRuleData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional annotation = default; + Optional configurationType = default; + Optional tapRulesUrl = default; + Optional> matchConfigurations = default; + Optional> dynamicMatchConfigurations = default; + Optional networkTapId = default; + Optional pollingIntervalInSeconds = default; + Optional lastSyncedTime = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("annotation"u8)) + { + annotation = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("configurationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationType = new ConfigurationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("tapRulesUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tapRulesUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("matchConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(NetworkTapRuleMatchConfiguration.DeserializeNetworkTapRuleMatchConfiguration(item)); + } + matchConfigurations = array; + continue; + } + if (property0.NameEquals("dynamicMatchConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(CommonDynamicMatchConfiguration.DeserializeCommonDynamicMatchConfiguration(item)); + } + dynamicMatchConfigurations = array; + continue; + } + if (property0.NameEquals("networkTapId"u8)) + { + networkTapId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("pollingIntervalInSeconds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pollingIntervalInSeconds = new PollingIntervalInSecond(property0.Value.GetInt32()); + continue; + } + if (property0.NameEquals("lastSyncedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSyncedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkTapRuleData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(configurationType), tapRulesUrl.Value, Optional.ToList(matchConfigurations), Optional.ToList(dynamicMatchConfigurations), networkTapId.Value, Optional.ToNullable(pollingIntervalInSeconds), Optional.ToNullable(lastSyncedTime), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.Serialization.cs new file mode 100644 index 0000000000000..b35aaf0d5f899 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapRuleMatchCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EncapsulationType)) + { + writer.WritePropertyName("encapsulationType"u8); + writer.WriteStringValue(EncapsulationType.Value.ToString()); + } + if (Optional.IsDefined(PortCondition)) + { + writer.WritePropertyName("portCondition"u8); + writer.WriteObjectValue(PortCondition); + } + if (Optional.IsCollectionDefined(ProtocolTypes)) + { + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(VlanMatchCondition)) + { + writer.WritePropertyName("vlanMatchCondition"u8); + writer.WriteObjectValue(VlanMatchCondition); + } + if (Optional.IsDefined(IPCondition)) + { + writer.WritePropertyName("ipCondition"u8); + writer.WriteObjectValue(IPCondition); + } + writer.WriteEndObject(); + } + + internal static NetworkTapRuleMatchCondition DeserializeNetworkTapRuleMatchCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional encapsulationType = default; + Optional portCondition = default; + Optional> protocolTypes = default; + Optional vlanMatchCondition = default; + Optional ipCondition = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("encapsulationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encapsulationType = new EncapsulationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("portCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + portCondition = PortCondition.DeserializePortCondition(property.Value); + continue; + } + if (property.NameEquals("protocolTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("vlanMatchCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanMatchCondition = VlanMatchCondition.DeserializeVlanMatchCondition(property.Value); + continue; + } + if (property.NameEquals("ipCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipCondition = IPMatchCondition.DeserializeIPMatchCondition(property.Value); + continue; + } + } + return new NetworkTapRuleMatchCondition(Optional.ToList(protocolTypes), vlanMatchCondition.Value, ipCondition.Value, Optional.ToNullable(encapsulationType), portCondition.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.cs new file mode 100644 index 0000000000000..fb2cb76b000d9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the match condition that is supported to filter the traffic. + public partial class NetworkTapRuleMatchCondition : CommonMatchConditions + { + /// Initializes a new instance of NetworkTapRuleMatchCondition. + public NetworkTapRuleMatchCondition() + { + } + + /// Initializes a new instance of NetworkTapRuleMatchCondition. + /// List of the protocols that need to be matched. + /// Vlan match condition that needs to be matched. + /// IP condition that needs to be matched. + /// Encapsulation Type that needs to be matched. + /// Defines the port condition that needs to be matched. + internal NetworkTapRuleMatchCondition(IList protocolTypes, VlanMatchCondition vlanMatchCondition, IPMatchCondition ipCondition, EncapsulationType? encapsulationType, PortCondition portCondition) : base(protocolTypes, vlanMatchCondition, ipCondition) + { + EncapsulationType = encapsulationType; + PortCondition = portCondition; + } + + /// Encapsulation Type that needs to be matched. + public EncapsulationType? EncapsulationType { get; set; } + /// Defines the port condition that needs to be matched. + public PortCondition PortCondition { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.Serialization.cs new file mode 100644 index 0000000000000..764d21c7bc462 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapRuleMatchConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MatchConfigurationName)) + { + writer.WritePropertyName("matchConfigurationName"u8); + writer.WriteStringValue(MatchConfigurationName); + } + if (Optional.IsDefined(SequenceNumber)) + { + writer.WritePropertyName("sequenceNumber"u8); + writer.WriteNumberValue(SequenceNumber.Value); + } + if (Optional.IsDefined(IPAddressType)) + { + writer.WritePropertyName("ipAddressType"u8); + writer.WriteStringValue(IPAddressType.Value.ToString()); + } + if (Optional.IsCollectionDefined(MatchConditions)) + { + writer.WritePropertyName("matchConditions"u8); + writer.WriteStartArray(); + foreach (var item in MatchConditions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteStartArray(); + foreach (var item in Actions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static NetworkTapRuleMatchConfiguration DeserializeNetworkTapRuleMatchConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional matchConfigurationName = default; + Optional sequenceNumber = default; + Optional ipAddressType = default; + Optional> matchConditions = default; + Optional> actions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("matchConfigurationName"u8)) + { + matchConfigurationName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sequenceNumber"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sequenceNumber = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("ipAddressType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipAddressType = new IPAddressType(property.Value.GetString()); + continue; + } + if (property.NameEquals("matchConditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkTapRuleMatchCondition.DeserializeNetworkTapRuleMatchCondition(item)); + } + matchConditions = array; + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkTapRuleAction.DeserializeNetworkTapRuleAction(item)); + } + actions = array; + continue; + } + } + return new NetworkTapRuleMatchConfiguration(matchConfigurationName.Value, Optional.ToNullable(sequenceNumber), Optional.ToNullable(ipAddressType), Optional.ToList(matchConditions), Optional.ToList(actions)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.cs new file mode 100644 index 0000000000000..2bec94eb11172 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Defines the match configuration that are supported to filter the traffic. + public partial class NetworkTapRuleMatchConfiguration + { + /// Initializes a new instance of NetworkTapRuleMatchConfiguration. + public NetworkTapRuleMatchConfiguration() + { + MatchConditions = new ChangeTrackingList(); + Actions = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkTapRuleMatchConfiguration. + /// The name of the match configuration. + /// Sequence Number of the match configuration.. + /// Type of IP Address. IPv4 or IPv6. + /// List of the match conditions. + /// List of actions that need to be performed for the matched conditions. + internal NetworkTapRuleMatchConfiguration(string matchConfigurationName, long? sequenceNumber, IPAddressType? ipAddressType, IList matchConditions, IList actions) + { + MatchConfigurationName = matchConfigurationName; + SequenceNumber = sequenceNumber; + IPAddressType = ipAddressType; + MatchConditions = matchConditions; + Actions = actions; + } + + /// The name of the match configuration. + public string MatchConfigurationName { get; set; } + /// Sequence Number of the match configuration.. + public long? SequenceNumber { get; set; } + /// Type of IP Address. IPv4 or IPv6. + public IPAddressType? IPAddressType { get; set; } + /// List of the match conditions. + public IList MatchConditions { get; } + /// List of actions that need to be performed for the matched conditions. + public IList Actions { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.Serialization.cs new file mode 100644 index 0000000000000..55a7913e1bee3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkTapRulePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + if (Optional.IsDefined(ConfigurationType)) + { + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(TapRulesUri)) + { + writer.WritePropertyName("tapRulesUrl"u8); + writer.WriteStringValue(TapRulesUri.AbsoluteUri); + } + if (Optional.IsCollectionDefined(MatchConfigurations)) + { + writer.WritePropertyName("matchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in MatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DynamicMatchConfigurations)) + { + writer.WritePropertyName("dynamicMatchConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in DynamicMatchConfigurations) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.cs new file mode 100644 index 0000000000000..0714a785d6326 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The NetworkTapRule resource definition. + public partial class NetworkTapRulePatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkTapRulePatch. + public NetworkTapRulePatch() + { + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Input method to configure Network Tap Rule. + public ConfigurationType? ConfigurationType { get; set; } + /// Network Tap Rules file URL. + public Uri TapRulesUri { get; set; } + /// List of match configurations. + public IList MatchConfigurations { get; } + /// List of dynamic match configurations. + public IList DynamicMatchConfigurations { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.Serialization.cs similarity index 72% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.Serialization.cs index 6cbb7b0b8b719..cef0570dc15d0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - internal partial class NetworkRackSkusListResult + internal partial class NetworkTapRulesListResult { - internal static NetworkRackSkusListResult DeserializeNetworkRackSkusListResult(JsonElement element) + internal static NetworkTapRulesListResult DeserializeNetworkTapRulesListResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static NetworkRackSkusListResult DeserializeNetworkRackSkusListResult(J { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NetworkRackSkuData.DeserializeNetworkRackSkuData(item)); + array.Add(NetworkTapRuleData.DeserializeNetworkTapRuleData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static NetworkRackSkusListResult DeserializeNetworkRackSkusListResult(J continue; } } - return new NetworkRackSkusListResult(Optional.ToList(value), nextLink.Value); + return new NetworkTapRulesListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.cs new file mode 100644 index 0000000000000..eeeef068c3f47 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of NetworkTapRules. + internal partial class NetworkTapRulesListResult + { + /// Initializes a new instance of NetworkTapRulesListResult. + internal NetworkTapRulesListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkTapRulesListResult. + /// List of NetworkTapRule resources. + /// Url to follow for getting next page of resources. + internal NetworkTapRulesListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of NetworkTapRule resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs new file mode 100644 index 0000000000000..c935e40622872 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + internal partial class NetworkTapsListResult + { + internal static NetworkTapsListResult DeserializeNetworkTapsListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkTapData.DeserializeNetworkTapData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new NetworkTapsListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.cs new file mode 100644 index 0000000000000..ca15fd71a605c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// List of NetworkTaps. + internal partial class NetworkTapsListResult + { + /// Initializes a new instance of NetworkTapsListResult. + internal NetworkTapsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkTapsListResult. + /// List of NetworkTap resources. + /// Url to follow for getting next page of resources. + internal NetworkTapsListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of NetworkTap resources. + public IReadOnlyList Value { get; } + /// Url to follow for getting next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectData.Serialization.cs index fca18b098c35f..4675c32032cfc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectData.Serialization.cs @@ -29,20 +29,42 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("isManagementType"u8); writer.WriteStringValue(IsManagementType.Value.ToString()); } - if (Optional.IsDefined(UseOptionB)) - { - writer.WritePropertyName("useOptionB"u8); - writer.WriteStringValue(UseOptionB.Value.ToString()); - } + writer.WritePropertyName("useOptionB"u8); + writer.WriteStringValue(UseOptionB.ToString()); if (Optional.IsDefined(Layer2Configuration)) { writer.WritePropertyName("layer2Configuration"u8); writer.WriteObjectValue(Layer2Configuration); } - if (Optional.IsDefined(Layer3Configuration)) + if (Optional.IsDefined(OptionBLayer3Configuration)) + { + writer.WritePropertyName("optionBLayer3Configuration"u8); + writer.WriteObjectValue(OptionBLayer3Configuration); + } + if (Optional.IsDefined(NpbStaticRouteConfiguration)) + { + writer.WritePropertyName("npbStaticRouteConfiguration"u8); + writer.WriteObjectValue(NpbStaticRouteConfiguration); + } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) { - writer.WritePropertyName("layer3Configuration"u8); - writer.WriteObjectValue(Layer3Configuration); + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); } writer.WriteEndObject(); writer.WriteEndObject(); @@ -59,12 +81,18 @@ internal static NetworkToNetworkInterconnectData DeserializeNetworkToNetworkInte ResourceType type = default; Optional systemData = default; Optional nniType = default; - Optional administrativeState = default; - Optional isManagementType = default; - Optional useOptionB = default; + Optional isManagementType = default; + BooleanEnumProperty useOptionB = default; Optional layer2Configuration = default; - Optional layer3Configuration = default; + Optional optionBLayer3Configuration = default; + Optional npbStaticRouteConfiguration = default; + Optional importRoutePolicy = default; + Optional exportRoutePolicy = default; + Optional egressAclId = default; + Optional ingressAclId = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -109,49 +137,90 @@ internal static NetworkToNetworkInterconnectData DeserializeNetworkToNetworkInte nniType = new NniType(property0.Value.GetString()); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("isManagementType"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + isManagementType = new IsManagementType(property0.Value.GetString()); continue; } - if (property0.NameEquals("isManagementType"u8)) + if (property0.NameEquals("useOptionB"u8)) + { + useOptionB = new BooleanEnumProperty(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("layer2Configuration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - isManagementType = new BooleanEnumProperty(property0.Value.GetString()); + layer2Configuration = Layer2Configuration.DeserializeLayer2Configuration(property0.Value); continue; } - if (property0.NameEquals("useOptionB"u8)) + if (property0.NameEquals("optionBLayer3Configuration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - useOptionB = new BooleanEnumProperty(property0.Value.GetString()); + optionBLayer3Configuration = NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.DeserializeNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(property0.Value); continue; } - if (property0.NameEquals("layer2Configuration"u8)) + if (property0.NameEquals("npbStaticRouteConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - layer2Configuration = Layer2Configuration.DeserializeLayer2Configuration(property0.Value); + npbStaticRouteConfiguration = NpbStaticRouteConfiguration.DeserializeNpbStaticRouteConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("importRoutePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importRoutePolicy = ImportRoutePolicyInformation.DeserializeImportRoutePolicyInformation(property0.Value); + continue; + } + if (property0.NameEquals("exportRoutePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportRoutePolicy = ExportRoutePolicyInformation.DeserializeExportRoutePolicyInformation(property0.Value); + continue; + } + if (property0.NameEquals("egressAclId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + egressAclId = new ResourceIdentifier(property0.Value.GetString()); continue; } - if (property0.NameEquals("layer3Configuration"u8)) + if (property0.NameEquals("ingressAclId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - layer3Configuration = Layer3Configuration.DeserializeLayer3Configuration(property0.Value); + ingressAclId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -163,11 +232,20 @@ internal static NetworkToNetworkInterconnectData DeserializeNetworkToNetworkInte provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new NetworkToNetworkInterconnectData(id, name, type, systemData.Value, Optional.ToNullable(nniType), Optional.ToNullable(administrativeState), Optional.ToNullable(isManagementType), Optional.ToNullable(useOptionB), layer2Configuration.Value, layer3Configuration.Value, Optional.ToNullable(provisioningState)); + return new NetworkToNetworkInterconnectData(id, name, type, systemData.Value, Optional.ToNullable(nniType), Optional.ToNullable(isManagementType), useOptionB, layer2Configuration.Value, optionBLayer3Configuration.Value, npbStaticRouteConfiguration.Value, importRoutePolicy.Value, exportRoutePolicy.Value, egressAclId.Value, ingressAclId.Value, Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.Serialization.cs new file mode 100644 index 0000000000000..92308fa024d3b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkToNetworkInterconnectPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Layer2Configuration)) + { + writer.WritePropertyName("layer2Configuration"u8); + writer.WriteObjectValue(Layer2Configuration); + } + if (Optional.IsDefined(OptionBLayer3Configuration)) + { + writer.WritePropertyName("optionBLayer3Configuration"u8); + writer.WriteObjectValue(OptionBLayer3Configuration); + } + if (Optional.IsDefined(NpbStaticRouteConfiguration)) + { + writer.WritePropertyName("npbStaticRouteConfiguration"u8); + writer.WriteObjectValue(NpbStaticRouteConfiguration); + } + if (Optional.IsDefined(ImportRoutePolicy)) + { + writer.WritePropertyName("importRoutePolicy"u8); + writer.WriteObjectValue(ImportRoutePolicy); + } + if (Optional.IsDefined(ExportRoutePolicy)) + { + writer.WritePropertyName("exportRoutePolicy"u8); + writer.WriteObjectValue(ExportRoutePolicy); + } + if (Optional.IsDefined(EgressAclId)) + { + writer.WritePropertyName("egressAclId"u8); + writer.WriteStringValue(EgressAclId); + } + if (Optional.IsDefined(IngressAclId)) + { + writer.WritePropertyName("ingressAclId"u8); + writer.WriteStringValue(IngressAclId); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NetworkToNetworkInterconnectPatch DeserializeNetworkToNetworkInterconnectPatch(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional layer2Configuration = default; + Optional optionBLayer3Configuration = default; + Optional npbStaticRouteConfiguration = default; + Optional importRoutePolicy = default; + Optional exportRoutePolicy = default; + Optional egressAclId = default; + Optional ingressAclId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("layer2Configuration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + layer2Configuration = Layer2Configuration.DeserializeLayer2Configuration(property0.Value); + continue; + } + if (property0.NameEquals("optionBLayer3Configuration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optionBLayer3Configuration = OptionBLayer3Configuration.DeserializeOptionBLayer3Configuration(property0.Value); + continue; + } + if (property0.NameEquals("npbStaticRouteConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + npbStaticRouteConfiguration = NpbStaticRouteConfiguration.DeserializeNpbStaticRouteConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("importRoutePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + importRoutePolicy = ImportRoutePolicyInformation.DeserializeImportRoutePolicyInformation(property0.Value); + continue; + } + if (property0.NameEquals("exportRoutePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportRoutePolicy = ExportRoutePolicyInformation.DeserializeExportRoutePolicyInformation(property0.Value); + continue; + } + if (property0.NameEquals("egressAclId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + egressAclId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("ingressAclId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ingressAclId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkToNetworkInterconnectPatch(id, name, type, systemData.Value, layer2Configuration.Value, optionBLayer3Configuration.Value, npbStaticRouteConfiguration.Value, importRoutePolicy.Value, exportRoutePolicy.Value, egressAclId.Value, ingressAclId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.cs new file mode 100644 index 0000000000000..f7061bd1ee78d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The Network To Network Interconnect resource patch definition. + public partial class NetworkToNetworkInterconnectPatch : ResourceData + { + /// Initializes a new instance of NetworkToNetworkInterconnectPatch. + public NetworkToNetworkInterconnectPatch() + { + } + + /// Initializes a new instance of NetworkToNetworkInterconnectPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Common properties for Layer2Configuration. + /// Common properties for Layer3Configuration. + /// NPB Static Route Configuration properties. + /// Import Route Policy information. + /// Export Route Policy information. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// Ingress Acl. ARM resource ID of Access Control Lists. + internal NetworkToNetworkInterconnectPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Layer2Configuration layer2Configuration, OptionBLayer3Configuration optionBLayer3Configuration, NpbStaticRouteConfiguration npbStaticRouteConfiguration, ImportRoutePolicyInformation importRoutePolicy, ExportRoutePolicyInformation exportRoutePolicy, ResourceIdentifier egressAclId, ResourceIdentifier ingressAclId) : base(id, name, resourceType, systemData) + { + Layer2Configuration = layer2Configuration; + OptionBLayer3Configuration = optionBLayer3Configuration; + NpbStaticRouteConfiguration = npbStaticRouteConfiguration; + ImportRoutePolicy = importRoutePolicy; + ExportRoutePolicy = exportRoutePolicy; + EgressAclId = egressAclId; + IngressAclId = ingressAclId; + } + + /// Common properties for Layer2Configuration. + public Layer2Configuration Layer2Configuration { get; set; } + /// Common properties for Layer3Configuration. + public OptionBLayer3Configuration OptionBLayer3Configuration { get; set; } + /// NPB Static Route Configuration properties. + public NpbStaticRouteConfiguration NpbStaticRouteConfiguration { get; set; } + /// Import Route Policy information. + public ImportRoutePolicyInformation ImportRoutePolicy { get; set; } + /// Export Route Policy information. + public ExportRoutePolicyInformation ExportRoutePolicy { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.Serialization.cs similarity index 70% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.Serialization.cs index 42a877906ab56..33d76ed7b1c8d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.Serialization.cs @@ -10,21 +10,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class Layer3Configuration : IUtf8JsonSerializable + public partial class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(ImportRoutePolicyId)) - { - writer.WritePropertyName("importRoutePolicyId"u8); - writer.WriteStringValue(ImportRoutePolicyId); - } - if (Optional.IsDefined(ExportRoutePolicyId)) - { - writer.WritePropertyName("exportRoutePolicyId"u8); - writer.WriteStringValue(ExportRoutePolicyId); - } if (Optional.IsDefined(PeerASN)) { writer.WritePropertyName("peerASN"u8); @@ -58,40 +48,28 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static Layer3Configuration DeserializeLayer3Configuration(JsonElement element) + internal static NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration DeserializeNetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional importRoutePolicyId = default; - Optional exportRoutePolicyId = default; - Optional peerASN = default; + Optional peerASN = default; Optional vlanId = default; - Optional fabricASN = default; + Optional fabricASN = default; Optional primaryIPv4Prefix = default; Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; Optional secondaryIPv6Prefix = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("importRoutePolicyId"u8)) - { - importRoutePolicyId = property.Value.GetString(); - continue; - } - if (property.NameEquals("exportRoutePolicyId"u8)) - { - exportRoutePolicyId = property.Value.GetString(); - continue; - } if (property.NameEquals("peerASN"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - peerASN = property.Value.GetInt32(); + peerASN = property.Value.GetInt64(); continue; } if (property.NameEquals("vlanId"u8)) @@ -109,7 +87,7 @@ internal static Layer3Configuration DeserializeLayer3Configuration(JsonElement e { continue; } - fabricASN = property.Value.GetInt32(); + fabricASN = property.Value.GetInt64(); continue; } if (property.NameEquals("primaryIpv4Prefix"u8)) @@ -133,7 +111,7 @@ internal static Layer3Configuration DeserializeLayer3Configuration(JsonElement e continue; } } - return new Layer3Configuration(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, importRoutePolicyId.Value, exportRoutePolicyId.Value, Optional.ToNullable(peerASN), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN)); + return new NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(peerASN), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.cs new file mode 100644 index 0000000000000..515fa985e1e7f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Common properties for Layer3Configuration. + public partial class NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration : OptionBLayer3Configuration + { + /// Initializes a new instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration. + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration() + { + } + + /// Initializes a new instance of NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + /// ASN of PE devices for CE/PE connectivity.Example : 28. + /// VLAN for CE/PE Layer 3 connectivity.Example : 501. + /// ASN of CE devices for CE/PE connectivity. + internal NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, long? peerASN, int? vlanId, long? fabricASN) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, peerASN, vlanId, fabricASN) + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectsList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectsList.cs index 6f5584add2625..b293a3db47eaa 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectsList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectsList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of NetworkToNetworkInterconnects. + /// List of Network To Network Interconnects. internal partial class NetworkToNetworkInterconnectsList { /// Initializes a new instance of NetworkToNetworkInterconnectsList. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NfcSku.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NfcSku.cs new file mode 100644 index 0000000000000..e4adc9c06549c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NfcSku.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Network Fabric Controller SKU. + public readonly partial struct NfcSku : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NfcSku(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BasicValue = "Basic"; + private const string StandardValue = "Standard"; + private const string HighPerformanceValue = "HighPerformance"; + + /// Basic. + public static NfcSku Basic { get; } = new NfcSku(BasicValue); + /// Standard. + public static NfcSku Standard { get; } = new NfcSku(StandardValue); + /// HighPerformance. + public static NfcSku HighPerformance { get; } = new NfcSku(HighPerformanceValue); + /// Determines if two values are the same. + public static bool operator ==(NfcSku left, NfcSku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NfcSku left, NfcSku right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NfcSku(string value) => new NfcSku(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NfcSku other && Equals(other); + /// + public bool Equals(NfcSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.Serialization.cs new file mode 100644 index 0000000000000..3e3fbce73973c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NpbStaticRouteConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } + if (Optional.IsCollectionDefined(IPv4Routes)) + { + writer.WritePropertyName("ipv4Routes"u8); + writer.WriteStartArray(); + foreach (var item in IPv4Routes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(IPv6Routes)) + { + writer.WritePropertyName("ipv6Routes"u8); + writer.WriteStartArray(); + foreach (var item in IPv6Routes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static NpbStaticRouteConfiguration DeserializeNpbStaticRouteConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional bfdConfiguration = default; + Optional> ipv4Routes = default; + Optional> ipv6Routes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bfdConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); + continue; + } + if (property.NameEquals("ipv4Routes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticRouteProperties.DeserializeStaticRouteProperties(item)); + } + ipv4Routes = array; + continue; + } + if (property.NameEquals("ipv6Routes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticRouteProperties.DeserializeStaticRouteProperties(item)); + } + ipv6Routes = array; + continue; + } + } + return new NpbStaticRouteConfiguration(bfdConfiguration.Value, Optional.ToList(ipv4Routes), Optional.ToList(ipv6Routes)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.cs new file mode 100644 index 0000000000000..e06b81dfe894d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// NPB Static Route Configuration properties. + public partial class NpbStaticRouteConfiguration + { + /// Initializes a new instance of NpbStaticRouteConfiguration. + public NpbStaticRouteConfiguration() + { + IPv4Routes = new ChangeTrackingList(); + IPv6Routes = new ChangeTrackingList(); + } + + /// Initializes a new instance of NpbStaticRouteConfiguration. + /// BFD Configuration properties. + /// List of IPv4 Routes. + /// List of IPv6 Routes. + internal NpbStaticRouteConfiguration(BfdConfiguration bfdConfiguration, IList ipv4Routes, IList ipv6Routes) + { + BfdConfiguration = bfdConfiguration; + IPv4Routes = ipv4Routes; + IPv6Routes = ipv6Routes; + } + + /// BFD Configuration properties. + public BfdConfiguration BfdConfiguration { get; set; } + /// List of IPv4 Routes. + public IList IPv4Routes { get; } + /// List of IPv6 Routes. + public IList IPv6Routes { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OperationalStatus.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OperationalStatus.cs deleted file mode 100644 index 41cb4de795845..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OperationalStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Primary or Secondary power end. - public readonly partial struct OperationalStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OperationalStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BootedValue = "Booted"; - private const string BootPromptValue = "BootPrompt"; - private const string ZtpValue = "Ztp"; - - /// Booted. - public static OperationalStatus Booted { get; } = new OperationalStatus(BootedValue); - /// BootPrompt. - public static OperationalStatus BootPrompt { get; } = new OperationalStatus(BootPromptValue); - /// Ztp. - public static OperationalStatus Ztp { get; } = new OperationalStatus(ZtpValue); - /// Determines if two values are the same. - public static bool operator ==(OperationalStatus left, OperationalStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OperationalStatus left, OperationalStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OperationalStatus(string value) => new OperationalStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperationalStatus other && Equals(other); - /// - public bool Equals(OperationalStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.Serialization.cs new file mode 100644 index 0000000000000..d067e12774c71 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class OptionAProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mtu)) + { + writer.WritePropertyName("mtu"u8); + writer.WriteNumberValue(Mtu.Value); + } + if (Optional.IsDefined(VlanId)) + { + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId.Value); + } + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } + writer.WriteEndObject(); + } + + internal static OptionAProperties DeserializeOptionAProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional mtu = default; + Optional vlanId = default; + Optional peerASN = default; + Optional bfdConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mtu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mtu = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vlanId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("peerASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("bfdConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); + continue; + } + } + return new OptionAProperties(Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(peerASN), bfdConfiguration.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.cs new file mode 100644 index 0000000000000..99254d5565281 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Peering optionA properties. + public partial class OptionAProperties + { + /// Initializes a new instance of OptionAProperties. + public OptionAProperties() + { + } + + /// Initializes a new instance of OptionAProperties. + /// MTU to use for option A peering. + /// Vlan Id.Example : 501. + /// Peer ASN number.Example : 28. + /// BFD Configuration properties. + internal OptionAProperties(int? mtu, int? vlanId, long? peerASN, BfdConfiguration bfdConfiguration) + { + Mtu = mtu; + VlanId = vlanId; + PeerASN = peerASN; + BfdConfiguration = bfdConfiguration; + } + + /// MTU to use for option A peering. + public int? Mtu { get; set; } + /// Vlan Id.Example : 501. + public int? VlanId { get; set; } + /// Peer ASN number.Example : 28. + public long? PeerASN { get; set; } + /// BFD Configuration properties. + public BfdConfiguration BfdConfiguration { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.Serialization.cs new file mode 100644 index 0000000000000..d69968a932e24 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class OptionBLayer3Configuration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsDefined(VlanId)) + { + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId.Value); + } + if (Optional.IsDefined(PrimaryIPv4Prefix)) + { + writer.WritePropertyName("primaryIpv4Prefix"u8); + writer.WriteStringValue(PrimaryIPv4Prefix); + } + if (Optional.IsDefined(PrimaryIPv6Prefix)) + { + writer.WritePropertyName("primaryIpv6Prefix"u8); + writer.WriteStringValue(PrimaryIPv6Prefix); + } + if (Optional.IsDefined(SecondaryIPv4Prefix)) + { + writer.WritePropertyName("secondaryIpv4Prefix"u8); + writer.WriteStringValue(SecondaryIPv4Prefix); + } + if (Optional.IsDefined(SecondaryIPv6Prefix)) + { + writer.WritePropertyName("secondaryIpv6Prefix"u8); + writer.WriteStringValue(SecondaryIPv6Prefix); + } + writer.WriteEndObject(); + } + + internal static OptionBLayer3Configuration DeserializeOptionBLayer3Configuration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional peerASN = default; + Optional vlanId = default; + Optional fabricASN = default; + Optional primaryIPv4Prefix = default; + Optional primaryIPv6Prefix = default; + Optional secondaryIPv4Prefix = default; + Optional secondaryIPv6Prefix = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("peerASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peerASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("vlanId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vlanId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("fabricASN"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricASN = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("primaryIpv4Prefix"u8)) + { + primaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryIpv6Prefix"u8)) + { + primaryIPv6Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv4Prefix"u8)) + { + secondaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv6Prefix"u8)) + { + secondaryIPv6Prefix = property.Value.GetString(); + continue; + } + } + return new OptionBLayer3Configuration(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(peerASN), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.cs new file mode 100644 index 0000000000000..5caf099a36055 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// OptionB Layer3 Configuration properties. + public partial class OptionBLayer3Configuration : Layer3IPPrefixProperties + { + /// Initializes a new instance of OptionBLayer3Configuration. + public OptionBLayer3Configuration() + { + } + + /// Initializes a new instance of OptionBLayer3Configuration. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + /// ASN of PE devices for CE/PE connectivity.Example : 28. + /// VLAN for CE/PE Layer 3 connectivity.Example : 501. + /// ASN of CE devices for CE/PE connectivity. + internal OptionBLayer3Configuration(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, long? peerASN, int? vlanId, long? fabricASN) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) + { + PeerASN = peerASN; + VlanId = vlanId; + FabricASN = fabricASN; + } + + /// ASN of PE devices for CE/PE connectivity.Example : 28. + public long? PeerASN { get; set; } + /// VLAN for CE/PE Layer 3 connectivity.Example : 501. + public int? VlanId { get; set; } + /// ASN of CE devices for CE/PE connectivity. + public long? FabricASN { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.Serialization.cs index 16876d1ad332e..05b5023ea7f05 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.Serialization.cs @@ -36,6 +36,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } + if (Optional.IsDefined(RouteTargets)) + { + writer.WritePropertyName("routeTargets"u8); + writer.WriteObjectValue(RouteTargets); + } writer.WriteEndObject(); } @@ -47,6 +52,7 @@ internal static OptionBProperties DeserializeOptionBProperties(JsonElement eleme } Optional> importRouteTargets = default; Optional> exportRouteTargets = default; + Optional routeTargets = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("importRouteTargets"u8)) @@ -77,8 +83,17 @@ internal static OptionBProperties DeserializeOptionBProperties(JsonElement eleme exportRouteTargets = array; continue; } + if (property.NameEquals("routeTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + routeTargets = RouteTargetInformation.DeserializeRouteTargetInformation(property.Value); + continue; + } } - return new OptionBProperties(Optional.ToList(importRouteTargets), Optional.ToList(exportRouteTargets)); + return new OptionBProperties(Optional.ToList(importRouteTargets), Optional.ToList(exportRouteTargets), routeTargets.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.cs index 58307d2b37254..3533ecbb2543f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Option B configuration. + /// Option B configuration to be used for Management VPN. public partial class OptionBProperties { /// Initializes a new instance of OptionBProperties. @@ -21,17 +21,21 @@ public OptionBProperties() } /// Initializes a new instance of OptionBProperties. - /// Route Targets to be applied for incoming routes into CE. - /// Route Targets to be applied for outgoing routes from CE. - internal OptionBProperties(IList importRouteTargets, IList exportRouteTargets) + /// Route Targets to be applied for incoming routes into CE. This is for backward compatibility. + /// Route Targets to be applied for outgoing routes from CE. This is for backward compatibility. + /// Route Targets to be applied. + internal OptionBProperties(IList importRouteTargets, IList exportRouteTargets, RouteTargetInformation routeTargets) { ImportRouteTargets = importRouteTargets; ExportRouteTargets = exportRouteTargets; + RouteTargets = routeTargets; } - /// Route Targets to be applied for incoming routes into CE. + /// Route Targets to be applied for incoming routes into CE. This is for backward compatibility. public IList ImportRouteTargets { get; } - /// Route Targets to be applied for outgoing routes from CE. + /// Route Targets to be applied for outgoing routes from CE. This is for backward compatibility. public IList ExportRouteTargets { get; } + /// Route Targets to be applied. + public RouteTargetInformation RouteTargets { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingIntervalInSecond.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingIntervalInSecond.cs new file mode 100644 index 0000000000000..14e9b3a56f75b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingIntervalInSecond.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using System.Globalization; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Polling interval in seconds. + public readonly partial struct PollingIntervalInSecond : IEquatable + { + private readonly int _value; + + /// Initializes a new instance of . + public PollingIntervalInSecond(int value) + { + _value = value; + } + + private const int ThirtyValue = 30; + private const int SixtyValue = 60; + private const int NinetyValue = 90; + private const int OneHundredTwentyValue = 120; + + /// 30. + public static PollingIntervalInSecond Thirty { get; } = new PollingIntervalInSecond(ThirtyValue); + /// 60. + public static PollingIntervalInSecond Sixty { get; } = new PollingIntervalInSecond(SixtyValue); + /// 90. + public static PollingIntervalInSecond Ninety { get; } = new PollingIntervalInSecond(NinetyValue); + /// 120. + public static PollingIntervalInSecond OneHundredTwenty { get; } = new PollingIntervalInSecond(OneHundredTwentyValue); + + internal int ToSerialInt32() => _value; + + /// Determines if two values are the same. + public static bool operator ==(PollingIntervalInSecond left, PollingIntervalInSecond right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PollingIntervalInSecond left, PollingIntervalInSecond right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PollingIntervalInSecond(int value) => new PollingIntervalInSecond(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PollingIntervalInSecond other && Equals(other); + /// + public bool Equals(PollingIntervalInSecond other) => Equals(_value, other._value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value.GetHashCode(); + /// + public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingType.cs new file mode 100644 index 0000000000000..97c40306a8ef0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Polling type. + public readonly partial struct PollingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PollingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PullValue = "Pull"; + private const string PushValue = "Push"; + + /// Pull. + public static PollingType Pull { get; } = new PollingType(PullValue); + /// Push. + public static PollingType Push { get; } = new PollingType(PushValue); + /// Determines if two values are the same. + public static bool operator ==(PollingType left, PollingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PollingType left, PollingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PollingType(string value) => new PollingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PollingType other && Equals(other); + /// + public bool Equals(PollingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.Serialization.cs new file mode 100644 index 0000000000000..37addb390d03e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class PortCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PortType)) + { + writer.WritePropertyName("portType"u8); + writer.WriteStringValue(PortType.Value.ToString()); + } + writer.WritePropertyName("layer4Protocol"u8); + writer.WriteStringValue(Layer4Protocol.ToString()); + if (Optional.IsCollectionDefined(Ports)) + { + writer.WritePropertyName("ports"u8); + writer.WriteStartArray(); + foreach (var item in Ports) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PortGroupNames)) + { + writer.WritePropertyName("portGroupNames"u8); + writer.WriteStartArray(); + foreach (var item in PortGroupNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static PortCondition DeserializePortCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional portType = default; + Layer4Protocol layer4Protocol = default; + Optional> ports = default; + Optional> portGroupNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("portType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + portType = new PortType(property.Value.GetString()); + continue; + } + if (property.NameEquals("layer4Protocol"u8)) + { + layer4Protocol = new Layer4Protocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("ports"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ports = array; + continue; + } + if (property.NameEquals("portGroupNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + portGroupNames = array; + continue; + } + } + return new PortCondition(Optional.ToNullable(portType), layer4Protocol, Optional.ToList(ports), Optional.ToList(portGroupNames)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.cs new file mode 100644 index 0000000000000..b91d9c93ad951 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortCondition.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Port condition that needs to be matched. + public partial class PortCondition + { + /// Initializes a new instance of PortCondition. + /// Layer4 protocol type that needs to be matched. + public PortCondition(Layer4Protocol layer4Protocol) + { + Layer4Protocol = layer4Protocol; + Ports = new ChangeTrackingList(); + PortGroupNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of PortCondition. + /// Port type that needs to be matched. + /// Layer4 protocol type that needs to be matched. + /// List of the Ports that need to be matched. + /// List of the port Group Names that need to be matched. + internal PortCondition(PortType? portType, Layer4Protocol layer4Protocol, IList ports, IList portGroupNames) + { + PortType = portType; + Layer4Protocol = layer4Protocol; + Ports = ports; + PortGroupNames = portGroupNames; + } + + /// Port type that needs to be matched. + public PortType? PortType { get; set; } + /// Layer4 protocol type that needs to be matched. + public Layer4Protocol Layer4Protocol { get; set; } + /// List of the Ports that need to be matched. + public IList Ports { get; } + /// List of the port Group Names that need to be matched. + public IList PortGroupNames { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.Serialization.cs new file mode 100644 index 0000000000000..05f5b933bed1f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class PortGroupProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Ports)) + { + writer.WritePropertyName("ports"u8); + writer.WriteStartArray(); + foreach (var item in Ports) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static PortGroupProperties DeserializePortGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional> ports = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("ports"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ports = array; + continue; + } + } + return new PortGroupProperties(name.Value, Optional.ToList(ports)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.cs new file mode 100644 index 0000000000000..23e4855f63af6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Port Group properties. + public partial class PortGroupProperties + { + /// Initializes a new instance of PortGroupProperties. + public PortGroupProperties() + { + Ports = new ChangeTrackingList(); + } + + /// Initializes a new instance of PortGroupProperties. + /// The name of the port group. + /// List of the ports that need to be matched. + internal PortGroupProperties(string name, IList ports) + { + Name = name; + Ports = ports; + } + + /// The name of the port group. + public string Name { get; set; } + /// List of the ports that need to be matched. + public IList Ports { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortType.cs new file mode 100644 index 0000000000000..8ec8b48f19338 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Port type that needs to be matched. + public readonly partial struct PortType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PortType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SourcePortValue = "SourcePort"; + private const string DestinationPortValue = "DestinationPort"; + + /// SourcePort. + public static PortType SourcePort { get; } = new PortType(SourcePortValue); + /// DestinationPort. + public static PortType DestinationPort { get; } = new PortType(DestinationPortValue); + /// Determines if two values are the same. + public static bool operator ==(PortType left, PortType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PortType left, PortType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PortType(string value) => new PortType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PortType other && Equals(other); + /// + public bool Equals(PortType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerCycleState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerCycleState.cs deleted file mode 100644 index 771eb8d62048a..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerCycleState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// On or Off power cycle state. - public readonly partial struct PowerCycleState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PowerCycleState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OnValue = "On"; - private const string OffValue = "Off"; - - /// On. - public static PowerCycleState On { get; } = new PowerCycleState(OnValue); - /// Off. - public static PowerCycleState Off { get; } = new PowerCycleState(OffValue); - /// Determines if two values are the same. - public static bool operator ==(PowerCycleState left, PowerCycleState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PowerCycleState left, PowerCycleState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PowerCycleState(string value) => new PowerCycleState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PowerCycleState other && Equals(other); - /// - public bool Equals(PowerCycleState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerEnd.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerEnd.cs deleted file mode 100644 index d666bc851c179..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerEnd.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Primary or Secondary power end. - public readonly partial struct PowerEnd : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PowerEnd(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PrimaryValue = "Primary"; - private const string SecondaryValue = "Secondary"; - - /// Primary. - public static PowerEnd Primary { get; } = new PowerEnd(PrimaryValue); - /// Secondary. - public static PowerEnd Secondary { get; } = new PowerEnd(SecondaryValue); - /// Determines if two values are the same. - public static bool operator ==(PowerEnd left, PowerEnd right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PowerEnd left, PowerEnd right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PowerEnd(string value) => new PowerEnd(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PowerEnd other && Equals(other); - /// - public bool Equals(PowerEnd other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PrefixType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PrefixType.cs new file mode 100644 index 0000000000000..eecd8590d2395 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PrefixType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// IP Prefix Type that needs to be matched. + public readonly partial struct PrefixType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PrefixType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrefixValue = "Prefix"; + private const string LongestPrefixValue = "LongestPrefix"; + + /// Prefix. + public static PrefixType Prefix { get; } = new PrefixType(PrefixValue); + /// LongestPrefix. + public static PrefixType LongestPrefix { get; } = new PrefixType(LongestPrefixValue); + /// Determines if two values are the same. + public static bool operator ==(PrefixType left, PrefixType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrefixType left, PrefixType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrefixType(string value) => new PrefixType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrefixType other && Equals(other); + /// + public bool Equals(PrefixType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs index a139d7289ccf1..8c61124150c7d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs @@ -22,22 +22,25 @@ public ProvisioningState(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } + private const string AcceptedValue = "Accepted"; private const string SucceededValue = "Succeeded"; private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; private const string DeletingValue = "Deleting"; private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + /// Accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); /// Succeeded. public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); /// Updating. public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// Canceled. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); /// Deleting. public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); /// Failed. public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Canceled. + public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.Serialization.cs similarity index 58% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.Serialization.cs index f0fe5d3e001be..8cf186566ad6b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.Serialization.cs @@ -10,15 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class UpdatePowerCycleProperties : IUtf8JsonSerializable + public partial class RebootProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("powerEnd"u8); - writer.WriteStringValue(PowerEnd.ToString()); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); + if (Optional.IsDefined(RebootType)) + { + writer.WritePropertyName("rebootType"u8); + writer.WriteStringValue(RebootType.Value.ToString()); + } writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.cs new file mode 100644 index 0000000000000..471b984b6020b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootProperties.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Reboot properties. + public partial class RebootProperties + { + /// Initializes a new instance of RebootProperties. + public RebootProperties() + { + } + + /// Type of reboot to be performed. Example: GracefulRebootWithZTP. + public RebootType? RebootType { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootType.cs new file mode 100644 index 0000000000000..7721b1bdcec1f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RebootType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of reboot to be performed. Example: GracefulRebootWithZTP. + public readonly partial struct RebootType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RebootType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GracefulRebootWithZTPValue = "GracefulRebootWithZTP"; + private const string GracefulRebootWithoutZTPValue = "GracefulRebootWithoutZTP"; + private const string UngracefulRebootWithZTPValue = "UngracefulRebootWithZTP"; + private const string UngracefulRebootWithoutZTPValue = "UngracefulRebootWithoutZTP"; + + /// GracefulRebootWithZTP. + public static RebootType GracefulRebootWithZTP { get; } = new RebootType(GracefulRebootWithZTPValue); + /// GracefulRebootWithoutZTP. + public static RebootType GracefulRebootWithoutZTP { get; } = new RebootType(GracefulRebootWithoutZTPValue); + /// UngracefulRebootWithZTP. + public static RebootType UngracefulRebootWithZTP { get; } = new RebootType(UngracefulRebootWithZTPValue); + /// UngracefulRebootWithoutZTP. + public static RebootType UngracefulRebootWithoutZTP { get; } = new RebootType(UngracefulRebootWithoutZTPValue); + /// Determines if two values are the same. + public static bool operator ==(RebootType left, RebootType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RebootType left, RebootType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RebootType(string value) => new RebootType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RebootType other && Equals(other); + /// + public bool Equals(RebootType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyActionType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyActionType.cs new file mode 100644 index 0000000000000..fb43f43b9ca65 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyActionType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Action type. Example: Permit | Deny | Continue. + public readonly partial struct RoutePolicyActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RoutePolicyActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PermitValue = "Permit"; + private const string DenyValue = "Deny"; + private const string ContinueValue = "Continue"; + + /// Permit. + public static RoutePolicyActionType Permit { get; } = new RoutePolicyActionType(PermitValue); + /// Deny. + public static RoutePolicyActionType Deny { get; } = new RoutePolicyActionType(DenyValue); + /// Continue. + public static RoutePolicyActionType Continue { get; } = new RoutePolicyActionType(ContinueValue); + /// Determines if two values are the same. + public static bool operator ==(RoutePolicyActionType left, RoutePolicyActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RoutePolicyActionType left, RoutePolicyActionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RoutePolicyActionType(string value) => new RoutePolicyActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutePolicyActionType other && Equals(other); + /// + public bool Equals(RoutePolicyActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyConditionType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyConditionType.cs new file mode 100644 index 0000000000000..8221853fbcf74 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyConditionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of the condition used. + public readonly partial struct RoutePolicyConditionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RoutePolicyConditionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OrValue = "Or"; + private const string AndValue = "And"; + + /// Or. + public static RoutePolicyConditionType Or { get; } = new RoutePolicyConditionType(OrValue); + /// And. + public static RoutePolicyConditionType And { get; } = new RoutePolicyConditionType(AndValue); + /// Determines if two values are the same. + public static bool operator ==(RoutePolicyConditionType left, RoutePolicyConditionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RoutePolicyConditionType left, RoutePolicyConditionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator RoutePolicyConditionType(string value) => new RoutePolicyConditionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutePolicyConditionType other && Equals(other); + /// + public bool Equals(RoutePolicyConditionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs index 8d5d471ad2c90..a8b12a747270c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs @@ -38,13 +38,28 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - writer.WritePropertyName("statements"u8); - writer.WriteStartArray(); - foreach (var item in Statements) + if (Optional.IsDefined(DefaultAction)) { - writer.WriteObjectValue(item); + writer.WritePropertyName("defaultAction"u8); + writer.WriteStringValue(DefaultAction.Value.ToString()); + } + if (Optional.IsCollectionDefined(Statements)) + { + writer.WritePropertyName("statements"u8); + writer.WriteStartArray(); + foreach (var item in Statements) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("networkFabricId"u8); + writer.WriteStringValue(NetworkFabricId); + if (Optional.IsDefined(AddressFamilyType)) + { + writer.WritePropertyName("addressFamilyType"u8); + writer.WriteStringValue(AddressFamilyType.Value.ToString()); } - writer.WriteEndArray(); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -62,8 +77,13 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - IList statements = default; + Optional defaultAction = default; + Optional> statements = default; + ResourceIdentifier networkFabricId = default; + Optional addressFamilyType = default; + Optional configurationState = default; Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -123,8 +143,21 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) annotation = property0.Value.GetString(); continue; } + if (property0.NameEquals("defaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultAction = new CommunityActionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("statements"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { @@ -133,6 +166,29 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) statements = array; continue; } + if (property0.NameEquals("networkFabricId"u8)) + { + networkFabricId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("addressFamilyType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressFamilyType = new AddressFamilyType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -142,11 +198,20 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property0.Value.GetString()); + continue; + } } continue; } } - return new RoutePolicyData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, statements, Optional.ToNullable(provisioningState)); + return new RoutePolicyData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(defaultAction), Optional.ToList(statements), networkFabricId, Optional.ToNullable(addressFamilyType), Optional.ToNullable(configurationState), Optional.ToNullable(provisioningState), Optional.ToNullable(administrativeState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs index e43991556bae9..8eae2878a15f7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs @@ -26,6 +26,24 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DefaultAction)) + { + writer.WritePropertyName("defaultAction"u8); + writer.WriteStringValue(DefaultAction.Value.ToString()); + } + if (Optional.IsCollectionDefined(Statements)) + { + writer.WritePropertyName("statements"u8); + writer.WriteStartArray(); + foreach (var item in Statements) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs index 693407fb19029..3434f7c8d50a6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs @@ -10,16 +10,18 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// The RoutePolicy patch resource definition. - public partial class RoutePolicyPatch + /// The Route Policy patch resource definition. + public partial class RoutePolicyPatch : NetworkRackPatch { /// Initializes a new instance of RoutePolicyPatch. public RoutePolicyPatch() { - Tags = new ChangeTrackingDictionary(); + Statements = new ChangeTrackingList(); } - /// Resource tags. - public IDictionary Tags { get; } + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + public CommunityActionType? DefaultAction { get; set; } + /// Route Policy statements. + public IList Statements { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs index c77833eea6b73..6cbbfa590d364 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Route Policy Statement properties.. + /// Route Policy Statement properties. public partial class RoutePolicyStatementProperties : AnnotationResource { /// Initializes a new instance of RoutePolicyStatementProperties. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.Serialization.cs new file mode 100644 index 0000000000000..99f8f4a6a8ce7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class RouteTargetInformation : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ImportIPv4RouteTargets)) + { + writer.WritePropertyName("importIpv4RouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ImportIPv4RouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ImportIPv6RouteTargets)) + { + writer.WritePropertyName("importIpv6RouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ImportIPv6RouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExportIPv4RouteTargets)) + { + writer.WritePropertyName("exportIpv4RouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ExportIPv4RouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExportIPv6RouteTargets)) + { + writer.WritePropertyName("exportIpv6RouteTargets"u8); + writer.WriteStartArray(); + foreach (var item in ExportIPv6RouteTargets) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static RouteTargetInformation DeserializeRouteTargetInformation(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> importIPv4RouteTargets = default; + Optional> importIPv6RouteTargets = default; + Optional> exportIPv4RouteTargets = default; + Optional> exportIPv6RouteTargets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("importIpv4RouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + importIPv4RouteTargets = array; + continue; + } + if (property.NameEquals("importIpv6RouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + importIPv6RouteTargets = array; + continue; + } + if (property.NameEquals("exportIpv4RouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + exportIPv4RouteTargets = array; + continue; + } + if (property.NameEquals("exportIpv6RouteTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + exportIPv6RouteTargets = array; + continue; + } + } + return new RouteTargetInformation(Optional.ToList(importIPv4RouteTargets), Optional.ToList(importIPv6RouteTargets), Optional.ToList(exportIPv4RouteTargets), Optional.ToList(exportIPv6RouteTargets)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.cs new file mode 100644 index 0000000000000..19422a3a67f68 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Route Target Configuration. + public partial class RouteTargetInformation + { + /// Initializes a new instance of RouteTargetInformation. + public RouteTargetInformation() + { + ImportIPv4RouteTargets = new ChangeTrackingList(); + ImportIPv6RouteTargets = new ChangeTrackingList(); + ExportIPv4RouteTargets = new ChangeTrackingList(); + ExportIPv6RouteTargets = new ChangeTrackingList(); + } + + /// Initializes a new instance of RouteTargetInformation. + /// Route Targets to be applied for incoming routes into CE. + /// Route Targets to be applied for incoming routes from CE. + /// Route Targets to be applied for outgoing routes into CE. + /// Route Targets to be applied for outgoing routes from CE. + internal RouteTargetInformation(IList importIPv4RouteTargets, IList importIPv6RouteTargets, IList exportIPv4RouteTargets, IList exportIPv6RouteTargets) + { + ImportIPv4RouteTargets = importIPv4RouteTargets; + ImportIPv6RouteTargets = importIPv6RouteTargets; + ExportIPv4RouteTargets = exportIPv4RouteTargets; + ExportIPv6RouteTargets = exportIPv6RouteTargets; + } + + /// Route Targets to be applied for incoming routes into CE. + public IList ImportIPv4RouteTargets { get; } + /// Route Targets to be applied for incoming routes from CE. + public IList ImportIPv6RouteTargets { get; } + /// Route Targets to be applied for outgoing routes into CE. + public IList ExportIPv4RouteTargets { get; } + /// Route Targets to be applied for outgoing routes from CE. + public IList ExportIPv6RouteTargets { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.Serialization.cs new file mode 100644 index 0000000000000..9a1610bb759e0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class RuleProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + writer.WritePropertyName("addressList"u8); + writer.WriteStartArray(); + foreach (var item in AddressList) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static RuleProperties DeserializeRuleProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Action action = default; + IList addressList = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = new Action(property.Value.GetString()); + continue; + } + if (property.NameEquals("addressList"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addressList = array; + continue; + } + } + return new RuleProperties(action, addressList); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.cs new file mode 100644 index 0000000000000..0b6b71d0c18d5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RuleProperties.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Rules for the InternetGateways. + public partial class RuleProperties + { + /// Initializes a new instance of RuleProperties. + /// Specify action. + /// List of Addresses to be allowed or denied. + /// is null. + public RuleProperties(Action action, IEnumerable addressList) + { + Argument.AssertNotNull(addressList, nameof(addressList)); + + Action = action; + AddressList = addressList.ToList(); + } + + /// Initializes a new instance of RuleProperties. + /// Specify action. + /// List of Addresses to be allowed or denied. + internal RuleProperties(Action action, IList addressList) + { + Action = action; + AddressList = addressList; + } + + /// Specify action. + public Action Action { get; set; } + /// List of Addresses to be allowed or denied. + public IList AddressList { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SourceDestinationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SourceDestinationType.cs new file mode 100644 index 0000000000000..553f9b7c6dd1b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SourceDestinationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// IP Address type that needs to be matched. + public readonly partial struct SourceDestinationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SourceDestinationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SourceIPValue = "SourceIP"; + private const string DestinationIPValue = "DestinationIP"; + + /// SourceIP. + public static SourceDestinationType SourceIP { get; } = new SourceDestinationType(SourceIPValue); + /// DestinationIP. + public static SourceDestinationType DestinationIP { get; } = new SourceDestinationType(DestinationIPValue); + /// Determines if two values are the same. + public static bool operator ==(SourceDestinationType left, SourceDestinationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SourceDestinationType left, SourceDestinationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SourceDestinationType(string value) => new SourceDestinationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SourceDestinationType other && Equals(other); + /// + public bool Equals(SourceDestinationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/State.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/State.cs deleted file mode 100644 index dc1ee41491a6b..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/State.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// On or Off toggle state. - public readonly partial struct State : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public State(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OnValue = "On"; - private const string OffValue = "Off"; - - /// On. - public static State On { get; } = new State(OnValue); - /// Off. - public static State Off { get; } = new State(OffValue); - /// Determines if two values are the same. - public static bool operator ==(State left, State right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(State left, State right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator State(string value) => new State(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is State other && Equals(other); - /// - public bool Equals(State other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.Serialization.cs index c3158e2cf30b0..3c30722792035 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.Serialization.cs @@ -42,7 +42,7 @@ internal static StatementActionProperties DeserializeStatementActionProperties(J return null; } Optional localPreference = default; - CommunityActionType actionType = default; + RoutePolicyActionType actionType = default; Optional ipCommunityProperties = default; Optional ipExtendedCommunityProperties = default; foreach (var property in element.EnumerateObject()) @@ -58,7 +58,7 @@ internal static StatementActionProperties DeserializeStatementActionProperties(J } if (property.NameEquals("actionType"u8)) { - actionType = new CommunityActionType(property.Value.GetString()); + actionType = new RoutePolicyActionType(property.Value.GetString()); continue; } if (property.NameEquals("ipCommunityProperties"u8)) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.cs index a9793239d6ec0..2600b224a78f0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementActionProperties.cs @@ -11,18 +11,18 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models public partial class StatementActionProperties { /// Initializes a new instance of StatementActionProperties. - /// action. Example: Permit | Deny. - public StatementActionProperties(CommunityActionType actionType) + /// Action type. Example: Permit | Deny | Continue. + public StatementActionProperties(RoutePolicyActionType actionType) { ActionType = actionType; } /// Initializes a new instance of StatementActionProperties. - /// localPreference of the route policy. - /// action. Example: Permit | Deny. + /// Local Preference of the route policy. + /// Action type. Example: Permit | Deny | Continue. /// IP Community Properties. /// IP Extended Community Properties. - internal StatementActionProperties(long? localPreference, CommunityActionType actionType, ActionIPCommunityProperties ipCommunityProperties, ActionIPExtendedCommunityProperties ipExtendedCommunityProperties) + internal StatementActionProperties(long? localPreference, RoutePolicyActionType actionType, ActionIPCommunityProperties ipCommunityProperties, ActionIPExtendedCommunityProperties ipExtendedCommunityProperties) { LocalPreference = localPreference; ActionType = actionType; @@ -30,10 +30,10 @@ internal StatementActionProperties(long? localPreference, CommunityActionType ac IPExtendedCommunityProperties = ipExtendedCommunityProperties; } - /// localPreference of the route policy. + /// Local Preference of the route policy. public long? LocalPreference { get; set; } - /// action. Example: Permit | Deny. - public CommunityActionType ActionType { get; set; } + /// Action type. Example: Permit | Deny | Continue. + public RoutePolicyActionType ActionType { get; set; } /// IP Community Properties. public ActionIPCommunityProperties IPCommunityProperties { get; set; } /// IP Extended Community Properties. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.Serialization.cs index fe9740b2c0f3e..f1cfbe224c348 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.Serialization.cs @@ -16,6 +16,11 @@ public partial class StatementConditionProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(RoutePolicyConditionType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(RoutePolicyConditionType.Value.ToString()); + } if (Optional.IsDefined(IPPrefixId)) { writer.WritePropertyName("ipPrefixId"u8); @@ -50,11 +55,21 @@ internal static StatementConditionProperties DeserializeStatementConditionProper { return null; } + Optional type = default; Optional ipPrefixId = default; Optional> ipExtendedCommunityIds = default; Optional> ipCommunityIds = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new RoutePolicyConditionType(property.Value.GetString()); + continue; + } if (property.NameEquals("ipPrefixId"u8)) { ipPrefixId = property.Value.GetString(); @@ -89,7 +104,7 @@ internal static StatementConditionProperties DeserializeStatementConditionProper continue; } } - return new StatementConditionProperties(Optional.ToList(ipCommunityIds), ipPrefixId.Value, Optional.ToList(ipExtendedCommunityIds)); + return new StatementConditionProperties(Optional.ToList(ipCommunityIds), Optional.ToNullable(type), ipPrefixId.Value, Optional.ToList(ipExtendedCommunityIds)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs index 2961cb6172434..4e31d0b8ebbb1 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs @@ -21,14 +21,18 @@ public StatementConditionProperties() /// Initializes a new instance of StatementConditionProperties. /// List of IP Community resource IDs. + /// Type of the condition used. /// Arm Resource Id of IpPrefix. /// List of IP Extended Community resource IDs. - internal StatementConditionProperties(IList ipCommunityIds, string ipPrefixId, IList ipExtendedCommunityIds) : base(ipCommunityIds) + internal StatementConditionProperties(IList ipCommunityIds, RoutePolicyConditionType? routePolicyConditionType, string ipPrefixId, IList ipExtendedCommunityIds) : base(ipCommunityIds) { + RoutePolicyConditionType = routePolicyConditionType; IPPrefixId = ipPrefixId; IPExtendedCommunityIds = ipExtendedCommunityIds; } + /// Type of the condition used. + public RoutePolicyConditionType? RoutePolicyConditionType { get; set; } /// Arm Resource Id of IpPrefix. public string IPPrefixId { get; set; } /// List of IP Extended Community resource IDs. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfiguration.cs index 0d75eecdb6009..5844b333a7ee4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// staticRouteConfiguration model. + /// Static Route Configuration properties. public partial class StaticRouteConfiguration { /// Initializes a new instance of StaticRouteConfiguration. @@ -22,8 +22,8 @@ public StaticRouteConfiguration() /// Initializes a new instance of StaticRouteConfiguration. /// BFD configuration properties. - /// List with object IPv4Routes. - /// List with object IPv6Routes. + /// List of IPv4 Routes. + /// List of IPv6 Routes. internal StaticRouteConfiguration(BfdConfiguration bfdConfiguration, IList ipv4Routes, IList ipv6Routes) { BfdConfiguration = bfdConfiguration; @@ -33,9 +33,9 @@ internal StaticRouteConfiguration(BfdConfiguration bfdConfiguration, IList BFD configuration properties. public BfdConfiguration BfdConfiguration { get; set; } - /// List with object IPv4Routes. + /// List of IPv4 Routes. public IList IPv4Routes { get; } - /// List with object IPv6Routes. + /// List of IPv6 Routes. public IList IPv6Routes { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteProperties.cs index c654b211bd1cd..52deadc79acd1 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteProperties.cs @@ -12,12 +12,12 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Static Route properties. + /// Route Properties. public partial class StaticRouteProperties { /// Initializes a new instance of StaticRouteProperties. - /// IPv4 | IPv6 Prefix. - /// List of next hop IPv4 | IPv6 addresses. + /// Prefix of the route. + /// List of next hop addresses. /// or is null. public StaticRouteProperties(string prefix, IEnumerable nextHop) { @@ -29,17 +29,17 @@ public StaticRouteProperties(string prefix, IEnumerable nextHop) } /// Initializes a new instance of StaticRouteProperties. - /// IPv4 | IPv6 Prefix. - /// List of next hop IPv4 | IPv6 addresses. + /// Prefix of the route. + /// List of next hop addresses. internal StaticRouteProperties(string prefix, IList nextHop) { Prefix = prefix; NextHop = nextHop; } - /// IPv4 | IPv6 Prefix. + /// Prefix of the route. public string Prefix { get; set; } - /// List of next hop IPv4 | IPv6 addresses. + /// List of next hop addresses. public IList NextHop { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.cs deleted file mode 100644 index 1271d4cae10be..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Generate support package post action properties. - public partial class SupportPackageProperties - { - /// Initializes a new instance of SupportPackageProperties. - /// The URL to fetch the generated support package from. - /// is null. - internal SupportPackageProperties(string supportPackageURL) - { - Argument.AssertNotNull(supportPackageURL, nameof(supportPackageURL)); - - SupportPackageURL = supportPackageURL; - } - - /// The URL to fetch the generated support package from. - public string SupportPackageURL { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedConnectorProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedConnectorProperties.cs index 237ac269a290c..743dbc8c027a7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedConnectorProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedConnectorProperties.cs @@ -16,7 +16,7 @@ public SupportedConnectorProperties() } /// Initializes a new instance of SupportedConnectorProperties. - /// Connector type. Example: Optical. + /// Type of connector used. Example: Optical. /// Maximum speed of the connector in Mbps. internal SupportedConnectorProperties(string connectorType, int? maxSpeedInMbps) { @@ -24,7 +24,7 @@ internal SupportedConnectorProperties(string connectorType, int? maxSpeedInMbps) MaxSpeedInMbps = maxSpeedInMbps; } - /// Connector type. Example: Optical. + /// Type of connector used. Example: Optical. public string ConnectorType { get; set; } /// Maximum speed of the connector in Mbps. public int? MaxSpeedInMbps { get; set; } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.Serialization.cs index 0bfe01809abb2..2a668e92ad6e0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.Serialization.cs @@ -30,15 +30,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("vendorFirmwareVersion"u8); writer.WriteStringValue(VendorFirmwareVersion); } - if (Optional.IsDefined(IsCurrent)) + if (Optional.IsDefined(IsDefault)) { - writer.WritePropertyName("isCurrent"u8); - writer.WriteStringValue(IsCurrent.Value.ToString()); - } - if (Optional.IsDefined(IsTest)) - { - writer.WritePropertyName("isTest"u8); - writer.WriteStringValue(IsTest.Value.ToString()); + writer.WritePropertyName("isDefault"u8); + writer.WriteStringValue(IsDefault.Value.ToString()); } writer.WriteEndObject(); } @@ -52,8 +47,7 @@ internal static SupportedVersionProperties DeserializeSupportedVersionProperties Optional version = default; Optional vendorOSVersion = default; Optional vendorFirmwareVersion = default; - Optional isCurrent = default; - Optional isTest = default; + Optional isDefault = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("version"u8)) @@ -71,26 +65,17 @@ internal static SupportedVersionProperties DeserializeSupportedVersionProperties vendorFirmwareVersion = property.Value.GetString(); continue; } - if (property.NameEquals("isCurrent"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isCurrent = new IsCurrentVersion(property.Value.GetString()); - continue; - } - if (property.NameEquals("isTest"u8)) + if (property.NameEquals("isDefault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isTest = new IsTestVersion(property.Value.GetString()); + isDefault = new BooleanEnumProperty(property.Value.GetString()); continue; } } - return new SupportedVersionProperties(version.Value, vendorOSVersion.Value, vendorFirmwareVersion.Value, Optional.ToNullable(isCurrent), Optional.ToNullable(isTest)); + return new SupportedVersionProperties(version.Value, vendorOSVersion.Value, vendorFirmwareVersion.Value, Optional.ToNullable(isDefault)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.cs index cc6b255929631..89cac6443a216 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportedVersionProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Network device supported version properties. + /// Supported version details of the network device. public partial class SupportedVersionProperties { /// Initializes a new instance of SupportedVersionProperties. @@ -19,15 +19,13 @@ public SupportedVersionProperties() /// Operating system and firmware combined versions. /// Operating system version. /// Firmware version. - /// If the current version is in use. - /// If the current version is a test version. - internal SupportedVersionProperties(string version, string vendorOSVersion, string vendorFirmwareVersion, IsCurrentVersion? isCurrent, IsTestVersion? isTest) + /// If true newly provisioned Fabric will use this device version by default to bootstrap the network devices for the first time. + internal SupportedVersionProperties(string version, string vendorOSVersion, string vendorFirmwareVersion, BooleanEnumProperty? isDefault) { Version = version; VendorOSVersion = vendorOSVersion; VendorFirmwareVersion = vendorFirmwareVersion; - IsCurrent = isCurrent; - IsTest = isTest; + IsDefault = isDefault; } /// Operating system and firmware combined versions. @@ -36,9 +34,7 @@ internal SupportedVersionProperties(string version, string vendorOSVersion, stri public string VendorOSVersion { get; set; } /// Firmware version. public string VendorFirmwareVersion { get; set; } - /// If the current version is in use. - public IsCurrentVersion? IsCurrent { get; set; } - /// If the current version is a test version. - public IsTestVersion? IsTest { get; set; } + /// If true newly provisioned Fabric will use this device version by default to bootstrap the network devices for the first time. + public BooleanEnumProperty? IsDefault { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TapRuleActionType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TapRuleActionType.cs new file mode 100644 index 0000000000000..2ec9b78caefa6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TapRuleActionType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Type of actions that can be performed. + public readonly partial struct TapRuleActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TapRuleActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DropValue = "Drop"; + private const string CountValue = "Count"; + private const string LogValue = "Log"; + private const string ReplicateValue = "Replicate"; + private const string GotoValue = "Goto"; + private const string RedirectValue = "Redirect"; + private const string MirrorValue = "Mirror"; + + /// Drop. + public static TapRuleActionType Drop { get; } = new TapRuleActionType(DropValue); + /// Count. + public static TapRuleActionType Count { get; } = new TapRuleActionType(CountValue); + /// Log. + public static TapRuleActionType Log { get; } = new TapRuleActionType(LogValue); + /// Replicate. + public static TapRuleActionType Replicate { get; } = new TapRuleActionType(ReplicateValue); + /// Goto. + public static TapRuleActionType Goto { get; } = new TapRuleActionType(GotoValue); + /// Redirect. + public static TapRuleActionType Redirect { get; } = new TapRuleActionType(RedirectValue); + /// Mirror. + public static TapRuleActionType Mirror { get; } = new TapRuleActionType(MirrorValue); + /// Determines if two values are the same. + public static bool operator ==(TapRuleActionType left, TapRuleActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TapRuleActionType left, TapRuleActionType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TapRuleActionType(string value) => new TapRuleActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TapRuleActionType other && Equals(other); + /// + public bool Equals(TapRuleActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.Serialization.cs index 49ebead6c375a..362d2950a1c6f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.Serialization.cs @@ -15,21 +15,6 @@ public partial class TerminalServerConfiguration : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"u8); - writer.WriteStringValue(Password); - } - if (Optional.IsDefined(SerialNumber)) - { - writer.WritePropertyName("serialNumber"u8); - writer.WriteStringValue(SerialNumber); - } if (Optional.IsDefined(PrimaryIPv4Prefix)) { writer.WritePropertyName("primaryIpv4Prefix"u8); @@ -50,6 +35,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("secondaryIpv6Prefix"u8); writer.WriteStringValue(SecondaryIPv6Prefix); } + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(SerialNumber)) + { + writer.WritePropertyName("serialNumber"u8); + writer.WriteStringValue(SerialNumber); + } writer.WriteEndObject(); } @@ -60,13 +60,13 @@ internal static TerminalServerConfiguration DeserializeTerminalServerConfigurati return null; } Optional networkDeviceId = default; - Optional username = default; - Optional password = default; - Optional serialNumber = default; Optional primaryIPv4Prefix = default; Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; Optional secondaryIPv6Prefix = default; + Optional username = default; + Optional password = default; + Optional serialNumber = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("networkDeviceId"u8)) @@ -74,43 +74,43 @@ internal static TerminalServerConfiguration DeserializeTerminalServerConfigurati networkDeviceId = property.Value.GetString(); continue; } - if (property.NameEquals("username"u8)) + if (property.NameEquals("primaryIpv4Prefix"u8)) { - username = property.Value.GetString(); + primaryIPv4Prefix = property.Value.GetString(); continue; } - if (property.NameEquals("password"u8)) + if (property.NameEquals("primaryIpv6Prefix"u8)) { - password = property.Value.GetString(); + primaryIPv6Prefix = property.Value.GetString(); continue; } - if (property.NameEquals("serialNumber"u8)) + if (property.NameEquals("secondaryIpv4Prefix"u8)) { - serialNumber = property.Value.GetString(); + secondaryIPv4Prefix = property.Value.GetString(); continue; } - if (property.NameEquals("primaryIpv4Prefix"u8)) + if (property.NameEquals("secondaryIpv6Prefix"u8)) { - primaryIPv4Prefix = property.Value.GetString(); + secondaryIPv6Prefix = property.Value.GetString(); continue; } - if (property.NameEquals("primaryIpv6Prefix"u8)) + if (property.NameEquals("username"u8)) { - primaryIPv6Prefix = property.Value.GetString(); + username = property.Value.GetString(); continue; } - if (property.NameEquals("secondaryIpv4Prefix"u8)) + if (property.NameEquals("password"u8)) { - secondaryIPv4Prefix = property.Value.GetString(); + password = property.Value.GetString(); continue; } - if (property.NameEquals("secondaryIpv6Prefix"u8)) + if (property.NameEquals("serialNumber"u8)) { - secondaryIPv6Prefix = property.Value.GetString(); + serialNumber = property.Value.GetString(); continue; } } - return new TerminalServerConfiguration(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, networkDeviceId.Value, username.Value, password.Value, serialNumber.Value); + return new TerminalServerConfiguration(username.Value, password.Value, serialNumber.Value, networkDeviceId.Value, primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs index 0a2496dcbb6aa..75fb673fd968e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Network and credentials configuration currently applied to terminal server. - public partial class TerminalServerConfiguration : NetworkFabricLayer3IPPrefixProperties + public partial class TerminalServerConfiguration : TerminalServerPatchableProperties { /// Initializes a new instance of TerminalServerConfiguration. public TerminalServerConfiguration() @@ -16,29 +16,32 @@ public TerminalServerConfiguration() } /// Initializes a new instance of TerminalServerConfiguration. - /// IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.0/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a0/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv4 Address Prefix of CE-PE interconnect links. Example: 172.31.0.20/31. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// Secondary IPv6 Address Prefix of CE-PE interconnect links. Example: 3FFE:FFFF:0:CD30::a4/126. The values can be specified at the time of creation or can be updated afterwards. Any update to the values post-provisioning may disrupt traffic. The 1st and 3rd IPs are to be configured on CE1 and CE2 for Option B interfaces. The 2nd and 4th IPs are to be configured on PE1 and PE2 for Option B interfaces. - /// ARM Resource ID used for the NetworkDevice. /// Username for the terminal server connection. /// Password for the terminal server connection. /// Serial Number of Terminal server. - internal TerminalServerConfiguration(string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix, string networkDeviceId, string username, string password, string serialNumber) : base(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix) + /// ARM Resource ID used for the NetworkDevice. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + internal TerminalServerConfiguration(string username, string password, string serialNumber, string networkDeviceId, string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) : base(username, password, serialNumber) { NetworkDeviceId = networkDeviceId; - Username = username; - Password = password; - SerialNumber = serialNumber; + PrimaryIPv4Prefix = primaryIPv4Prefix; + PrimaryIPv6Prefix = primaryIPv6Prefix; + SecondaryIPv4Prefix = secondaryIPv4Prefix; + SecondaryIPv6Prefix = secondaryIPv6Prefix; } /// ARM Resource ID used for the NetworkDevice. public string NetworkDeviceId { get; } - /// Username for the terminal server connection. - public string Username { get; set; } - /// Password for the terminal server connection. - public string Password { get; set; } - /// Serial Number of Terminal server. - public string SerialNumber { get; set; } + /// IPv4 Address Prefix. + public string PrimaryIPv4Prefix { get; set; } + /// IPv6 Address Prefix. + public string PrimaryIPv6Prefix { get; set; } + /// Secondary IPv4 Address Prefix. + public string SecondaryIPv4Prefix { get; set; } + /// Secondary IPv6 Address Prefix. + public string SecondaryIPv6Prefix { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs index 49294f2e997c6..8fa9056ae23a2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs @@ -16,6 +16,6 @@ public UpdateAdministrativeState() } /// Administrative state. - public AdministrativeState? State { get; set; } + public EnableDisableState? State { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.Serialization.cs new file mode 100644 index 0000000000000..756dffece39a4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class UpdateDeviceAdministrativeState : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsCollectionDefined(ResourceIds)) + { + writer.WritePropertyName("resourceIds"u8); + writer.WriteStartArray(); + foreach (var item in ResourceIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.cs new file mode 100644 index 0000000000000..830606bad2ab4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeState.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Update the administrative state on list of resources. + public partial class UpdateDeviceAdministrativeState : EnableDisableOnResources + { + /// Initializes a new instance of UpdateDeviceAdministrativeState. + public UpdateDeviceAdministrativeState() + { + } + + /// Administrative state. + public DeviceAdministrativeState? State { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.cs deleted file mode 100644 index 88edfcda0ccad..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Update power cycle input properties. - public partial class UpdatePowerCycleProperties - { - /// Initializes a new instance of UpdatePowerCycleProperties. - /// Primary or Secondary power end. - /// On or Off toggle state. - public UpdatePowerCycleProperties(PowerEnd powerEnd, State state) - { - PowerEnd = powerEnd; - State = state; - } - - /// Primary or Secondary power end. - public PowerEnd PowerEnd { get; } - /// On or Off toggle state. - public State State { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.Serialization.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.Serialization.cs index 430fc509cc8b2..210a34057270e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.Serialization.cs @@ -10,13 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class UpdateVersionProperties : IUtf8JsonSerializable + public partial class UpdateVersion : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("skuVersion"u8); - writer.WriteStringValue(SkuVersion); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } writer.WriteEndObject(); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.cs new file mode 100644 index 0000000000000..14d4384f72141 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersion.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Update version properties. + public partial class UpdateVersion + { + /// Initializes a new instance of UpdateVersion. + public UpdateVersion() + { + } + + /// Specify the version. + public string Version { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.cs deleted file mode 100644 index f70a6e239f95c..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// Generate support package post action properties. - public partial class UpdateVersionProperties - { - /// Initializes a new instance of UpdateVersionProperties. - /// The supported version defined in network device SKU. - /// is null. - public UpdateVersionProperties(string skuVersion) - { - Argument.AssertNotNull(skuVersion, nameof(skuVersion)); - - SkuVersion = skuVersion; - } - - /// The supported version defined in network device SKU. - public string SkuVersion { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateAction.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateAction.cs new file mode 100644 index 0000000000000..8527e5ffb1a66 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateAction.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Validate action that to be performed. + public readonly partial struct ValidateAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ValidateAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CablingValue = "Cabling"; + private const string ConfigurationValue = "Configuration"; + private const string ConnectivityValue = "Connectivity"; + + /// Cabling. + public static ValidateAction Cabling { get; } = new ValidateAction(CablingValue); + /// Configuration. + public static ValidateAction Configuration { get; } = new ValidateAction(ConfigurationValue); + /// Connectivity. + public static ValidateAction Connectivity { get; } = new ValidateAction(ConnectivityValue); + /// Determines if two values are the same. + public static bool operator ==(ValidateAction left, ValidateAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ValidateAction left, ValidateAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ValidateAction(string value) => new ValidateAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ValidateAction other && Equals(other); + /// + public bool Equals(ValidateAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.Serialization.cs new file mode 100644 index 0000000000000..c1bc78acaa1ce --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ValidateConfigurationProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ValidateAction)) + { + writer.WritePropertyName("validateAction"u8); + writer.WriteStringValue(ValidateAction.Value.ToString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.cs new file mode 100644 index 0000000000000..fdf09d61ba4bf --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationProperties.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Validation configuration properties. + public partial class ValidateConfigurationProperties + { + /// Initializes a new instance of ValidateConfigurationProperties. + public ValidateConfigurationProperties() + { + } + + /// Validate action that to be performed. + public ValidateAction? ValidateAction { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.Serialization.cs new file mode 100644 index 0000000000000..c90a1bd9136e3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class ValidateConfigurationResponse + { + internal static ValidateConfigurationResponse DeserializeValidateConfigurationResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional configurationState = default; + Optional url = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new ConfigurationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("url"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + url = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new ValidateConfigurationResponse(error.Value, Optional.ToNullable(configurationState), url.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.cs new file mode 100644 index 0000000000000..a1791b7555471 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResponse.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The response of the action validate configuration. + public partial class ValidateConfigurationResponse : ErrorResponse + { + /// Initializes a new instance of ValidateConfigurationResponse. + internal ValidateConfigurationResponse() + { + } + + /// Initializes a new instance of ValidateConfigurationResponse. + /// The error object. + /// Gets the configuration state. + /// URL for the details of the response. + internal ValidateConfigurationResponse(ResponseError error, ConfigurationState? configurationState, Uri uri) : base(error) + { + ConfigurationState = configurationState; + Uri = uri; + } + + /// Gets the configuration state. + public ConfigurationState? ConfigurationState { get; } + /// URL for the details of the response. + public Uri Uri { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.Serialization.cs new file mode 100644 index 0000000000000..be77388f70080 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.Serialization.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class VlanGroupProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Vlans)) + { + writer.WritePropertyName("vlans"u8); + writer.WriteStartArray(); + foreach (var item in Vlans) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static VlanGroupProperties DeserializeVlanGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional> vlans = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("vlans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vlans = array; + continue; + } + } + return new VlanGroupProperties(name.Value, Optional.ToList(vlans)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.cs new file mode 100644 index 0000000000000..f07c0d8a4d6a5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Vlan group properties. + public partial class VlanGroupProperties + { + /// Initializes a new instance of VlanGroupProperties. + public VlanGroupProperties() + { + Vlans = new ChangeTrackingList(); + } + + /// Initializes a new instance of VlanGroupProperties. + /// Vlan group name. + /// List of vlans. + internal VlanGroupProperties(string name, IList vlans) + { + Name = name; + Vlans = vlans; + } + + /// Vlan group name. + public string Name { get; set; } + /// List of vlans. + public IList Vlans { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.Serialization.cs new file mode 100644 index 0000000000000..1693f1a4a9b58 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class VlanMatchCondition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Vlans)) + { + writer.WritePropertyName("vlans"u8); + writer.WriteStartArray(); + foreach (var item in Vlans) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(InnerVlans)) + { + writer.WritePropertyName("innerVlans"u8); + writer.WriteStartArray(); + foreach (var item in InnerVlans) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(VlanGroupNames)) + { + writer.WritePropertyName("vlanGroupNames"u8); + writer.WriteStartArray(); + foreach (var item in VlanGroupNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static VlanMatchCondition DeserializeVlanMatchCondition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> vlans = default; + Optional> innerVlans = default; + Optional> vlanGroupNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vlans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vlans = array; + continue; + } + if (property.NameEquals("innerVlans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + innerVlans = array; + continue; + } + if (property.NameEquals("vlanGroupNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vlanGroupNames = array; + continue; + } + } + return new VlanMatchCondition(Optional.ToList(vlans), Optional.ToList(innerVlans), Optional.ToList(vlanGroupNames)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.cs new file mode 100644 index 0000000000000..287b51a16fd32 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The vlan match conditions that need to be matched. + public partial class VlanMatchCondition + { + /// Initializes a new instance of VlanMatchCondition. + public VlanMatchCondition() + { + Vlans = new ChangeTrackingList(); + InnerVlans = new ChangeTrackingList(); + VlanGroupNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of VlanMatchCondition. + /// List of vlans that need to be matched. + /// List of inner vlans that need to be matched. + /// List of vlan group names that need to be matched. + internal VlanMatchCondition(IList vlans, IList innerVlans, IList vlanGroupNames) + { + Vlans = vlans; + InnerVlans = innerVlans; + VlanGroupNames = vlanGroupNames; + } + + /// List of vlans that need to be matched. + public IList Vlans { get; } + /// List of inner vlans that need to be matched. + public IList InnerVlans { get; } + /// List of vlan group names that need to be matched. + public IList VlanGroupNames { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.Serialization.cs new file mode 100644 index 0000000000000..338d349977d57 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.Serialization.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class VpnConfigurationPatchableProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NetworkToNetworkInterconnectId)) + { + writer.WritePropertyName("networkToNetworkInterconnectId"u8); + writer.WriteStringValue(NetworkToNetworkInterconnectId); + } + if (Optional.IsDefined(PeeringOption)) + { + writer.WritePropertyName("peeringOption"u8); + writer.WriteStringValue(PeeringOption.Value.ToString()); + } + if (Optional.IsDefined(OptionBProperties)) + { + writer.WritePropertyName("optionBProperties"u8); + writer.WriteObjectValue(OptionBProperties); + } + if (Optional.IsDefined(OptionAProperties)) + { + writer.WritePropertyName("optionAProperties"u8); + writer.WriteObjectValue(OptionAProperties); + } + writer.WriteEndObject(); + } + + internal static VpnConfigurationPatchableProperties DeserializeVpnConfigurationPatchableProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional networkToNetworkInterconnectId = default; + Optional peeringOption = default; + Optional optionBProperties = default; + Optional optionAProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkToNetworkInterconnectId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkToNetworkInterconnectId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("peeringOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + peeringOption = new PeeringOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("optionBProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optionBProperties = OptionBProperties.DeserializeOptionBProperties(property.Value); + continue; + } + if (property.NameEquals("optionAProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + optionAProperties = VpnConfigurationPatchablePropertiesOptionAProperties.DeserializeVpnConfigurationPatchablePropertiesOptionAProperties(property.Value); + continue; + } + } + return new VpnConfigurationPatchableProperties(networkToNetworkInterconnectId.Value, Optional.ToNullable(peeringOption), optionBProperties.Value, optionAProperties.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.cs new file mode 100644 index 0000000000000..bf648e4699b8b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// Network and credential configuration currently applied on terminal server. + public partial class VpnConfigurationPatchableProperties + { + /// Initializes a new instance of VpnConfigurationPatchableProperties. + public VpnConfigurationPatchableProperties() + { + } + + /// Initializes a new instance of VpnConfigurationPatchableProperties. + /// ARM Resource ID of the Network To Network Interconnect. + /// Peering option list. + /// option B properties. + /// option A properties. + internal VpnConfigurationPatchableProperties(ResourceIdentifier networkToNetworkInterconnectId, PeeringOption? peeringOption, OptionBProperties optionBProperties, VpnConfigurationPatchablePropertiesOptionAProperties optionAProperties) + { + NetworkToNetworkInterconnectId = networkToNetworkInterconnectId; + PeeringOption = peeringOption; + OptionBProperties = optionBProperties; + OptionAProperties = optionAProperties; + } + + /// ARM Resource ID of the Network To Network Interconnect. + public ResourceIdentifier NetworkToNetworkInterconnectId { get; set; } + /// Peering option list. + public PeeringOption? PeeringOption { get; set; } + /// option B properties. + public OptionBProperties OptionBProperties { get; set; } + /// option A properties. + public VpnConfigurationPatchablePropertiesOptionAProperties OptionAProperties { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.Serialization.cs similarity index 83% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.Serialization.cs index 46a49332106c8..5bfad8979ae1b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.Serialization.cs @@ -10,31 +10,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class Layer3OptionAProperties : IUtf8JsonSerializable + public partial class VpnConfigurationPatchablePropertiesOptionAProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Mtu)) - { - writer.WritePropertyName("mtu"u8); - writer.WriteNumberValue(Mtu.Value); - } - if (Optional.IsDefined(VlanId)) - { - writer.WritePropertyName("vlanId"u8); - writer.WriteNumberValue(VlanId.Value); - } - if (Optional.IsDefined(PeerASN)) - { - writer.WritePropertyName("peerASN"u8); - writer.WriteNumberValue(PeerASN.Value); - } - if (Optional.IsDefined(BfdConfiguration)) - { - writer.WritePropertyName("bfdConfiguration"u8); - writer.WriteObjectValue(BfdConfiguration); - } if (Optional.IsDefined(PrimaryIPv4Prefix)) { writer.WritePropertyName("primaryIpv4Prefix"u8); @@ -55,26 +35,65 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("secondaryIpv6Prefix"u8); writer.WriteStringValue(SecondaryIPv6Prefix); } + if (Optional.IsDefined(Mtu)) + { + writer.WritePropertyName("mtu"u8); + writer.WriteNumberValue(Mtu.Value); + } + if (Optional.IsDefined(VlanId)) + { + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId.Value); + } + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } writer.WriteEndObject(); } - internal static Layer3OptionAProperties DeserializeLayer3OptionAProperties(JsonElement element) + internal static VpnConfigurationPatchablePropertiesOptionAProperties DeserializeVpnConfigurationPatchablePropertiesOptionAProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional mtu = default; - Optional vlanId = default; - Optional fabricASN = default; - Optional peerASN = default; - Optional bfdConfiguration = default; Optional primaryIPv4Prefix = default; Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; Optional secondaryIPv6Prefix = default; + Optional mtu = default; + Optional vlanId = default; + Optional peerASN = default; + Optional bfdConfiguration = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("primaryIpv4Prefix"u8)) + { + primaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryIpv6Prefix"u8)) + { + primaryIPv6Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv4Prefix"u8)) + { + secondaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv6Prefix"u8)) + { + secondaryIPv6Prefix = property.Value.GetString(); + continue; + } if (property.NameEquals("mtu"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -93,22 +112,13 @@ internal static Layer3OptionAProperties DeserializeLayer3OptionAProperties(JsonE vlanId = property.Value.GetInt32(); continue; } - if (property.NameEquals("fabricASN"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fabricASN = property.Value.GetInt32(); - continue; - } if (property.NameEquals("peerASN"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - peerASN = property.Value.GetInt32(); + peerASN = property.Value.GetInt64(); continue; } if (property.NameEquals("bfdConfiguration"u8)) @@ -120,28 +130,8 @@ internal static Layer3OptionAProperties DeserializeLayer3OptionAProperties(JsonE bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); continue; } - if (property.NameEquals("primaryIpv4Prefix"u8)) - { - primaryIPv4Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("primaryIpv6Prefix"u8)) - { - primaryIPv6Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryIpv4Prefix"u8)) - { - secondaryIPv4Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryIpv6Prefix"u8)) - { - secondaryIPv6Prefix = property.Value.GetString(); - continue; - } } - return new Layer3OptionAProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(fabricASN), Optional.ToNullable(peerASN), bfdConfiguration.Value); + return new VpnConfigurationPatchablePropertiesOptionAProperties(Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(peerASN), bfdConfiguration.Value, primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.cs new file mode 100644 index 0000000000000..87029d3d86841 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchablePropertiesOptionAProperties.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// option A properties. + public partial class VpnConfigurationPatchablePropertiesOptionAProperties : OptionAProperties + { + /// Initializes a new instance of VpnConfigurationPatchablePropertiesOptionAProperties. + public VpnConfigurationPatchablePropertiesOptionAProperties() + { + } + + /// Initializes a new instance of VpnConfigurationPatchablePropertiesOptionAProperties. + /// MTU to use for option A peering. + /// Vlan Id.Example : 501. + /// Peer ASN number.Example : 28. + /// BFD Configuration properties. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + internal VpnConfigurationPatchablePropertiesOptionAProperties(int? mtu, int? vlanId, long? peerASN, BfdConfiguration bfdConfiguration, string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) : base(mtu, vlanId, peerASN, bfdConfiguration) + { + PrimaryIPv4Prefix = primaryIPv4Prefix; + PrimaryIPv6Prefix = primaryIPv6Prefix; + SecondaryIPv4Prefix = secondaryIPv4Prefix; + SecondaryIPv6Prefix = secondaryIPv6Prefix; + } + + /// IPv4 Address Prefix. + public string PrimaryIPv4Prefix { get; set; } + /// IPv6 Address Prefix. + public string PrimaryIPv6Prefix { get; set; } + /// Secondary IPv4 Address Prefix. + public string SecondaryIPv4Prefix { get; set; } + /// Secondary IPv6 Address Prefix. + public string SecondaryIPv6Prefix { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.Serialization.cs index 2e67b1c4d10ba..11a2b7cda01b4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.Serialization.cs @@ -15,6 +15,11 @@ public partial class VpnConfigurationProperties : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(NetworkToNetworkInterconnectId)) + { + writer.WritePropertyName("networkToNetworkInterconnectId"u8); + writer.WriteStringValue(NetworkToNetworkInterconnectId); + } writer.WritePropertyName("peeringOption"u8); writer.WriteStringValue(PeeringOption.ToString()); if (Optional.IsDefined(OptionBProperties)) @@ -36,25 +41,29 @@ internal static VpnConfigurationProperties DeserializeVpnConfigurationProperties { return null; } - Optional administrativeState = default; - Optional networkToNetworkInterconnectId = default; + Optional networkToNetworkInterconnectId = default; + Optional administrativeState = default; PeeringOption peeringOption = default; - Optional optionBProperties = default; - Optional optionAProperties = default; + Optional optionBProperties = default; + Optional optionAProperties = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("administrativeState"u8)) + if (property.NameEquals("networkToNetworkInterconnectId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property.Value.GetString()); + networkToNetworkInterconnectId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("networkToNetworkInterconnectId"u8)) + if (property.NameEquals("administrativeState"u8)) { - networkToNetworkInterconnectId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new AdministrativeState(property.Value.GetString()); continue; } if (property.NameEquals("peeringOption"u8)) @@ -68,7 +77,7 @@ internal static VpnConfigurationProperties DeserializeVpnConfigurationProperties { continue; } - optionBProperties = NetworkFabricOptionBProperties.DeserializeNetworkFabricOptionBProperties(property.Value); + optionBProperties = OptionBProperties.DeserializeOptionBProperties(property.Value); continue; } if (property.NameEquals("optionAProperties"u8)) @@ -77,11 +86,11 @@ internal static VpnConfigurationProperties DeserializeVpnConfigurationProperties { continue; } - optionAProperties = NetworkFabricOptionAProperties.DeserializeNetworkFabricOptionAProperties(property.Value); + optionAProperties = VpnConfigurationPropertiesOptionAProperties.DeserializeVpnConfigurationPropertiesOptionAProperties(property.Value); continue; } } - return new VpnConfigurationProperties(Optional.ToNullable(administrativeState), networkToNetworkInterconnectId.Value, peeringOption, optionBProperties.Value, optionAProperties.Value); + return new VpnConfigurationProperties(networkToNetworkInterconnectId.Value, Optional.ToNullable(administrativeState), peeringOption, optionBProperties.Value, optionAProperties.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.cs index 0cba07e34f885..1ea1cc44c1864 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationProperties.cs @@ -5,9 +5,11 @@ #nullable disable +using Azure.Core; + namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Configuration for infrastructure vpn. + /// Network and credential configuration currently applied on terminal server. public partial class VpnConfigurationProperties { /// Initializes a new instance of VpnConfigurationProperties. @@ -18,29 +20,29 @@ public VpnConfigurationProperties(PeeringOption peeringOption) } /// Initializes a new instance of VpnConfigurationProperties. - /// Indicates configuration state. Example: Enabled | Disabled. - /// Gets the networkToNetworkInterconnectId of the resource. + /// ARM Resource ID of the Network To Network Interconnect. + /// Administrative state of the resource. /// Peering option list. /// option B properties. /// option A properties. - internal VpnConfigurationProperties(EnabledDisabledState? administrativeState, string networkToNetworkInterconnectId, PeeringOption peeringOption, NetworkFabricOptionBProperties optionBProperties, NetworkFabricOptionAProperties optionAProperties) + internal VpnConfigurationProperties(ResourceIdentifier networkToNetworkInterconnectId, AdministrativeState? administrativeState, PeeringOption peeringOption, OptionBProperties optionBProperties, VpnConfigurationPropertiesOptionAProperties optionAProperties) { - AdministrativeState = administrativeState; NetworkToNetworkInterconnectId = networkToNetworkInterconnectId; + AdministrativeState = administrativeState; PeeringOption = peeringOption; OptionBProperties = optionBProperties; OptionAProperties = optionAProperties; } - /// Indicates configuration state. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// Gets the networkToNetworkInterconnectId of the resource. - public string NetworkToNetworkInterconnectId { get; } + /// ARM Resource ID of the Network To Network Interconnect. + public ResourceIdentifier NetworkToNetworkInterconnectId { get; set; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } /// Peering option list. public PeeringOption PeeringOption { get; set; } /// option B properties. - public NetworkFabricOptionBProperties OptionBProperties { get; set; } + public OptionBProperties OptionBProperties { get; set; } /// option A properties. - public NetworkFabricOptionAProperties OptionAProperties { get; set; } + public VpnConfigurationPropertiesOptionAProperties OptionAProperties { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.Serialization.cs similarity index 85% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.Serialization.cs index 2f562d7dcc250..17a4a7dbee538 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.Serialization.cs @@ -10,31 +10,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class NetworkFabricOptionAProperties : IUtf8JsonSerializable + public partial class VpnConfigurationPropertiesOptionAProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Mtu)) - { - writer.WritePropertyName("mtu"u8); - writer.WriteNumberValue(Mtu.Value); - } - if (Optional.IsDefined(VlanId)) - { - writer.WritePropertyName("vlanId"u8); - writer.WriteNumberValue(VlanId.Value); - } - if (Optional.IsDefined(PeerASN)) - { - writer.WritePropertyName("peerASN"u8); - writer.WriteNumberValue(PeerASN.Value); - } - if (Optional.IsDefined(BfdConfiguration)) - { - writer.WritePropertyName("bfdConfiguration"u8); - writer.WriteObjectValue(BfdConfiguration); - } if (Optional.IsDefined(PrimaryIPv4Prefix)) { writer.WritePropertyName("primaryIpv4Prefix"u8); @@ -55,25 +35,65 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("secondaryIpv6Prefix"u8); writer.WriteStringValue(SecondaryIPv6Prefix); } + if (Optional.IsDefined(Mtu)) + { + writer.WritePropertyName("mtu"u8); + writer.WriteNumberValue(Mtu.Value); + } + if (Optional.IsDefined(VlanId)) + { + writer.WritePropertyName("vlanId"u8); + writer.WriteNumberValue(VlanId.Value); + } + if (Optional.IsDefined(PeerASN)) + { + writer.WritePropertyName("peerASN"u8); + writer.WriteNumberValue(PeerASN.Value); + } + if (Optional.IsDefined(BfdConfiguration)) + { + writer.WritePropertyName("bfdConfiguration"u8); + writer.WriteObjectValue(BfdConfiguration); + } writer.WriteEndObject(); } - internal static NetworkFabricOptionAProperties DeserializeNetworkFabricOptionAProperties(JsonElement element) + internal static VpnConfigurationPropertiesOptionAProperties DeserializeVpnConfigurationPropertiesOptionAProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - Optional mtu = default; - Optional vlanId = default; - Optional peerASN = default; - Optional bfdConfiguration = default; Optional primaryIPv4Prefix = default; Optional primaryIPv6Prefix = default; Optional secondaryIPv4Prefix = default; Optional secondaryIPv6Prefix = default; + Optional mtu = default; + Optional vlanId = default; + Optional peerASN = default; + Optional bfdConfiguration = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("primaryIpv4Prefix"u8)) + { + primaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryIpv6Prefix"u8)) + { + primaryIPv6Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv4Prefix"u8)) + { + secondaryIPv4Prefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryIpv6Prefix"u8)) + { + secondaryIPv6Prefix = property.Value.GetString(); + continue; + } if (property.NameEquals("mtu"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -98,7 +118,7 @@ internal static NetworkFabricOptionAProperties DeserializeNetworkFabricOptionAPr { continue; } - peerASN = property.Value.GetInt32(); + peerASN = property.Value.GetInt64(); continue; } if (property.NameEquals("bfdConfiguration"u8)) @@ -107,31 +127,11 @@ internal static NetworkFabricOptionAProperties DeserializeNetworkFabricOptionAPr { continue; } - bfdConfiguration = FabricBfdConfiguration.DeserializeFabricBfdConfiguration(property.Value); - continue; - } - if (property.NameEquals("primaryIpv4Prefix"u8)) - { - primaryIPv4Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("primaryIpv6Prefix"u8)) - { - primaryIPv6Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryIpv4Prefix"u8)) - { - secondaryIPv4Prefix = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryIpv6Prefix"u8)) - { - secondaryIPv6Prefix = property.Value.GetString(); + bfdConfiguration = BfdConfiguration.DeserializeBfdConfiguration(property.Value); continue; } } - return new NetworkFabricOptionAProperties(primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value, Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(peerASN), bfdConfiguration.Value); + return new VpnConfigurationPropertiesOptionAProperties(Optional.ToNullable(mtu), Optional.ToNullable(vlanId), Optional.ToNullable(peerASN), bfdConfiguration.Value, primaryIPv4Prefix.Value, primaryIPv6Prefix.Value, secondaryIPv4Prefix.Value, secondaryIPv6Prefix.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.cs new file mode 100644 index 0000000000000..1641ba4b5d8d2 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPropertiesOptionAProperties.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// option A properties. + public partial class VpnConfigurationPropertiesOptionAProperties : OptionAProperties + { + /// Initializes a new instance of VpnConfigurationPropertiesOptionAProperties. + public VpnConfigurationPropertiesOptionAProperties() + { + } + + /// Initializes a new instance of VpnConfigurationPropertiesOptionAProperties. + /// MTU to use for option A peering. + /// Vlan Id.Example : 501. + /// Peer ASN number.Example : 28. + /// BFD Configuration properties. + /// IPv4 Address Prefix. + /// IPv6 Address Prefix. + /// Secondary IPv4 Address Prefix. + /// Secondary IPv6 Address Prefix. + internal VpnConfigurationPropertiesOptionAProperties(int? mtu, int? vlanId, long? peerASN, BfdConfiguration bfdConfiguration, string primaryIPv4Prefix, string primaryIPv6Prefix, string secondaryIPv4Prefix, string secondaryIPv6Prefix) : base(mtu, vlanId, peerASN, bfdConfiguration) + { + PrimaryIPv4Prefix = primaryIPv4Prefix; + PrimaryIPv6Prefix = primaryIPv6Prefix; + SecondaryIPv4Prefix = secondaryIPv4Prefix; + SecondaryIPv6Prefix = secondaryIPv6Prefix; + } + + /// IPv4 Address Prefix. + public string PrimaryIPv4Prefix { get; set; } + /// IPv6 Address Prefix. + public string PrimaryIPv6Prefix { get; set; } + /// Secondary IPv4 Address Prefix. + public string SecondaryIPv4Prefix { get; set; } + /// Secondary IPv6 Address Prefix. + public string SecondaryIPv6Prefix { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.cs deleted file mode 100644 index 63ec07483062e..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// WorkloadServices IP ranges. - public partial class WorkloadServices - { - /// Initializes a new instance of WorkloadServices. - internal WorkloadServices() - { - IPv4AddressSpaces = new ChangeTrackingList(); - IPv6AddressSpaces = new ChangeTrackingList(); - } - - /// Initializes a new instance of WorkloadServices. - /// The IPv4 Address space is optional, if the value is defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. - /// The IPv6 is not supported right now. - internal WorkloadServices(IReadOnlyList ipv4AddressSpaces, IReadOnlyList ipv6AddressSpaces) - { - IPv4AddressSpaces = ipv4AddressSpaces; - IPv6AddressSpaces = ipv6AddressSpaces; - } - - /// The IPv4 Address space is optional, if the value is defined at the time of NFC creation, then the default value 10.0.0.0/19 is considered. The IPV4 address subnet is an optional attribute. - public IReadOnlyList IPv4AddressSpaces { get; } - /// The IPv6 is not supported right now. - public IReadOnlyList IPv6AddressSpaces { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupCollection.cs new file mode 100644 index 0000000000000..8a10332b7031a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNeighborGroups method from an instance of . + /// + public partial class NeighborGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _neighborGroupClientDiagnostics; + private readonly NeighborGroupsRestOperations _neighborGroupRestClient; + + /// Initializes a new instance of the class for mocking. + protected NeighborGroupCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NeighborGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neighborGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NeighborGroupResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NeighborGroupResource.ResourceType, out string neighborGroupApiVersion); + _neighborGroupRestClient = new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neighborGroupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Implements the Neighbor Group PUT method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Neighbor Group. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string neighborGroupName, NeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NeighborGroupOperationSource(Client), _neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the Neighbor Group PUT method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Neighbor Group. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string neighborGroupName, NeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NeighborGroupOperationSource(Client), _neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.Get"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeighborGroupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.Get"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeighborGroupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Displays NeighborGroups list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neighborGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neighborGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeighborGroupResource(Client, NeighborGroupData.DeserializeNeighborGroupData(e)), _neighborGroupClientDiagnostics, Pipeline, "NeighborGroupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Displays NeighborGroups list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups + /// + /// + /// Operation Id + /// NeighborGroups_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neighborGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neighborGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeighborGroupResource(Client, NeighborGroupData.DeserializeNeighborGroupData(e)), _neighborGroupClientDiagnostics, Pipeline, "NeighborGroupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.Exists"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupCollection.Exists"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupData.cs new file mode 100644 index 0000000000000..7bce7f296b3b5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupData.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NeighborGroup data model. + /// Defines the Neighbor Group. + /// + public partial class NeighborGroupData : TrackedResourceData + { + /// Initializes a new instance of NeighborGroupData. + /// The location. + public NeighborGroupData(AzureLocation location) : base(location) + { + NetworkTapIds = new ChangeTrackingList(); + NetworkTapRuleIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of NeighborGroupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// An array of destination IPv4 Addresses or IPv6 Addresses. + /// List of NetworkTap IDs where neighbor group is associated. + /// List of Network Tap Rule IDs where neighbor group is associated. + /// The provisioning state of the resource. + internal NeighborGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, NeighborGroupDestination destination, IReadOnlyList networkTapIds, IReadOnlyList networkTapRuleIds, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + Destination = destination; + NetworkTapIds = networkTapIds; + NetworkTapRuleIds = networkTapRuleIds; + ProvisioningState = provisioningState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// An array of destination IPv4 Addresses or IPv6 Addresses. + public NeighborGroupDestination Destination { get; set; } + /// List of NetworkTap IDs where neighbor group is associated. + public IReadOnlyList NetworkTapIds { get; } + /// List of Network Tap Rule IDs where neighbor group is associated. + public IReadOnlyList NetworkTapRuleIds { get; } + /// The provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupResource.cs new file mode 100644 index 0000000000000..4ad65802786dd --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NeighborGroupResource.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NeighborGroup along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNeighborGroupResource method. + /// Otherwise you can get one from its parent resource using the GetNeighborGroup method. + /// + public partial class NeighborGroupResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string neighborGroupName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _neighborGroupClientDiagnostics; + private readonly NeighborGroupsRestOperations _neighborGroupRestClient; + private readonly NeighborGroupData _data; + + /// Initializes a new instance of the class for mocking. + protected NeighborGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NeighborGroupResource(ArmClient client, NeighborGroupData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NeighborGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neighborGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string neighborGroupApiVersion); + _neighborGroupRestClient = new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neighborGroupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/neighborGroups"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NeighborGroupData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Get"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeighborGroupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Get"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeighborGroupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Neighbor Group DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Delete"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Neighbor Group DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Delete"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Neighbor Group properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Update"); + scope.Start(); + try + { + var response = await _neighborGroupRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NeighborGroupOperationSource(Client), _neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Neighbor Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Neighbor Group properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.Update"); + scope.Start(); + try + { + var response = _neighborGroupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NeighborGroupOperationSource(Client), _neighborGroupClientDiagnostics, Pipeline, _neighborGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NeighborGroupPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NeighborGroupPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NeighborGroupPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NeighborGroupPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _neighborGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NeighborGroupPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/neighborGroups/{neighborGroupName} + /// + /// + /// Operation Id + /// NeighborGroups_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _neighborGroupClientDiagnostics.CreateScope("NeighborGroupResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _neighborGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NeighborGroupPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceCollection.cs index b71bde1cabd41..79534401490f4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceCollection.cs @@ -136,7 +136,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path @@ -173,7 +173,7 @@ public virtual async Task> GetAsync(string netwo } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs index 8d69c6db170b8..cfd1ed284ec7c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkDevice data model. - /// The NetworkDevice resource definition. + /// The Network Device resource definition. /// public partial class NetworkDeviceData : TrackedResourceData { @@ -32,14 +32,18 @@ public NetworkDeviceData(AzureLocation location) : base(location) /// The tags. /// The location. /// Switch configuration description. - /// The host Name of the device. - /// serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + /// The host name of the device. + /// Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. /// Current version of the device as defined in SKU. /// Network Device SKU name. - /// networkDeviceRole is the device role: Example: CE | ToR. - /// Gets the provisioning state of the resource. + /// NetworkDeviceRole is the device role: Example: CE | ToR. /// Reference to network rack resource id. - internal NetworkDeviceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, string hostName, string serialNumber, string version, string networkDeviceSku, NetworkDeviceRoleType? networkDeviceRole, ProvisioningState? provisioningState, string networkRackId) : base(id, name, resourceType, systemData, tags, location) + /// Management IPv4 Address. + /// Management IPv6 Address. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkDeviceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, string hostName, string serialNumber, string version, string networkDeviceSku, NetworkDeviceRole? networkDeviceRole, string networkRackId, string managementIPv4Address, string managementIPv6Address, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; HostName = hostName; @@ -47,25 +51,37 @@ internal NetworkDeviceData(ResourceIdentifier id, string name, ResourceType reso Version = version; NetworkDeviceSku = networkDeviceSku; NetworkDeviceRole = networkDeviceRole; - ProvisioningState = provisioningState; NetworkRackId = networkRackId; + ManagementIPv4Address = managementIPv4Address; + ManagementIPv6Address = managementIPv6Address; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// The host Name of the device. + /// The host name of the device. public string HostName { get; set; } - /// serialNumber of the format Make;Model;HardwareRevisionId;SerialNumber. Example: Arista;DCS-7280DR3-24;12.05;JPE21116969. + /// Serial number of the device. Format of serial Number - Make;Model;HardwareRevisionId;SerialNumber. public string SerialNumber { get; set; } /// Current version of the device as defined in SKU. public string Version { get; } /// Network Device SKU name. public string NetworkDeviceSku { get; set; } - /// networkDeviceRole is the device role: Example: CE | ToR. - public NetworkDeviceRoleType? NetworkDeviceRole { get; set; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } + /// NetworkDeviceRole is the device role: Example: CE | ToR. + public NetworkDeviceRole? NetworkDeviceRole { get; } /// Reference to network rack resource id. public string NetworkRackId { get; } + /// Management IPv4 Address. + public string ManagementIPv4Address { get; } + /// Management IPv6 Address. + public string ManagementIPv6Address { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs index 4a7bb418ca026..62f82b67cca61 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs @@ -109,7 +109,7 @@ public virtual NetworkInterfaceCollection GetNetworkInterfaces() /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -132,7 +132,7 @@ public virtual async Task> GetNetworkInterfac /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -143,7 +143,7 @@ public virtual Response GetNetworkInterface(string net } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path @@ -175,7 +175,7 @@ public virtual async Task> GetAsync(Cancellation } /// - /// Get the Network Device resource details. + /// Gets the Network Device resource details. /// /// /// Request Path @@ -359,22 +359,26 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Operation Id - /// NetworkDevices_reboot + /// NetworkDevices_Reboot /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. /// The cancellation token to use. - public virtual async Task RebootAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> RebootAsync(WaitUntil waitUntil, RebootProperties body, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(body, nameof(body)); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Reboot"); scope.Start(); try { - var response = await _networkDeviceRestClient.RebootAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkDeviceRestClient.RebootAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -393,22 +397,26 @@ public virtual async Task RebootAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// NetworkDevices_reboot + /// NetworkDevices_Reboot /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. /// The cancellation token to use. - public virtual ArmOperation Reboot(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Reboot(WaitUntil waitUntil, RebootProperties body, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(body, nameof(body)); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Reboot"); scope.Start(); try { - var response = _networkDeviceRestClient.Reboot(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkDeviceRestClient.Reboot(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -419,30 +427,30 @@ public virtual ArmOperation Reboot(WaitUntil waitUntil, CancellationToken cancel } /// - /// Restore the configuration of the Network Device resource to last known good configuration. + /// Refreshes the configuration the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration /// /// /// Operation Id - /// NetworkDevices_restoreConfig + /// NetworkDevices_RefreshConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task RestoreConfigAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RefreshConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RestoreConfig"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RefreshConfiguration"); scope.Start(); try { - var response = await _networkDeviceRestClient.RestoreConfigAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRestoreConfigRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkDeviceRestClient.RefreshConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -453,30 +461,30 @@ public virtual async Task RestoreConfigAsync(WaitUntil waitUntil, } /// - /// Restore the configuration of the Network Device resource to last known good configuration. + /// Refreshes the configuration the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration /// /// /// Operation Id - /// NetworkDevices_restoreConfig + /// NetworkDevices_RefreshConfiguration /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation RestoreConfig(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation RefreshConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RestoreConfig"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RefreshConfiguration"); scope.Start(); try { - var response = _networkDeviceRestClient.RestoreConfig(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRestoreConfigRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkDeviceRestClient.RefreshConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -487,15 +495,15 @@ public virtual ArmOperation RestoreConfig(WaitUntil waitUntil, CancellationToken } /// - /// Update the SKU version of the Network Device resource. + /// Updates the Administrative state of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState /// /// /// Operation Id - /// NetworkDevices_updateVersion + /// NetworkDevices_UpdateAdministrativeState /// /// /// @@ -503,18 +511,18 @@ public virtual ArmOperation RestoreConfig(WaitUntil waitUntil, CancellationToken /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, UpdateVersionProperties body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateDeviceAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateVersion"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateAdministrativeState"); scope.Start(); try { - var response = await _networkDeviceRestClient.UpdateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _networkDeviceRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -525,15 +533,15 @@ public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, } /// - /// Update the SKU version of the Network Device resource. + /// Updates the Administrative state of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateAdministrativeState /// /// /// Operation Id - /// NetworkDevices_updateVersion + /// NetworkDevices_UpdateAdministrativeState /// /// /// @@ -541,84 +549,16 @@ public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, UpdateVersionProperties body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateDeviceAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateVersion"); - scope.Start(); - try - { - var response = _networkDeviceRestClient.UpdateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Generate Support Package for the given Network Device. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage - /// - /// - /// Operation Id - /// NetworkDevices_generateSupportPackage - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> GenerateSupportPackageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GenerateSupportPackage"); - scope.Start(); - try - { - var response = await _networkDeviceRestClient.GenerateSupportPackageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new SupportPackagePropertiesOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateGenerateSupportPackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Generate Support Package for the given Network Device. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage - /// - /// - /// Operation Id - /// NetworkDevices_generateSupportPackage - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation GenerateSupportPackage(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GenerateSupportPackage"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateAdministrativeState"); scope.Start(); try { - var response = _networkDeviceRestClient.GenerateSupportPackage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new SupportPackagePropertiesOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateGenerateSupportPackageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkDeviceRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -631,15 +571,15 @@ public virtual ArmOperation GenerateSupportPackage(Wai } /// - /// Update PDU power cycle of the Network Device. + /// Upgrades the version of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updatePowerCycle + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade /// /// /// Operation Id - /// NetworkDevices_updatePowerCycle + /// NetworkDevices_Upgrade /// /// /// @@ -647,18 +587,18 @@ public virtual ArmOperation GenerateSupportPackage(Wai /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdatePowerCycleAsync(WaitUntil waitUntil, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + public virtual async Task> UpgradeAsync(WaitUntil waitUntil, UpdateVersion body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdatePowerCycle"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Upgrade"); scope.Start(); try { - var response = await _networkDeviceRestClient.UpdatePowerCycleAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdatePowerCycleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var response = await _networkDeviceRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -669,15 +609,15 @@ public virtual async Task UpdatePowerCycleAsync(WaitUntil waitUnti } /// - /// Update PDU power cycle of the Network Device. + /// Upgrades the version of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updatePowerCycle + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade /// /// /// Operation Id - /// NetworkDevices_updatePowerCycle + /// NetworkDevices_Upgrade /// /// /// @@ -685,84 +625,16 @@ public virtual async Task UpdatePowerCycleAsync(WaitUntil waitUnti /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdatePowerCycle(WaitUntil waitUntil, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + public virtual ArmOperation Upgrade(WaitUntil waitUntil, UpdateVersion body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdatePowerCycle"); - scope.Start(); - try - { - var response = _networkDeviceRestClient.UpdatePowerCycle(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdatePowerCycleRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the running status of the Network Device. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus - /// - /// - /// Operation Id - /// NetworkDevices_getStatus - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> GetStatusAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GetStatus"); - scope.Start(); - try - { - var response = await _networkDeviceRestClient.GetStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new GetDeviceStatusPropertiesOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateGetStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the running status of the Network Device. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus - /// - /// - /// Operation Id - /// NetworkDevices_getStatus - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation GetStatus(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GetStatus"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Upgrade"); scope.Start(); try { - var response = _networkDeviceRestClient.GetStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new GetDeviceStatusPropertiesOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateGetStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkDeviceRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuCollection.cs index 9ba95d4866af9..226611c812715 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuCollection.cs @@ -54,7 +54,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -91,7 +91,7 @@ public virtual async Task> GetAsync(string ne } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path @@ -103,7 +103,7 @@ public virtual async Task> GetAsync(string ne /// /// /// - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -219,7 +219,7 @@ public virtual async Task> ExistsAsync(string networkDeviceSkuNam /// /// /// - /// Name of the Network Device Sku. + /// Name of the Network Device SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs index 1bec4025b56f2..bd278cb812abd 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs @@ -39,17 +39,15 @@ public NetworkDeviceSkuData(string model) /// The systemData. /// Model of the network device. /// Manufacturer of the network device. - /// List of network device interfaces. - /// Network device limits. + /// List of supported version details of network device. /// Available roles for the network device. /// List of network device interfaces. - /// Gets the provisioning state of the resource. - internal NetworkDeviceSkuData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string model, string manufacturer, IList supportedVersions, DeviceLimits limits, IList supportedRoleTypes, IList interfaces, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + /// Provisioning state of the resource. + internal NetworkDeviceSkuData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string model, string manufacturer, IList supportedVersions, IList supportedRoleTypes, IList interfaces, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { Model = model; Manufacturer = manufacturer; SupportedVersions = supportedVersions; - Limits = limits; SupportedRoleTypes = supportedRoleTypes; Interfaces = interfaces; ProvisioningState = provisioningState; @@ -59,15 +57,13 @@ internal NetworkDeviceSkuData(ResourceIdentifier id, string name, ResourceType r public string Model { get; set; } /// Manufacturer of the network device. public string Manufacturer { get; set; } - /// List of network device interfaces. + /// List of supported version details of network device. public IList SupportedVersions { get; } - /// Network device limits. - public DeviceLimits Limits { get; set; } /// Available roles for the network device. public IList SupportedRoleTypes { get; } /// List of network device interfaces. public IList Interfaces { get; } - /// Gets the provisioning state of the resource. + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.cs index 605150437bb75..6ee260faa062d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.cs @@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path @@ -120,7 +120,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Get Network Device SKU details. + /// Get a Network Device SKU details. /// /// /// Request Path diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerData.cs index 539f9162053eb..d438f2bb0d7b7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkFabricController data model. - /// The NetworkFabricController resource definition. + /// The Network Fabric Controller resource definition. /// public partial class NetworkFabricControllerData : TrackedResourceData { @@ -24,7 +24,8 @@ public NetworkFabricControllerData(AzureLocation location) : base(location) { InfrastructureExpressRouteConnections = new ChangeTrackingList(); WorkloadExpressRouteConnections = new ChangeTrackingList(); - NetworkFabricIds = new ChangeTrackingList(); + NetworkFabricIds = new ChangeTrackingList(); + TenantInternetGatewayIds = new ChangeTrackingList(); } /// Initializes a new instance of NetworkFabricControllerData. @@ -41,12 +42,14 @@ public NetworkFabricControllerData(AzureLocation location) : base(location) /// WorkloadServices IP ranges. /// Managed Resource Group configuration properties. /// The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service. - /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for the backward compatibility. + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + /// List of tenant InternetGateway resource IDs. /// IPv4 Network Fabric Controller Address Space. /// IPv6 Network Fabric Controller Address Space. - /// The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. + /// Network Fabric Controller SKU. /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. - internal NetworkFabricControllerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList infrastructureExpressRouteConnections, IList workloadExpressRouteConnections, InfrastructureServices infrastructureServices, WorkloadServices workloadServices, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, IReadOnlyList networkFabricIds, bool? workloadManagementNetwork, string ipv4AddressSpace, string ipv6AddressSpace, NetworkFabricControllerOperationalState? operationalState, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + internal NetworkFabricControllerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList infrastructureExpressRouteConnections, IList workloadExpressRouteConnections, ControllerServices infrastructureServices, ControllerServices workloadServices, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, IReadOnlyList networkFabricIds, bool? workloadManagementNetwork, IsWorkloadManagementNetworkEnabled? isWorkloadManagementNetworkEnabled, IReadOnlyList tenantInternetGatewayIds, string ipv4AddressSpace, string ipv6AddressSpace, NfcSku? nfcSku, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; InfrastructureExpressRouteConnections = infrastructureExpressRouteConnections; @@ -56,9 +59,11 @@ internal NetworkFabricControllerData(ResourceIdentifier id, string name, Resourc ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; NetworkFabricIds = networkFabricIds; WorkloadManagementNetwork = workloadManagementNetwork; + IsWorkloadManagementNetworkEnabled = isWorkloadManagementNetworkEnabled; + TenantInternetGatewayIds = tenantInternetGatewayIds; IPv4AddressSpace = ipv4AddressSpace; IPv6AddressSpace = ipv6AddressSpace; - OperationalState = operationalState; + NfcSku = nfcSku; ProvisioningState = provisioningState; } @@ -69,21 +74,25 @@ internal NetworkFabricControllerData(ResourceIdentifier id, string name, Resourc /// As part of an update, the workload ExpressRoute CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is a Mandatory attribute). public IList WorkloadExpressRouteConnections { get; } /// InfrastructureServices IP ranges. - public InfrastructureServices InfrastructureServices { get; } + public ControllerServices InfrastructureServices { get; } /// WorkloadServices IP ranges. - public WorkloadServices WorkloadServices { get; } + public ControllerServices WorkloadServices { get; } /// Managed Resource Group configuration properties. public ManagedResourceGroupConfiguration ManagedResourceGroupConfiguration { get; set; } /// The NF-ID will be an input parameter used by the NF to link and get associated with the parent NFC Service. - public IReadOnlyList NetworkFabricIds { get; } - /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + public IReadOnlyList NetworkFabricIds { get; } + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. This is used for the backward compatibility. public bool? WorkloadManagementNetwork { get; } + /// A workload management network is required for all the tenant (workload) traffic. This traffic is only dedicated for Tenant workloads which are required to access internet or any other MSFT/Public endpoints. + public IsWorkloadManagementNetworkEnabled? IsWorkloadManagementNetworkEnabled { get; set; } + /// List of tenant InternetGateway resource IDs. + public IReadOnlyList TenantInternetGatewayIds { get; } /// IPv4 Network Fabric Controller Address Space. public string IPv4AddressSpace { get; set; } /// IPv6 Network Fabric Controller Address Space. public string IPv6AddressSpace { get; set; } - /// The Operational Status would always be NULL. Look only in to the Provisioning state for the latest status. - public NetworkFabricControllerOperationalState? OperationalState { get; } + /// Network Fabric Controller SKU. + public NfcSku? NfcSku { get; set; } /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. public ProvisioningState? ProvisioningState { get; } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.cs index c4679d4a1d88a..862251508ae0a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.cs @@ -297,142 +297,6 @@ public virtual ArmOperation Update(WaitUntil wa } } - /// - /// Enables the workloadManagementNetwork (Tenant Network). - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/enableWorkloadManagementNetwork - /// - /// - /// Operation Id - /// NetworkFabricControllers_enableWorkloadManagementNetwork - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task EnableWorkloadManagementNetworkAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkFabricControllerClientDiagnostics.CreateScope("NetworkFabricControllerResource.EnableWorkloadManagementNetwork"); - scope.Start(); - try - { - var response = await _networkFabricControllerRestClient.EnableWorkloadManagementNetworkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricControllerClientDiagnostics, Pipeline, _networkFabricControllerRestClient.CreateEnableWorkloadManagementNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Enables the workloadManagementNetwork (Tenant Network). - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/enableWorkloadManagementNetwork - /// - /// - /// Operation Id - /// NetworkFabricControllers_enableWorkloadManagementNetwork - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation EnableWorkloadManagementNetwork(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkFabricControllerClientDiagnostics.CreateScope("NetworkFabricControllerResource.EnableWorkloadManagementNetwork"); - scope.Start(); - try - { - var response = _networkFabricControllerRestClient.EnableWorkloadManagementNetwork(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricControllerClientDiagnostics, Pipeline, _networkFabricControllerRestClient.CreateEnableWorkloadManagementNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the workloadManagementNetwork (Tenant Network). - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/disableWorkloadManagementNetwork - /// - /// - /// Operation Id - /// NetworkFabricControllers_disableWorkloadManagementNetwork - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DisableWorkloadManagementNetworkAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkFabricControllerClientDiagnostics.CreateScope("NetworkFabricControllerResource.DisableWorkloadManagementNetwork"); - scope.Start(); - try - { - var response = await _networkFabricControllerRestClient.DisableWorkloadManagementNetworkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricControllerClientDiagnostics, Pipeline, _networkFabricControllerRestClient.CreateDisableWorkloadManagementNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Disables the workloadManagementNetwork (Tenant Network). - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/{networkFabricControllerName}/disableWorkloadManagementNetwork - /// - /// - /// Operation Id - /// NetworkFabricControllers_disableWorkloadManagementNetwork - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation DisableWorkloadManagementNetwork(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkFabricControllerClientDiagnostics.CreateScope("NetworkFabricControllerResource.DisableWorkloadManagementNetwork"); - scope.Start(); - try - { - var response = _networkFabricControllerRestClient.DisableWorkloadManagementNetwork(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricControllerClientDiagnostics, Pipeline, _networkFabricControllerRestClient.CreateDisableWorkloadManagementNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricData.cs index 2f9dce4068284..ea489ff85e4d5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -14,14 +15,36 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkFabric data model. - /// The NetworkFabric resource definition. + /// The Network Fabric resource definition. /// public partial class NetworkFabricData : TrackedResourceData { /// Initializes a new instance of NetworkFabricData. /// The location. - public NetworkFabricData(AzureLocation location) : base(location) + /// Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. + /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. + /// Number of servers.Possible values are from 1-16. + /// IPv4Prefix for Management Network. Example: 10.1.0.0/19. + /// ASN of CE devices for CE/PE connectivity. + /// Network and credentials configuration currently applied to terminal server. + /// Configuration to be used to setup the management network. + /// , , , or is null. + public NetworkFabricData(AzureLocation location, string networkFabricSku, ResourceIdentifier networkFabricControllerId, int serverCountPerRack, string ipv4Prefix, long fabricASN, TerminalServerConfiguration terminalServerConfiguration, ManagementNetworkConfigurationProperties managementNetworkConfiguration) : base(location) { + Argument.AssertNotNull(networkFabricSku, nameof(networkFabricSku)); + Argument.AssertNotNull(networkFabricControllerId, nameof(networkFabricControllerId)); + Argument.AssertNotNull(ipv4Prefix, nameof(ipv4Prefix)); + Argument.AssertNotNull(terminalServerConfiguration, nameof(terminalServerConfiguration)); + Argument.AssertNotNull(managementNetworkConfiguration, nameof(managementNetworkConfiguration)); + + NetworkFabricSku = networkFabricSku; + RouterIds = new ChangeTrackingList(); + NetworkFabricControllerId = networkFabricControllerId; + ServerCountPerRack = serverCountPerRack; + IPv4Prefix = ipv4Prefix; + FabricASN = fabricASN; + TerminalServerConfiguration = terminalServerConfiguration; + ManagementNetworkConfiguration = managementNetworkConfiguration; Racks = new ChangeTrackingList(); L2IsolationDomains = new ChangeTrackingList(); L3IsolationDomains = new ChangeTrackingList(); @@ -35,72 +58,80 @@ public NetworkFabricData(AzureLocation location) : base(location) /// The tags. /// The location. /// Switch configuration description. - /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. - /// List of L2IsolationDomain resource IDs under the Network Fabric. - /// List of L3IsolationDomain resource IDs under the Network Fabric. /// Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. - /// Number of racks associated to Network Fabric.Possible values are from 2-8. + /// The version of Network Fabric. + /// Array of router IDs. + /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. + /// Number of compute racks associated to Network Fabric. /// Number of servers.Possible values are from 1-16. /// IPv4Prefix for Management Network. Example: 10.1.0.0/19. /// IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. - /// Router Id of CE to be used for MP-BGP between PE and CE. /// ASN of CE devices for CE/PE connectivity. - /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. /// Network and credentials configuration currently applied to terminal server. /// Configuration to be used to setup the management network. - /// Gets the operational state of the resource. - /// Gets the provisioning state of the resource. - internal NetworkFabricData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IReadOnlyList racks, IReadOnlyList l2IsolationDomains, IReadOnlyList l3IsolationDomains, string networkFabricSku, int? rackCount, int? serverCountPerRack, string ipv4Prefix, string ipv6Prefix, string routerId, int? fabricASN, string networkFabricControllerId, TerminalServerConfiguration terminalServerConfiguration, ManagementNetworkConfiguration managementNetworkConfiguration, NetworkFabricOperationalState? operationalState, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + /// List of L2 Isolation Domain resource IDs under the Network Fabric. + /// List of L3 Isolation Domain resource IDs under the Network Fabric. + /// Configuration state of the resource. + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. + /// Administrative state of the resource. + internal NetworkFabricData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, string networkFabricSku, string fabricVersion, IReadOnlyList routerIds, ResourceIdentifier networkFabricControllerId, int? rackCount, int serverCountPerRack, string ipv4Prefix, string ipv6Prefix, long fabricASN, TerminalServerConfiguration terminalServerConfiguration, ManagementNetworkConfigurationProperties managementNetworkConfiguration, IReadOnlyList racks, IReadOnlyList l2IsolationDomains, IReadOnlyList l3IsolationDomains, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; - Racks = racks; - L2IsolationDomains = l2IsolationDomains; - L3IsolationDomains = l3IsolationDomains; NetworkFabricSku = networkFabricSku; + FabricVersion = fabricVersion; + RouterIds = routerIds; + NetworkFabricControllerId = networkFabricControllerId; RackCount = rackCount; ServerCountPerRack = serverCountPerRack; IPv4Prefix = ipv4Prefix; IPv6Prefix = ipv6Prefix; - RouterId = routerId; FabricASN = fabricASN; - NetworkFabricControllerId = networkFabricControllerId; TerminalServerConfiguration = terminalServerConfiguration; ManagementNetworkConfiguration = managementNetworkConfiguration; - OperationalState = operationalState; + Racks = racks; + L2IsolationDomains = l2IsolationDomains; + L3IsolationDomains = l3IsolationDomains; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. - public IReadOnlyList Racks { get; } - /// List of L2IsolationDomain resource IDs under the Network Fabric. - public IReadOnlyList L2IsolationDomains { get; } - /// List of L3IsolationDomain resource IDs under the Network Fabric. - public IReadOnlyList L3IsolationDomains { get; } /// Supported Network Fabric SKU.Example: Compute / Aggregate racks. Once the user chooses a particular SKU, only supported racks can be added to the Network Fabric. The SKU determines whether it is a single / multi rack Network Fabric. public string NetworkFabricSku { get; set; } - /// Number of racks associated to Network Fabric.Possible values are from 2-8. + /// The version of Network Fabric. + public string FabricVersion { get; } + /// Array of router IDs. + public IReadOnlyList RouterIds { get; } + /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. + public ResourceIdentifier NetworkFabricControllerId { get; set; } + /// Number of compute racks associated to Network Fabric. public int? RackCount { get; set; } /// Number of servers.Possible values are from 1-16. - public int? ServerCountPerRack { get; set; } + public int ServerCountPerRack { get; set; } /// IPv4Prefix for Management Network. Example: 10.1.0.0/19. public string IPv4Prefix { get; set; } /// IPv6Prefix for Management Network. Example: 3FFE:FFFF:0:CD40::/59. public string IPv6Prefix { get; set; } - /// Router Id of CE to be used for MP-BGP between PE and CE. - public string RouterId { get; } /// ASN of CE devices for CE/PE connectivity. - public int? FabricASN { get; set; } - /// Azure resource ID for the NetworkFabricController the NetworkFabric belongs. - public string NetworkFabricControllerId { get; set; } + public long FabricASN { get; set; } /// Network and credentials configuration currently applied to terminal server. public TerminalServerConfiguration TerminalServerConfiguration { get; set; } /// Configuration to be used to setup the management network. - public ManagementNetworkConfiguration ManagementNetworkConfiguration { get; set; } - /// Gets the operational state of the resource. - public NetworkFabricOperationalState? OperationalState { get; } - /// Gets the provisioning state of the resource. + public ManagementNetworkConfigurationProperties ManagementNetworkConfiguration { get; set; } + /// List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed depends on the Network Fabric SKU. + public IReadOnlyList Racks { get; } + /// List of L2 Isolation Domain resource IDs under the Network Fabric. + public IReadOnlyList L2IsolationDomains { get; } + /// List of L3 Isolation Domain resource IDs under the Network Fabric. + public IReadOnlyList L3IsolationDomains { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of NFC provisioning. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.cs index 03e171ef7d0eb..eb21c17cc6522 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.cs @@ -109,7 +109,7 @@ public virtual NetworkToNetworkInterconnectCollection GetNetworkToNetworkInterco /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -132,7 +132,7 @@ public virtual async Task> GetNet /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -365,16 +365,16 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task ProvisionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> ProvisionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Provision"); scope.Start(); try { var response = await _networkFabricRestClient.ProvisionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateProvisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateProvisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -399,16 +399,16 @@ public virtual async Task ProvisionAsync(WaitUntil waitUntil, Canc /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Provision(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Provision(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Provision"); scope.Start(); try { var response = _networkFabricRestClient.Provision(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateProvisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateProvisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -433,16 +433,16 @@ public virtual ArmOperation Provision(WaitUntil waitUntil, CancellationToken can /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task DeprovisionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> DeprovisionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Deprovision"); scope.Start(); try { var response = await _networkFabricRestClient.DeprovisionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateDeprovisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateDeprovisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -467,16 +467,524 @@ public virtual async Task DeprovisionAsync(WaitUntil waitUntil, Ca /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Deprovision(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Deprovision(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Deprovision"); scope.Start(); try { var response = _networkFabricRestClient.Deprovision(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateDeprovisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateDeprovisionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades the version of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade + /// + /// + /// Operation Id + /// NetworkFabrics_upgrade + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Fabric properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpgradeAsync(WaitUntil waitUntil, UpdateVersion body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Upgrade"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades the version of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/upgrade + /// + /// + /// Operation Id + /// NetworkFabrics_upgrade + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Fabric properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Upgrade(WaitUntil waitUntil, UpdateVersion body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Upgrade"); + scope.Start(); + try + { + var response = _networkFabricRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Refreshes the configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_refreshConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> RefreshConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.RefreshConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.RefreshConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Refreshes the configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/refreshConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_refreshConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation RefreshConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.RefreshConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.RefreshConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_UpdateWorkloadManagementBfdConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateWorkloadManagementBfdConfigurationAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateWorkloadManagementBfdConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpdateWorkloadManagementBfdConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateWorkloadManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateWorkloadManagementBfdConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_UpdateWorkloadManagementBfdConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateWorkloadManagementBfdConfiguration(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateWorkloadManagementBfdConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.UpdateWorkloadManagementBfdConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateWorkloadManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_UpdateInfraManagementBfdConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateInfraManagementBfdConfigurationAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateInfraManagementBfdConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpdateInfraManagementBfdConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateInfraManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/updateInfraManagementBfdConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_UpdateInfraManagementBfdConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateInfraManagementBfdConfiguration(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateInfraManagementBfdConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.UpdateInfraManagementBfdConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateInfraManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Validate configuration properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, ValidateConfigurationProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the configuration of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/validateConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Validate configuration properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, ValidateConfigurationProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Topology of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology + /// + /// + /// Operation Id + /// NetworkFabrics_GetTopology + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> GetTopologyAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.GetTopology"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.GetTopologyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateGetTopologyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets Topology of the underlying resources in the given Network Fabric instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/getTopology + /// + /// + /// Operation Id + /// NetworkFabrics_GetTopology + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation GetTopology(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.GetTopology"); + scope.Start(); + try + { + var response = _networkFabricRestClient.GetTopology(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateGetTopologyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_CommitConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> CommitConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.CommitConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/commitConfiguration + /// + /// + /// Operation Id + /// NetworkFabrics_CommitConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation CommitConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.CommitConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuCollection.cs index ba9db4534d077..ad726f0666126 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuCollection.cs @@ -54,7 +54,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -91,7 +91,7 @@ public virtual async Task> GetAsync(string ne } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path @@ -103,7 +103,7 @@ public virtual async Task> GetAsync(string ne /// /// /// - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -128,7 +128,7 @@ public virtual Response Get(string networkFabricSkuNam } /// - /// Implements NetworkFabricSkus list by subscription GET method. + /// Implements Network Fabric SKUs list by subscription GET method. /// /// /// Request Path @@ -150,7 +150,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT } /// - /// Implements NetworkFabricSkus list by subscription GET method. + /// Implements Network Fabric SKUs list by subscription GET method. /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -219,7 +219,7 @@ public virtual async Task> ExistsAsync(string networkFabricSkuNam /// /// /// - /// Name of the Network Fabric Sku. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuData.cs index b5ff132a09db3..ee1348a1c6076 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuData.cs @@ -5,7 +5,7 @@ #nullable disable -using System; +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -14,13 +14,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkFabricSku data model. - /// The NetworkFabricSku resource definition. + /// The Network Fabric SKU resource definition. /// public partial class NetworkFabricSkuData : ResourceData { /// Initializes a new instance of NetworkFabricSkuData. public NetworkFabricSkuData() { + SupportedVersions = new ChangeTrackingList(); } /// Initializes a new instance of NetworkFabricSkuData. @@ -28,33 +29,33 @@ public NetworkFabricSkuData() /// The name. /// The resourceType. /// The systemData. - /// Type of Network Fabric Sku. - /// Maximum number of compute racks available for this Network Fabric SKU. - /// Minimum supported version. - /// Maximum supported version. - /// The URI gives full details of sku. - /// Gets the provisioning state of the resource. - internal NetworkFabricSkuData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string typePropertiesType, int? maxComputeRacks, string minSupportedVer, string maxSupportedVer, Uri detailsUri, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + /// Type of Network Fabric SKU. + /// Maximum number of compute racks available for this Network Fabric SKU. The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. + /// Maximum number of servers available for this Network Fabric SKU. + /// List of supported Network Fabric SKU versions. + /// URL providing detailed configuration of the fabric SKU. + /// Provisioning state of the resource. + internal NetworkFabricSkuData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, FabricSkuType? typePropertiesType, int? maxComputeRacks, int? maximumServerCount, IReadOnlyList supportedVersions, string details, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { TypePropertiesType = typePropertiesType; MaxComputeRacks = maxComputeRacks; - MinSupportedVer = minSupportedVer; - MaxSupportedVer = maxSupportedVer; - DetailsUri = detailsUri; + MaximumServerCount = maximumServerCount; + SupportedVersions = supportedVersions; + Details = details; ProvisioningState = provisioningState; } - /// Type of Network Fabric Sku. - public string TypePropertiesType { get; } - /// Maximum number of compute racks available for this Network Fabric SKU. + /// Type of Network Fabric SKU. + public FabricSkuType? TypePropertiesType { get; } + /// Maximum number of compute racks available for this Network Fabric SKU. The value of max count racks is 4 for 4 rack SKU and 8 for 8 rack SKU. public int? MaxComputeRacks { get; set; } - /// Minimum supported version. - public string MinSupportedVer { get; } - /// Maximum supported version. - public string MaxSupportedVer { get; } - /// The URI gives full details of sku. - public Uri DetailsUri { get; } - /// Gets the provisioning state of the resource. + /// Maximum number of servers available for this Network Fabric SKU. + public int? MaximumServerCount { get; set; } + /// List of supported Network Fabric SKU versions. + public IReadOnlyList SupportedVersions { get; } + /// URL providing detailed configuration of the fabric SKU. + public string Details { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.cs index b2cefb5394611..470c0453e9cfb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.cs @@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path @@ -120,7 +120,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Implements Network Fabric Sku GET method. + /// Implements Network Fabric SKU GET method. /// /// /// Request Path diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs index 52b0cb6b58fe1..0a166e8e0ee33 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the NetworkInterface. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> CreateOrUpdate /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the NetworkInterface. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string ne /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -217,7 +217,7 @@ public virtual Response Get(string networkInterfaceNam /// /// /// Operation Id - /// NetworkInterfaces_List + /// NetworkInterfaces_ListByNetworkDevice /// /// /// @@ -225,8 +225,8 @@ public virtual Response Get(string networkInterfaceNam /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkInterfaceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkInterfaceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkInterfaceRestClient.CreateListByNetworkDeviceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkInterfaceRestClient.CreateListByNetworkDeviceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkInterfaceResource(Client, NetworkInterfaceData.DeserializeNetworkInterfaceData(e)), _networkInterfaceClientDiagnostics, Pipeline, "NetworkInterfaceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -239,7 +239,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Operation Id - /// NetworkInterfaces_List + /// NetworkInterfaces_ListByNetworkDevice /// /// /// @@ -247,8 +247,8 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkInterfaceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkInterfaceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkInterfaceRestClient.CreateListByNetworkDeviceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkInterfaceRestClient.CreateListByNetworkDeviceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkInterfaceResource(Client, NetworkInterfaceData.DeserializeNetworkInterfaceData(e)), _networkInterfaceClientDiagnostics, Pipeline, "NetworkInterfaceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string networkInterfaceNam /// /// /// - /// Name of the NetworkInterfaceName. + /// Name of the Network Interface. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs index 530773dca9725..1e79d0b2a03ee 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs @@ -28,40 +28,40 @@ public NetworkInterfaceData() /// The resourceType. /// The systemData. /// Switch configuration description. - /// physicalIdentifier of the network interface. - /// administrativeState of the network interface. Example: Enabled | Disabled. - /// Gets the provisioning state of the resource. - /// The arm resource id of the interface or compute server its connected to. + /// Physical Identifier of the network interface. + /// The ARM resource id of the interface or compute server its connected to. /// The Interface Type. Example: Management/Data. - /// ipv4Address. - /// ipv6Address. - internal NetworkInterfaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, string physicalIdentifier, EnabledDisabledState? administrativeState, ProvisioningState? provisioningState, string connectedTo, InterfaceType? interfaceType, string ipv4Address, string ipv6Address) : base(id, name, resourceType, systemData) + /// IPv4Address of the interface. + /// IPv6Address of the interface. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkInterfaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, string physicalIdentifier, string connectedTo, InterfaceType? interfaceType, string ipv4Address, string ipv6Address, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData) { Annotation = annotation; PhysicalIdentifier = physicalIdentifier; - AdministrativeState = administrativeState; - ProvisioningState = provisioningState; ConnectedTo = connectedTo; InterfaceType = interfaceType; IPv4Address = ipv4Address; IPv6Address = ipv6Address; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } - /// physicalIdentifier of the network interface. + /// Physical Identifier of the network interface. public string PhysicalIdentifier { get; } - /// administrativeState of the network interface. Example: Enabled | Disabled. - public EnabledDisabledState? AdministrativeState { get; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } - /// The arm resource id of the interface or compute server its connected to. + /// The ARM resource id of the interface or compute server its connected to. public string ConnectedTo { get; } /// The Interface Type. Example: Management/Data. public InterfaceType? InterfaceType { get; } - /// ipv4Address. + /// IPv4Address of the interface. public string IPv4Address { get; } - /// ipv6Address. + /// IPv6Address of the interface. public string IPv6Address { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs index c0f7f553a8c67..a0fd3a5ec2bc4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs @@ -245,7 +245,7 @@ public virtual async Task> UpdateAsync(Wa try { var response = await _networkInterfaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -283,75 +283,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil try { var response = _networkInterfaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the running status of the Network Interface. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/getStatus - /// - /// - /// Operation Id - /// NetworkInterfaces_getStatus - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task> GetStatusAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.GetStatus"); - scope.Start(); - try - { - var response = await _networkInterfaceRestClient.GetStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new InterfaceStatusOperationSource(), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateGetStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get the running status of the Network Interface. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}/getStatus - /// - /// - /// Operation Id - /// NetworkInterfaces_getStatus - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation GetStatus(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.GetStatus"); - scope.Start(); - try - { - var response = _networkInterfaceRestClient.GetStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new InterfaceStatusOperationSource(), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateGetStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -372,7 +304,7 @@ public virtual ArmOperation GetStatus(WaitUntil waitUntil, Canc /// /// /// Operation Id - /// NetworkInterfaces_updateAdministrativeState + /// NetworkInterfaces_UpdateAdministrativeState /// /// /// @@ -380,7 +312,7 @@ public virtual ArmOperation GetStatus(WaitUntil waitUntil, Canc /// Request payload. /// The cancellation token to use. /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -389,9 +321,9 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil try { var response = await _networkInterfaceRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -410,7 +342,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// Operation Id - /// NetworkInterfaces_updateAdministrativeState + /// NetworkInterfaces_UpdateAdministrativeState /// /// /// @@ -418,7 +350,7 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// Request payload. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -427,9 +359,9 @@ public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, Updat try { var response = _networkInterfaceRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerCollection.cs new file mode 100644 index 0000000000000..760a8e44e08f4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetworkPacketBrokers method from an instance of . + /// + public partial class NetworkPacketBrokerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkPacketBrokerClientDiagnostics; + private readonly NetworkPacketBrokersRestOperations _networkPacketBrokerRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkPacketBrokerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetworkPacketBrokerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkPacketBrokerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkPacketBrokerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkPacketBrokerResource.ResourceType, out string networkPacketBrokerApiVersion); + _networkPacketBrokerRestClient = new NetworkPacketBrokersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkPacketBrokerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates a Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Packet Broker. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string networkPacketBrokerName, NetworkPacketBrokerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkPacketBrokerOperationSource(Client), _networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Packet Broker. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string networkPacketBrokerName, NetworkPacketBrokerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkPacketBrokerOperationSource(Client), _networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.Get"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.Get"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Displays NetworkPacketBrokers list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkPacketBrokerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkPacketBrokerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkPacketBrokerResource(Client, NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(e)), _networkPacketBrokerClientDiagnostics, Pipeline, "NetworkPacketBrokerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Displays NetworkPacketBrokers list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers + /// + /// + /// Operation Id + /// NetworkPacketBrokers_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkPacketBrokerRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkPacketBrokerRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkPacketBrokerResource(Client, NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(e)), _networkPacketBrokerClientDiagnostics, Pipeline, "NetworkPacketBrokerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.Exists"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerCollection.Exists"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkPacketBrokerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerData.cs new file mode 100644 index 0000000000000..dc1586bb82b59 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerData.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkPacketBroker data model. + /// The NetworkPacketBroker resource definition. + /// + public partial class NetworkPacketBrokerData : TrackedResourceData + { + /// Initializes a new instance of NetworkPacketBrokerData. + /// The location. + /// ARM resource ID of the Network Fabric. + /// is null. + public NetworkPacketBrokerData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) + { + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + NetworkFabricId = networkFabricId; + NetworkDeviceIds = new ChangeTrackingList(); + SourceInterfaceIds = new ChangeTrackingList(); + NetworkTapIds = new ChangeTrackingList(); + NeighborGroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkPacketBrokerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// ARM resource ID of the Network Fabric. + /// List of ARM resource IDs of Network Devices [NPB]. + /// List of network interfaces across NPB devices that are used to mirror source traffic. + /// List of network Tap IDs configured on NPB. + /// List of neighbor group IDs configured on NPB. + /// Provisioning state of the resource. + internal NetworkPacketBrokerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier networkFabricId, IReadOnlyList networkDeviceIds, IReadOnlyList sourceInterfaceIds, IReadOnlyList networkTapIds, IReadOnlyList neighborGroupIds, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + { + NetworkFabricId = networkFabricId; + NetworkDeviceIds = networkDeviceIds; + SourceInterfaceIds = sourceInterfaceIds; + NetworkTapIds = networkTapIds; + NeighborGroupIds = neighborGroupIds; + ProvisioningState = provisioningState; + } + + /// ARM resource ID of the Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// List of ARM resource IDs of Network Devices [NPB]. + public IReadOnlyList NetworkDeviceIds { get; } + /// List of network interfaces across NPB devices that are used to mirror source traffic. + public IReadOnlyList SourceInterfaceIds { get; } + /// List of network Tap IDs configured on NPB. + public IReadOnlyList NetworkTapIds { get; } + /// List of neighbor group IDs configured on NPB. + public IReadOnlyList NeighborGroupIds { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs new file mode 100644 index 0000000000000..0b7e6877df8e6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NetworkPacketBroker along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetworkPacketBrokerResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkPacketBroker method. + /// + public partial class NetworkPacketBrokerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkPacketBrokerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkPacketBrokerClientDiagnostics; + private readonly NetworkPacketBrokersRestOperations _networkPacketBrokerRestClient; + private readonly NetworkPacketBrokerData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkPacketBrokerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkPacketBrokerResource(ArmClient client, NetworkPacketBrokerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetworkPacketBrokerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkPacketBrokerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkPacketBrokerApiVersion); + _networkPacketBrokerRestClient = new NetworkPacketBrokersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkPacketBrokerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/networkPacketBrokers"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkPacketBrokerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Get"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Get"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Delete"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes Network Packet Broker. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Delete"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Network Packet Broker resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Packet Broker properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Update"); + scope.Start(); + try + { + var response = await _networkPacketBrokerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkPacketBrokerOperationSource(Client), _networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Network Packet Broker resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Packet Broker properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Update"); + scope.Start(); + try + { + var response = _networkPacketBrokerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkPacketBrokerOperationSource(Client), _networkPacketBrokerClientDiagnostics, Pipeline, _networkPacketBrokerRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkPacketBrokerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} + /// + /// + /// Operation Id + /// NetworkPacketBrokers_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkPacketBrokerResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkPacketBrokerPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs index 873fe2e427869..5f85aa831c797 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs @@ -15,23 +15,20 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkRack data model. - /// The NetworkRack resource definition. + /// The Network Rack resource definition. /// public partial class NetworkRackData : TrackedResourceData { /// Initializes a new instance of NetworkRackData. /// The location. - /// Network Rack SKU name. - /// Network Fabric ARM resource id. - /// or is null. - public NetworkRackData(AzureLocation location, string networkRackSku, string networkFabricId) : base(location) + /// ARM resource ID of the Network Fabric. + /// is null. + public NetworkRackData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) { - Argument.AssertNotNull(networkRackSku, nameof(networkRackSku)); Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); - NetworkRackSku = networkRackSku; NetworkFabricId = networkFabricId; - NetworkDevices = new ChangeTrackingList(); + NetworkDevices = new ChangeTrackingList(); } /// Initializes a new instance of NetworkRackData. @@ -42,14 +39,14 @@ public NetworkRackData(AzureLocation location, string networkRackSku, string net /// The tags. /// The location. /// Switch configuration description. - /// Network Rack SKU name. - /// Network Fabric ARM resource id. - /// List of network device ARM resource ids. - /// Gets the provisioning state of the resource. - internal NetworkRackData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, string networkRackSku, string networkFabricId, IReadOnlyList networkDevices, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// Network Rack SKU name. + /// ARM resource ID of the Network Fabric. + /// List of network device ARM resource IDs. + /// Provisioning state of the resource. + internal NetworkRackData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, NetworkRackType? networkRackType, ResourceIdentifier networkFabricId, IReadOnlyList networkDevices, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; - NetworkRackSku = networkRackSku; + NetworkRackType = networkRackType; NetworkFabricId = networkFabricId; NetworkDevices = networkDevices; ProvisioningState = provisioningState; @@ -58,12 +55,12 @@ internal NetworkRackData(ResourceIdentifier id, string name, ResourceType resour /// Switch configuration description. public string Annotation { get; set; } /// Network Rack SKU name. - public string NetworkRackSku { get; set; } - /// Network Fabric ARM resource id. - public string NetworkFabricId { get; set; } - /// List of network device ARM resource ids. - public IReadOnlyList NetworkDevices { get; } - /// Gets the provisioning state of the resource. + public NetworkRackType? NetworkRackType { get; set; } + /// ARM resource ID of the Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// List of network device ARM resource IDs. + public IReadOnlyList NetworkDevices { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuCollection.cs deleted file mode 100644 index 3227087c7a2ab..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuCollection.cs +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetNetworkRackSkus method from an instance of . - /// - public partial class NetworkRackSkuCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _networkRackSkuClientDiagnostics; - private readonly NetworkRackSkusRestOperations _networkRackSkuRestClient; - - /// Initializes a new instance of the class for mocking. - protected NetworkRackSkuCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal NetworkRackSkuCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _networkRackSkuClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkRackSkuResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(NetworkRackSkuResource.ResourceType, out string networkRackSkuApiVersion); - _networkRackSkuRestClient = new NetworkRackSkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkRackSkuApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != SubscriptionResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); - } - - /// - /// Get Network Rack SKU resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuCollection.Get"); - scope.Start(); - try - { - var response = await _networkRackSkuRestClient.GetAsync(Id.SubscriptionId, networkRackSkuName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkRackSkuResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Network Rack SKU resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuCollection.Get"); - scope.Start(); - try - { - var response = _networkRackSkuRestClient.Get(Id.SubscriptionId, networkRackSkuName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkRackSkuResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List all Network Rack SKUs in the given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus - /// - /// - /// Operation Id - /// NetworkRackSkus_ListBySubscription - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkRackSkuRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkRackSkuRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkRackSkuResource(Client, NetworkRackSkuData.DeserializeNetworkRackSkuData(e)), _networkRackSkuClientDiagnostics, Pipeline, "NetworkRackSkuCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List all Network Rack SKUs in the given subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus - /// - /// - /// Operation Id - /// NetworkRackSkus_ListBySubscription - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkRackSkuRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkRackSkuRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkRackSkuResource(Client, NetworkRackSkuData.DeserializeNetworkRackSkuData(e)), _networkRackSkuClientDiagnostics, Pipeline, "NetworkRackSkuCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuCollection.Exists"); - scope.Start(); - try - { - var response = await _networkRackSkuRestClient.GetAsync(Id.SubscriptionId, networkRackSkuName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuCollection.Exists"); - scope.Start(); - try - { - var response = _networkRackSkuRestClient.Get(Id.SubscriptionId, networkRackSkuName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuData.cs deleted file mode 100644 index 053da35c579f3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuData.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing the NetworkRackSku data model. - /// The NetworkRackSku resource definition. - /// - public partial class NetworkRackSkuData : ResourceData - { - /// Initializes a new instance of NetworkRackSkuData. - /// The role of the Network Rack: Aggregate or Compute. - public NetworkRackSkuData(NetworkRackRoleName roleName) - { - RoleName = roleName; - NetworkDevices = new ChangeTrackingList(); - } - - /// Initializes a new instance of NetworkRackSkuData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The role of the Network Rack: Aggregate or Compute. - /// Maximum number of servers available for this SKU. - /// Maximum number of storage devices available for this SKU. - /// Maximum number of network uplinks available for this SKU. - /// List of network device properties / role for the Network Rack. - /// Gets the provisioning state of the resource. - internal NetworkRackSkuData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NetworkRackRoleName roleName, int? maximumServerCount, int? maximumStorageCount, int? maximumUplinks, IList networkDevices, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) - { - RoleName = roleName; - MaximumServerCount = maximumServerCount; - MaximumStorageCount = maximumStorageCount; - MaximumUplinks = maximumUplinks; - NetworkDevices = networkDevices; - ProvisioningState = provisioningState; - } - - /// The role of the Network Rack: Aggregate or Compute. - public NetworkRackRoleName RoleName { get; set; } - /// Maximum number of servers available for this SKU. - public int? MaximumServerCount { get; set; } - /// Maximum number of storage devices available for this SKU. - public int? MaximumStorageCount { get; set; } - /// Maximum number of network uplinks available for this SKU. - public int? MaximumUplinks { get; set; } - /// List of network device properties / role for the Network Rack. - public IList NetworkDevices { get; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuResource.cs deleted file mode 100644 index 8ed65dc8545f2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuResource.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A Class representing a NetworkRackSku along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetNetworkRackSkuResource method. - /// Otherwise you can get one from its parent resource using the GetNetworkRackSku method. - /// - public partial class NetworkRackSkuResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string networkRackSkuName) - { - var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _networkRackSkuClientDiagnostics; - private readonly NetworkRackSkusRestOperations _networkRackSkuRestClient; - private readonly NetworkRackSkuData _data; - - /// Initializes a new instance of the class for mocking. - protected NetworkRackSkuResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal NetworkRackSkuResource(ArmClient client, NetworkRackSkuData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal NetworkRackSkuResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _networkRackSkuClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string networkRackSkuApiVersion); - _networkRackSkuRestClient = new NetworkRackSkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkRackSkuApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/networkRackSkus"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual NetworkRackSkuData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get Network Rack SKU resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuResource.Get"); - scope.Start(); - try - { - var response = await _networkRackSkuRestClient.GetAsync(Id.SubscriptionId, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkRackSkuResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Network Rack SKU resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} - /// - /// - /// Operation Id - /// NetworkRackSkus_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _networkRackSkuClientDiagnostics.CreateScope("NetworkRackSkuResource.Get"); - scope.Start(); - try - { - var response = _networkRackSkuRestClient.Get(Id.SubscriptionId, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkRackSkuResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapCollection.cs new file mode 100644 index 0000000000000..bfb924f848d46 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetworkTaps method from an instance of . + /// + public partial class NetworkTapCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkTapClientDiagnostics; + private readonly NetworkTapsRestOperations _networkTapRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkTapCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetworkTapCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkTapClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkTapResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkTapResource.ResourceType, out string networkTapApiVersion); + _networkTapRestClient = new NetworkTapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkTapApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates a Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string networkTapName, NetworkTapData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkTapRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapOperationSource(Client), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string networkTapName, NetworkTapData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkTapRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapOperationSource(Client), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.Get"); + scope.Start(); + try + { + var response = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.Get"); + scope.Start(); + try + { + var response = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Displays Network Taps list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkTapRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkTapRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkTapResource(Client, NetworkTapData.DeserializeNetworkTapData(e)), _networkTapClientDiagnostics, Pipeline, "NetworkTapCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Displays Network Taps list by resource group GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps + /// + /// + /// Operation Id + /// NetworkTaps_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkTapRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkTapRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkTapResource(Client, NetworkTapData.DeserializeNetworkTapData(e)), _networkTapClientDiagnostics, Pipeline, "NetworkTapCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.Exists"); + scope.Start(); + try + { + var response = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// Name of the Network Tap. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapCollection.Exists"); + scope.Start(); + try + { + var response = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkTapName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapData.cs new file mode 100644 index 0000000000000..e3e3d2e25ee97 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapData.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkTap data model. + /// The Network Tap resource definition. + /// + public partial class NetworkTapData : TrackedResourceData + { + /// Initializes a new instance of NetworkTapData. + /// The location. + /// ARM resource ID of the Network Packet Broker. + /// List of destinations to send the filter traffic. + /// or is null. + public NetworkTapData(AzureLocation location, ResourceIdentifier networkPacketBrokerId, IEnumerable destinations) : base(location) + { + Argument.AssertNotNull(networkPacketBrokerId, nameof(networkPacketBrokerId)); + Argument.AssertNotNull(destinations, nameof(destinations)); + + NetworkPacketBrokerId = networkPacketBrokerId; + Destinations = destinations.ToList(); + } + + /// Initializes a new instance of NetworkTapData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// ARM resource ID of the Network Packet Broker. + /// Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + /// List of destinations to send the filter traffic. + /// Polling type. + /// Gets the configurations state of the resource. + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of Network Tap provisioning. + /// Administrative state of the resource. Example -Enabled/Disabled. + internal NetworkTapData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ResourceIdentifier networkPacketBrokerId, ResourceIdentifier sourceTapRuleId, IList destinations, PollingType? pollingType, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + NetworkPacketBrokerId = networkPacketBrokerId; + SourceTapRuleId = sourceTapRuleId; + Destinations = destinations; + PollingType = pollingType; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// ARM resource ID of the Network Packet Broker. + public ResourceIdentifier NetworkPacketBrokerId { get; set; } + /// Source Tap Rule Id. ARM Resource ID of the Network Tap Rule. + public ResourceIdentifier SourceTapRuleId { get; } + /// List of destinations to send the filter traffic. + public IList Destinations { get; } + /// Polling type. + public PollingType? PollingType { get; set; } + /// Gets the configurations state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provides you the latest status of the NFC service, whether it is Accepted, updating, Succeeded or Failed. During this process, the states keep changing based on the status of Network Tap provisioning. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. Example -Enabled/Disabled. + public AdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.cs new file mode 100644 index 0000000000000..016e3d65c6de5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.cs @@ -0,0 +1,754 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NetworkTap along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetworkTapResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkTap method. + /// + public partial class NetworkTapResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkTapName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkTapClientDiagnostics; + private readonly NetworkTapsRestOperations _networkTapRestClient; + private readonly NetworkTapData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkTapResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkTapResource(ArmClient client, NetworkTapData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetworkTapResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkTapClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkTapApiVersion); + _networkTapRestClient = new NetworkTapsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkTapApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/networkTaps"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkTapData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Get"); + scope.Start(); + try + { + var response = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves details of this Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Get"); + scope.Start(); + try + { + var response = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Delete"); + scope.Start(); + try + { + var response = await _networkTapRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes Network Tap. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Delete"); + scope.Start(); + try + { + var response = _networkTapRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Network Tap resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Tap properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkTapPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Update"); + scope.Start(); + try + { + var response = await _networkTapRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapOperationSource(Client), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Network Tap resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Tap properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkTapPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Update"); + scope.Start(); + try + { + var response = _networkTapRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapOperationSource(Client), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkTaps_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkTapRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkTaps_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkTapRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync + /// + /// + /// Operation Id + /// NetworkTaps_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ResyncAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Resync"); + scope.Start(); + try + { + var response = await _networkTapRestClient.ResyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName}/resync + /// + /// + /// Operation Id + /// NetworkTaps_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.Resync"); + scope.Start(); + try + { + var response = _networkTapRestClient.Resync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTaps/{networkTapName} + /// + /// + /// Operation Id + /// NetworkTaps_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleCollection.cs new file mode 100644 index 0000000000000..631fecb09aafb --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleCollection.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetworkTapRules method from an instance of . + /// + public partial class NetworkTapRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkTapRuleClientDiagnostics; + private readonly NetworkTapRulesRestOperations _networkTapRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkTapRuleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetworkTapRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkTapRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkTapRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkTapRuleResource.ResourceType, out string networkTapRuleApiVersion); + _networkTapRuleRestClient = new NetworkTapRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkTapRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string networkTapRuleName, NetworkTapRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapRuleOperationSource(Client), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string networkTapRuleName, NetworkTapRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapRuleOperationSource(Client), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.Get"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.Get"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all the Network Tap Rule resources in the given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkTapRuleRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkTapRuleRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkTapRuleResource(Client, NetworkTapRuleData.DeserializeNetworkTapRuleData(e)), _networkTapRuleClientDiagnostics, Pipeline, "NetworkTapRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all the Network Tap Rule resources in the given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules + /// + /// + /// Operation Id + /// NetworkTapRules_ListByResourceGroup + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkTapRuleRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkTapRuleRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkTapRuleResource(Client, NetworkTapRuleData.DeserializeNetworkTapRuleData(e)), _networkTapRuleClientDiagnostics, Pipeline, "NetworkTapRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleCollection.Exists"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, networkTapRuleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleData.cs new file mode 100644 index 0000000000000..e49a8c4676f87 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkTapRule data model. + /// The NetworkTapRule resource definition. + /// + public partial class NetworkTapRuleData : TrackedResourceData + { + /// Initializes a new instance of NetworkTapRuleData. + /// The location. + public NetworkTapRuleData(AzureLocation location) : base(location) + { + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkTapRuleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Input method to configure Network Tap Rule. + /// Network Tap Rules file URL. + /// List of match configurations. + /// List of dynamic match configurations. + /// The ARM resource Id of the NetworkTap. + /// Polling interval in seconds. + /// The last sync timestamp. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkTapRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ConfigurationType? configurationType, Uri tapRulesUri, IList matchConfigurations, IList dynamicMatchConfigurations, string networkTapId, PollingIntervalInSecond? pollingIntervalInSeconds, DateTimeOffset? lastSyncedOn, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + ConfigurationType = configurationType; + TapRulesUri = tapRulesUri; + MatchConfigurations = matchConfigurations; + DynamicMatchConfigurations = dynamicMatchConfigurations; + NetworkTapId = networkTapId; + PollingIntervalInSeconds = pollingIntervalInSeconds; + LastSyncedOn = lastSyncedOn; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Input method to configure Network Tap Rule. + public ConfigurationType? ConfigurationType { get; set; } + /// Network Tap Rules file URL. + public Uri TapRulesUri { get; set; } + /// List of match configurations. + public IList MatchConfigurations { get; } + /// List of dynamic match configurations. + public IList DynamicMatchConfigurations { get; } + /// The ARM resource Id of the NetworkTap. + public string NetworkTapId { get; } + /// Polling interval in seconds. + public PollingIntervalInSecond? PollingIntervalInSeconds { get; set; } + /// The last sync timestamp. + public DateTimeOffset? LastSyncedOn { get; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.cs new file mode 100644 index 0000000000000..fa1436bcf0743 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.cs @@ -0,0 +1,822 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NetworkTapRule along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetworkTapRuleResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkTapRule method. + /// + public partial class NetworkTapRuleResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkTapRuleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkTapRuleClientDiagnostics; + private readonly NetworkTapRulesRestOperations _networkTapRuleRestClient; + private readonly NetworkTapRuleData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkTapRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkTapRuleResource(ArmClient client, NetworkTapRuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetworkTapRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkTapRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkTapRuleApiVersion); + _networkTapRuleRestClient = new NetworkTapRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkTapRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/networkTapRules"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkTapRuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Get"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Network Tap Rule resource details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Get"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkTapRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Delete"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Delete"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update certain properties of the Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Tap Rule properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkTapRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Update"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapRuleOperationSource(Client), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update certain properties of the Network Tap Rule resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Update + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Network Tap Rule properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkTapRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Update"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkTapRuleOperationSource(Client), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkTapRules_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkTapRules_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync + /// + /// + /// Operation Id + /// NetworkTapRules_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ResyncAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Resync"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.ResyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/resync + /// + /// + /// Operation Id + /// NetworkTapRules_Resync + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.Resync"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.Resync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateResyncRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration + /// + /// + /// Operation Id + /// NetworkTapRules_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements the operation to the underlying resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName}/validateConfiguration + /// + /// + /// Operation Id + /// NetworkTapRules_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapRulePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapRulePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _networkTapRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkTapRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkTapRules/{networkTapRuleName} + /// + /// + /// Operation Id + /// NetworkTapRules_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _networkTapRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkTapRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkTapRulePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectCollection.cs index 4cf0a315f227c..fb56f9f49db40 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network to Network Interconnect. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -107,7 +107,7 @@ public virtual async Task> Cr /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network to Network Interconnect. /// Request payload. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -184,7 +184,7 @@ public virtual async Task> GetAsy /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -217,7 +217,7 @@ public virtual Response Get(string network /// /// /// Operation Id - /// NetworkToNetworkInterconnects_List + /// NetworkToNetworkInterconnects_ListByNetworkFabric /// /// /// @@ -225,8 +225,8 @@ public virtual Response Get(string network /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkToNetworkInterconnectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkToNetworkInterconnectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkToNetworkInterconnectRestClient.CreateListByNetworkFabricRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkToNetworkInterconnectRestClient.CreateListByNetworkFabricNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkToNetworkInterconnectResource(Client, NetworkToNetworkInterconnectData.DeserializeNetworkToNetworkInterconnectData(e)), _networkToNetworkInterconnectClientDiagnostics, Pipeline, "NetworkToNetworkInterconnectCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -239,7 +239,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Operation Id - /// NetworkToNetworkInterconnects_List + /// NetworkToNetworkInterconnects_ListByNetworkFabric /// /// /// @@ -247,8 +247,8 @@ public virtual AsyncPageable GetAllAsync(C /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkToNetworkInterconnectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkToNetworkInterconnectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkToNetworkInterconnectRestClient.CreateListByNetworkFabricRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkToNetworkInterconnectRestClient.CreateListByNetworkFabricNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkToNetworkInterconnectResource(Client, NetworkToNetworkInterconnectData.DeserializeNetworkToNetworkInterconnectData(e)), _networkToNetworkInterconnectClientDiagnostics, Pipeline, "NetworkToNetworkInterconnectCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -265,7 +265,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string networkToNetworkInt /// /// /// - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectData.cs index 2b8a40a7731a4..eb40f3c867a5a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectData.cs @@ -13,13 +13,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// /// A class representing the NetworkToNetworkInterconnect data model. - /// The NetworkToNetworkInterconnect resource definition. + /// The Network To Network Interconnect resource definition. /// public partial class NetworkToNetworkInterconnectData : ResourceData { /// Initializes a new instance of NetworkToNetworkInterconnectData. - public NetworkToNetworkInterconnectData() + /// Based on this option layer3 parameters are mandatory. Example: True/False. + public NetworkToNetworkInterconnectData(BooleanEnumProperty useOptionB) { + UseOptionB = useOptionB; } /// Initializes a new instance of NetworkToNetworkInterconnectData. @@ -28,36 +30,60 @@ public NetworkToNetworkInterconnectData() /// The resourceType. /// The systemData. /// Type of NNI used. Example: CE | NPB. - /// Gets the administrativeState of the resource. Example -Enabled/Disabled. /// Configuration to use NNI for Infrastructure Management. Example: True/False. - /// Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. - /// Common properties for Layer2Configuration. - /// Common properties for Layer3Configuration. - /// Gets the provisioning state of the resource. - internal NetworkToNetworkInterconnectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NniType? nniType, EnabledDisabledState? administrativeState, BooleanEnumProperty? isManagementType, BooleanEnumProperty? useOptionB, Layer2Configuration layer2Configuration, Layer3Configuration layer3Configuration, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + /// Based on this option layer3 parameters are mandatory. Example: True/False. + /// Common properties for Layer2 Configuration. + /// Common properties for Layer3Configuration. + /// NPB Static Route Configuration properties. + /// Import Route Policy configuration. + /// Export Route Policy configuration. + /// Egress Acl. ARM resource ID of Access Control Lists. + /// Ingress Acl. ARM resource ID of Access Control Lists. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkToNetworkInterconnectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NniType? nniType, IsManagementType? isManagementType, BooleanEnumProperty useOptionB, Layer2Configuration layer2Configuration, NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration optionBLayer3Configuration, NpbStaticRouteConfiguration npbStaticRouteConfiguration, ImportRoutePolicyInformation importRoutePolicy, ExportRoutePolicyInformation exportRoutePolicy, ResourceIdentifier egressAclId, ResourceIdentifier ingressAclId, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData) { NniType = nniType; - AdministrativeState = administrativeState; IsManagementType = isManagementType; UseOptionB = useOptionB; Layer2Configuration = layer2Configuration; - Layer3Configuration = layer3Configuration; + OptionBLayer3Configuration = optionBLayer3Configuration; + NpbStaticRouteConfiguration = npbStaticRouteConfiguration; + ImportRoutePolicy = importRoutePolicy; + ExportRoutePolicy = exportRoutePolicy; + EgressAclId = egressAclId; + IngressAclId = ingressAclId; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Type of NNI used. Example: CE | NPB. public NniType? NniType { get; set; } - /// Gets the administrativeState of the resource. Example -Enabled/Disabled. - public EnabledDisabledState? AdministrativeState { get; } /// Configuration to use NNI for Infrastructure Management. Example: True/False. - public BooleanEnumProperty? IsManagementType { get; set; } - /// Based on this parameter the layer2/layer3 is made as mandatory. Example: True/False. - public BooleanEnumProperty? UseOptionB { get; set; } - /// Common properties for Layer2Configuration. + public IsManagementType? IsManagementType { get; set; } + /// Based on this option layer3 parameters are mandatory. Example: True/False. + public BooleanEnumProperty UseOptionB { get; set; } + /// Common properties for Layer2 Configuration. public Layer2Configuration Layer2Configuration { get; set; } /// Common properties for Layer3Configuration. - public Layer3Configuration Layer3Configuration { get; set; } - /// Gets the provisioning state of the resource. + public NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration OptionBLayer3Configuration { get; set; } + /// NPB Static Route Configuration properties. + public NpbStaticRouteConfiguration NpbStaticRouteConfiguration { get; set; } + /// Import Route Policy configuration. + public ImportRoutePolicyInformation ImportRoutePolicy { get; set; } + /// Export Route Policy configuration. + public ExportRoutePolicyInformation ExportRoutePolicy { get; set; } + /// Egress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier EgressAclId { get; set; } + /// Ingress Acl. ARM resource ID of Access Control Lists. + public ResourceIdentifier IngressAclId { get; set; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.cs index f83a1130759e0..a621b340f3a16 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.cs @@ -13,6 +13,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric.Models; namespace Azure.ResourceManager.ManagedNetworkFabric { @@ -219,7 +220,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Configuration used to setup CE-PE connectivity PUT Method. + /// Update certain properties of the Network To NetworkInterconnects resource. /// /// /// Request Path @@ -227,24 +228,24 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// NetworkToNetworkInterconnects_Create + /// NetworkToNetworkInterconnects_Update /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. + /// Network to Network Interconnect properties to update. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkToNetworkInterconnectData data, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkToNetworkInterconnectPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.Update"); scope.Start(); try { - var response = await _networkToNetworkInterconnectRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new NetworkToNetworkInterconnectOperationSource(Client), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkToNetworkInterconnectRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkToNetworkInterconnectOperationSource(Client), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -257,7 +258,7 @@ public virtual async Task> Up } /// - /// Configuration used to setup CE-PE connectivity PUT Method. + /// Update certain properties of the Network To NetworkInterconnects resource. /// /// /// Request Path @@ -265,24 +266,176 @@ public virtual async Task> Up /// /// /// Operation Id - /// NetworkToNetworkInterconnects_Create + /// NetworkToNetworkInterconnects_Update /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request payload. + /// Network to Network Interconnect properties to update. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NetworkToNetworkInterconnectData data, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkToNetworkInterconnectPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(patch, nameof(patch)); using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.Update"); scope.Start(); try { - var response = _networkToNetworkInterconnectRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new NetworkToNetworkInterconnectOperationSource(Client), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkToNetworkInterconnectRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkToNetworkInterconnectOperationSource(Client), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the NPB Static Route BFD Administrative State. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateNpbStaticRouteBfdAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateNpbStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = await _networkToNetworkInterconnectRestClient.UpdateNpbStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the NPB Static Route BFD Administrative State. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateNpbStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateNpbStaticRouteBfdAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateNpbStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = _networkToNetworkInterconnectRestClient.UpdateNpbStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Admin State. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkToNetworkInterconnects_updateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkToNetworkInterconnectRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Admin State. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkFabrics/{networkFabricName}/networkToNetworkInterconnects/{networkToNetworkInterconnectName}/updateAdministrativeState + /// + /// + /// Operation Id + /// NetworkToNetworkInterconnects_updateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkToNetworkInterconnectRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs index 72437f136c9d9..f02d53ec17cf8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs @@ -33,7 +33,7 @@ public AccessControlListsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,14 +62,14 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Implements Access Control List PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -81,26 +81,22 @@ public async Task> CreateAsync(string subscripti switch (message.Response.Status) { case 200: - { - AccessControlListData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } /// Implements Access Control List PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -112,12 +108,8 @@ public Response Create(string subscriptionId, string reso switch (message.Response.Status) { case 200: - { - AccessControlListData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -144,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements Access Control List GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// The cancellation token to use. @@ -175,7 +167,7 @@ public async Task> GetAsync(string subscriptionI } /// Implements Access Control List GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// The cancellation token to use. @@ -230,14 +222,14 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the Access Control List resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// Access Control List properties to update. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,26 +241,22 @@ public async Task> UpdateAsync(string subscripti switch (message.Response.Status) { case 200: - { - AccessControlListData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } /// API to update certain properties of the Access Control List resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// Access Control List properties to update. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,12 +268,8 @@ public Response Update(string subscriptionId, string reso switch (message.Response.Status) { case 200: - { - AccessControlListData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -312,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements Access Control List DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// The cancellation token to use. @@ -328,7 +312,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -337,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements Access Control List DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Access Control List. /// The cancellation token to use. @@ -353,7 +337,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string a _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -381,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Implements AccessControlLists list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -408,7 +392,7 @@ public async Task> ListByResourceGroupAsy } /// Implements AccessControlLists list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -452,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Implements AccessControlLists list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -477,7 +461,7 @@ public async Task> ListBySubscriptionAsyn } /// Implements AccessControlLists list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -501,6 +485,227 @@ public Response ListBySubscription(string subscrip } } + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/accessControlLists/", false); + uri.AppendPath(accessControlListName, true); + uri.AppendPath("/updateAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string accessControlListName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, accessControlListName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string accessControlListName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, accessControlListName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResyncRequest(string subscriptionId, string resourceGroupName, string accessControlListName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/accessControlLists/", false); + uri.AppendPath(accessControlListName, true); + uri.AppendPath("/resync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResyncAsync(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, accessControlListName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resync(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, accessControlListName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string accessControlListName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/accessControlLists/", false); + uri.AppendPath(accessControlListName, true); + uri.AppendPath("/validateConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, accessControlListName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Access Control List. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, accessControlListName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -517,7 +722,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Implements AccessControlLists list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -546,7 +751,7 @@ public async Task> ListByResourceGroupNex /// Implements AccessControlLists list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -589,7 +794,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Implements AccessControlLists list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -616,7 +821,7 @@ public async Task> ListBySubscriptionNext /// Implements AccessControlLists list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs index 61ffe98654905..b75f342ec22d7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs @@ -33,7 +33,7 @@ public ExternalNetworksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,10 +64,10 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Creates ExternalNetwork PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -93,10 +93,10 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Creates ExternalNetwork PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -144,10 +144,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements ExternalNetworks GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -177,10 +177,10 @@ public async Task> GetAsync(string subscriptionId, } /// Implements ExternalNetworks GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -236,10 +236,10 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the ExternalNetworks resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// ExternalNetwork properties to update. Only annotations are supported. /// The cancellation token to use. /// , , , or is null. @@ -265,10 +265,10 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the ExternalNetworks resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// ExternalNetwork properties to update. Only annotations are supported. /// The cancellation token to use. /// , , , or is null. @@ -316,10 +316,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements ExternalNetworks DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -334,7 +334,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -344,10 +343,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements ExternalNetworks DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -362,7 +361,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -371,7 +369,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) + internal HttpMessage CreateListByL3IsolationDomainRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -393,19 +391,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Implements External Networks list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> ListByL3IsolationDomainAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -422,19 +420,19 @@ public async Task> ListAsync(string subscriptionI } /// Implements External Networks list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public Response ListByL3IsolationDomain(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -478,10 +476,10 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI } /// Executes update operation to enable or disable administrative State for externalNetwork. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -498,6 +496,7 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -506,10 +505,10 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Executes update operation to enable or disable administrative State for externalNetwork. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -526,6 +525,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -533,256 +533,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource } } - internal HttpMessage CreateUpdateBgpAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/externalNetworks/", false); - uri.AppendPath(externalNetworkName, true); - uri.AppendPath("/updateBgpAdministrativeState", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update BGP for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateBgpAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update BGP for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateBgpAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateBfdForBgpAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/externalNetworks/", false); - uri.AppendPath(externalNetworkName, true); - uri.AppendPath("/updateBfdForBgpAdministrativeState", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update BfdForBgp for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateBfdForBgpAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBfdForBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update BfdForBgp for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateBfdForBgpAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBfdForBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearIPv6NeighborsRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/externalNetworks/", false); - uri.AppendPath(externalNetworkName, true); - uri.AppendPath("/clearIpv6Neighbors", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// clearIpv6Neighbors for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ClearIPv6NeighborsAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearIPv6NeighborsRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// clearIpv6Neighbors for externalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ClearIPv6Neighbors(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearIPv6NeighborsRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearArpEntriesRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body) + internal HttpMessage CreateUpdateStaticRouteBfdAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -797,7 +548,7 @@ internal HttpMessage CreateClearArpEntriesRequest(string subscriptionId, string uri.AppendPath(l3IsolationDomainName, true); uri.AppendPath("/externalNetworks/", false); uri.AppendPath(externalNetworkName, true); - uri.AppendPath("/clearArpEntries", false); + uri.AppendPath("/updateStaticRouteBfdAdministrativeState", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -809,16 +560,16 @@ internal HttpMessage CreateClearArpEntriesRequest(string subscriptionId, string return message; } - /// clearArpEntries for externalNetwork. - /// The ID of the target subscription. + /// Update Static Route BFD for external Network. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ClearArpEntriesAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public async Task UpdateStaticRouteBfdAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -826,10 +577,11 @@ public async Task ClearArpEntriesAsync(string subscriptionId, string r Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -837,16 +589,16 @@ public async Task ClearArpEntriesAsync(string subscriptionId, string r } } - /// clearArpEntries for externalNetwork. - /// The ID of the target subscription. + /// Update Static Route BFD for external Network. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the ExternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ClearArpEntries(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response UpdateStaticRouteBfdAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -854,10 +606,11 @@ public Response ClearArpEntries(string subscriptionId, string resourceGroupName, Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -865,7 +618,7 @@ public Response ClearArpEntries(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName) + internal HttpMessage CreateListByL3IsolationDomainNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -881,20 +634,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Implements External Networks list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> ListByL3IsolationDomainNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -912,20 +665,20 @@ public async Task> ListNextPageAsync(string nextL /// Implements External Networks list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public Response ListByL3IsolationDomainNextPage(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs index 5fa4e3f484c54..3ec3ef46638bd 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs @@ -33,7 +33,7 @@ public InternalNetworksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,10 +64,10 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Creates InternalNetwork PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -93,10 +93,10 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Creates InternalNetwork PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -144,10 +144,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets a InternalNetworks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -177,10 +177,10 @@ public async Task> GetAsync(string subscriptionId, } /// Gets a InternalNetworks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -236,10 +236,10 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates a InternalNetworks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// InternalNetwork properties to update. Only annotations are supported. /// The cancellation token to use. /// , , , or is null. @@ -265,10 +265,10 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates a InternalNetworks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// InternalNetwork properties to update. Only annotations are supported. /// The cancellation token to use. /// , , , or is null. @@ -316,10 +316,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements InternalNetworks DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -334,7 +334,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -344,10 +343,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements InternalNetworks DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -362,7 +361,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -371,7 +369,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) + internal HttpMessage CreateListByL3IsolationDomainRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -393,19 +391,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Displays InternalNetworks list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> ListByL3IsolationDomainAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -422,19 +420,19 @@ public async Task> ListAsync(string subscriptionI } /// Displays InternalNetworks list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public Response ListByL3IsolationDomain(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -478,10 +476,10 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI } /// Update Administrative state of InternalNetworks on resources referred by their resource ids. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -498,6 +496,7 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -506,10 +505,10 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Update Administrative state of InternalNetworks on resources referred by their resource ids. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -526,6 +525,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -561,10 +561,10 @@ internal HttpMessage CreateUpdateBgpAdministrativeStateRequest(string subscripti } /// Update BGP state for internalNetwork. Allowed only on edge devices. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -581,6 +581,7 @@ public async Task UpdateBgpAdministrativeStateAsync(string subscriptio await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -589,10 +590,10 @@ public async Task UpdateBgpAdministrativeStateAsync(string subscriptio } /// Update BGP state for internalNetwork. Allowed only on edge devices. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -609,6 +610,7 @@ public Response UpdateBgpAdministrativeState(string subscriptionId, string resou _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -616,256 +618,7 @@ public Response UpdateBgpAdministrativeState(string subscriptionId, string resou } } - internal HttpMessage CreateUpdateBfdForBgpAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/internalNetworks/", false); - uri.AppendPath(internalNetworkName, true); - uri.AppendPath("/updateBfdForBgpAdministrativeState", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update BfdForBgp for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateBfdForBgpAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBfdForBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update BfdForBgp for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateBfdForBgpAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateBfdForBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearIPv6NeighborsRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/internalNetworks/", false); - uri.AppendPath(internalNetworkName, true); - uri.AppendPath("/clearIpv6Neighbors", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// clearIpv6Neighbors for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ClearIPv6NeighborsAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearIPv6NeighborsRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// clearIpv6Neighbors for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ClearIPv6Neighbors(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearIPv6NeighborsRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearArpEntriesRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/internalNetworks/", false); - uri.AppendPath(internalNetworkName, true); - uri.AppendPath("/clearArpEntries", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// clearArpEntries for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ClearArpEntriesAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// clearArpEntries for internalNetwork. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. - /// Request payload. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ClearArpEntries(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateBfdForStaticRouteAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateStaticRouteBfdAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -880,7 +633,7 @@ internal HttpMessage CreateUpdateBfdForStaticRouteAdministrativeStateRequest(str uri.AppendPath(l3IsolationDomainName, true); uri.AppendPath("/internalNetworks/", false); uri.AppendPath(internalNetworkName, true); - uri.AppendPath("/updateBfdForStaticRouteAdministrativeState", false); + uri.AppendPath("/updateStaticRouteBfdAdministrativeState", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -892,16 +645,16 @@ internal HttpMessage CreateUpdateBfdForStaticRouteAdministrativeStateRequest(str return message; } - /// Update BfdForStaticRoutes for internalNetwork. - /// The ID of the target subscription. + /// Update Static Route BFD administrative state for internalNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateBfdForStaticRouteAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateStaticRouteBfdAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -909,10 +662,11 @@ public async Task UpdateBfdForStaticRouteAdministrativeStateAsync(stri Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdateBfdForStaticRouteAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -920,16 +674,16 @@ public async Task UpdateBfdForStaticRouteAdministrativeStateAsync(stri } } - /// Update BfdForStaticRoutes for internalNetwork. - /// The ID of the target subscription. + /// Update Static Route BFD administrative state for internalNetwork. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Name of the InternalNetwork. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. /// Request payload. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateBfdForStaticRouteAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public Response UpdateStaticRouteBfdAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -937,10 +691,11 @@ public Response UpdateBfdForStaticRouteAdministrativeState(string subscriptionId Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdateBfdForStaticRouteAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -948,7 +703,7 @@ public Response UpdateBfdForStaticRouteAdministrativeState(string subscriptionId } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName) + internal HttpMessage CreateListByL3IsolationDomainNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -964,20 +719,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Displays InternalNetworks list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> ListByL3IsolationDomainNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -995,20 +750,20 @@ public async Task> ListNextPageAsync(string nextL /// Displays InternalNetworks list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public Response ListByL3IsolationDomainNextPage(string nextLink, string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); + using var message = CreateListByL3IsolationDomainNextPageRequest(nextLink, subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewayRulesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewayRulesRestOperations.cs new file mode 100644 index 0000000000000..deed859810e9a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewayRulesRestOperations.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class InternetGatewayRulesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InternetGatewayRulesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public InternetGatewayRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRuleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/", false); + uri.AppendPath(internetGatewayRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates an Internet Gateway rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, internetGatewayRuleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates an Internet Gateway rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, internetGatewayRuleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string internetGatewayRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/", false); + uri.AppendPath(internetGatewayRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an Internet Gateway Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, internetGatewayRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayRuleData.DeserializeInternetGatewayRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InternetGatewayRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an Internet Gateway Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, internetGatewayRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayRuleData.DeserializeInternetGatewayRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InternetGatewayRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRulePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/", false); + uri.AppendPath(internetGatewayRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// API to update certain properties of the Internet Gateway Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// Internet Gateway Rule properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, internetGatewayRuleName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// API to update certain properties of the Internet Gateway Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// Internet Gateway Rule properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, InternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, internetGatewayRuleName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string internetGatewayRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/", false); + uri.AppendPath(internetGatewayRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements Internet Gateway Rules DELETE method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, internetGatewayRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements Internet Gateway Rules DELETE method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, internetGatewayRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements Internet Gateway Rules list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements Internet Gateway Rules list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Internet Gateway rules in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Internet Gateway rules in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements Internet Gateway Rules list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements Internet Gateway Rules list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Internet Gateway rules in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Internet Gateway rules in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayRulesListResult.DeserializeInternetGatewayRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewaysRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewaysRestOperations.cs new file mode 100644 index 0000000000000..ca91182a21be7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewaysRestOperations.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class InternetGatewaysRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InternetGatewaysRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public InternetGatewaysRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways/", false); + uri.AppendPath(internetGatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Network Fabric Service Internet Gateway resource instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, internetGatewayName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a Network Fabric Service Internet Gateway resource instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, internetGatewayName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string internetGatewayName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways/", false); + uri.AppendPath(internetGatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements Gateway GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, internetGatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewayData.DeserializeInternetGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InternetGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements Gateway GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, internetGatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewayData.DeserializeInternetGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InternetGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways/", false); + uri.AppendPath(internetGatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Execute patch on Network Fabric Service Internet Gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// API to update certain properties of the L2 Isolation Domain resource.. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, internetGatewayName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Execute patch on Network Fabric Service Internet Gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// API to update certain properties of the L2 Isolation Domain resource.. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string internetGatewayName, InternetGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, internetGatewayName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string internetGatewayName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways/", false); + uri.AppendPath(internetGatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Execute a delete on Network Fabric Service Internet Gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, internetGatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Execute a delete on Network Fabric Service Internet Gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Internet Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string internetGatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(internetGatewayName, nameof(internetGatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, internetGatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Internet Gateways list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Internet Gateways list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/internetGateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Internet Gateways list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Internet Gateways list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Internet Gateways list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Internet Gateways list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Internet Gateways list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Internet Gateways list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InternetGatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InternetGatewaysListResult.DeserializeInternetGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs index 4560aab4f9a22..3568e05cdc56e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs @@ -33,7 +33,7 @@ public IpCommunitiesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Implements an IP Community PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Implements an IP Community PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements an IP Community GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionId, str } /// Implements an IP Community GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the IP Community resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// IP Community properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the IP Community resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// IP Community properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements IP Community DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements IP Community DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Community. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string i _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -366,8 +364,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// Implements IpCommunities list by resource group GET method. - /// The ID of the target subscription. + /// Implements IP Communities list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -393,8 +391,8 @@ public async Task> ListByResourceGroupAsync(st } } - /// Implements IpCommunities list by resource group GET method. - /// The ID of the target subscription. + /// Implements IP Communities list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -437,8 +435,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) return message; } - /// Implements IpCommunities list by subscription GET method. - /// The ID of the target subscription. + /// Implements IP Communities list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -462,8 +460,8 @@ public async Task> ListBySubscriptionAsync(str } } - /// Implements IpCommunities list by subscription GET method. - /// The ID of the target subscription. + /// Implements IP Communities list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -501,9 +499,9 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Implements IpCommunities list by resource group GET method. + /// Implements IP Communities list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -530,9 +528,9 @@ public async Task> ListByResourceGroupNextPage } } - /// Implements IpCommunities list by resource group GET method. + /// Implements IP Communities list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -573,9 +571,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -600,9 +598,9 @@ public async Task> ListBySubscriptionNextPageA } } - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs index 185e7b839dd0a..e1c472f6598b7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs @@ -33,7 +33,7 @@ public IpExtendedCommunitiesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Implements IP Extended Community PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Implements IP Extended Community PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements IP Extended Community GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptio } /// Implements IP Extended Community GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the IP Extended Community resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// IP Extended Community properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the IP Extended Community resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// IP Extended Community properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements IP Extended Community DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements IP Extended Community DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Extended Community. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string i _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Implements IpExtendedCommunities list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAs } /// Implements IpExtendedCommunities list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Implements IpExtendedCommunities list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsy } /// Implements IpExtendedCommunities list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -503,7 +501,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Implements IpExtendedCommunities list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -532,7 +530,7 @@ public async Task> ListByResourceGroupNe /// Implements IpExtendedCommunities list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -575,7 +573,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Implements IpExtendedCommunities list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -602,7 +600,7 @@ public async Task> ListBySubscriptionNex /// Implements IpExtendedCommunities list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs index 57dc70e334646..1f1ea9fe7c477 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs @@ -33,7 +33,7 @@ public IpPrefixesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Implements IP Prefix PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Implements IP Prefix PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements IP Prefix GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionId, string } /// Implements IP Prefix GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the IP Prefix resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// IP Prefix properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the IP Prefix resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// IP Prefix properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements IP Prefix DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements IP Prefix DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the IP Prefix. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string i _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Implements IpPrefixes list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAsync(strin } /// Implements IpPrefixes list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Implements IpPrefixes list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsync(string } /// Implements IpPrefixes list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -503,7 +501,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Implements IpPrefixes list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -532,7 +530,7 @@ public async Task> ListByResourceGroupNextPageAsy /// Implements IpPrefixes list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -575,7 +573,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Implements IpPrefixes list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -602,7 +600,7 @@ public async Task> ListBySubscriptionNextPageAsyn /// Implements IpPrefixes list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs index 9bad1c5332a15..ab97b6bf38816 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs @@ -33,7 +33,7 @@ public L2IsolationDomainsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Creates layer 2 network connectivity between compute nodes within a rack and across racks.The configuration is applied on the devices only after the isolation domain is enabled. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements L2 Isolation Domain GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionI } /// Implements L2 Isolation Domain GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the L2 Isolation Domain resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// API to update certain properties of the L2 Isolation Domain resource.. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the L2 Isolation Domain resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// API to update certain properties of the L2 Isolation Domain resource.. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes layer 2 connectivity between compute nodes by managed by named L2 Isolation name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L2 Isolation Domain. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -373,9 +371,9 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI } /// Enables isolation domain across the fabric or on specified racks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. + /// Name of the L2 Isolation Domain. /// Request payload. /// The cancellation token to use. /// , , or is null. @@ -391,6 +389,7 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -399,9 +398,9 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Enables isolation domain across the fabric or on specified racks. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. + /// Name of the L2 Isolation Domain. /// Request payload. /// The cancellation token to use. /// , , or is null. @@ -417,6 +416,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -424,84 +424,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource } } - internal HttpMessage CreateClearArpTableRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/", false); - uri.AppendPath(l2IsolationDomainName, true); - uri.AppendPath("/clearArpTable", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Clears ARP tables for this Isolation Domain. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. - /// Request payload. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ClearArpTableAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearArpTableRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Clears ARP tables for this Isolation Domain. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. - /// Request payload. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ClearArpTable(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateClearArpTableRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearNeighborTableRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body) + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -514,37 +437,32 @@ internal HttpMessage CreateClearNeighborTableRequest(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/", false); uri.AppendPath(l2IsolationDomainName, true); - uri.AppendPath("/clearNeighborTable", false); + uri.AppendPath("/validateConfiguration", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; _userAgent.Apply(message); return message; } - /// Clears IPv6 neighbors for this Isolation Domain. - /// The ID of the target subscription. + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. - /// Request payload. + /// Name of the L2 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ClearNeighborTableAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearNeighborTableRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -552,25 +470,24 @@ public async Task ClearNeighborTableAsync(string subscriptionId, strin } } - /// Clears IPv6 neighbors for this Isolation Domain. - /// The ID of the target subscription. + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. - /// Request payload. + /// Name of the L2 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ClearNeighborTable(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearNeighborTableRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -578,7 +495,7 @@ public Response ClearNeighborTable(string subscriptionId, string resourceGroupNa } } - internal HttpMessage CreateGetArpEntriesRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName) + internal HttpMessage CreateCommitConfigurationRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -591,7 +508,7 @@ internal HttpMessage CreateGetArpEntriesRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/", false); uri.AppendPath(l2IsolationDomainName, true); - uri.AppendPath("/getArpEntries", false); + uri.AppendPath("/commitConfiguration", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -599,23 +516,24 @@ internal HttpMessage CreateGetArpEntriesRequest(string subscriptionId, string re return message; } - /// Clears IPv6 neighbors for this Isolation Domain. - /// The ID of the target subscription. + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. + /// Name of the L2 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task GetArpEntriesAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public async Task CommitConfigurationAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var message = CreateGetArpEntriesRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -623,23 +541,24 @@ public async Task GetArpEntriesAsync(string subscriptionId, string res } } - /// Clears IPv6 neighbors for this Isolation Domain. - /// The ID of the target subscription. + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L2IsolationDomain. + /// Name of the L2 Isolation Domain. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetArpEntries(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public Response CommitConfiguration(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var message = CreateGetArpEntriesRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, l2IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -667,7 +586,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Displays L2IsolationDomains list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -694,7 +613,7 @@ public async Task> ListByResourceGroupAsy } /// Displays L2IsolationDomains list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -738,7 +657,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Displays L2IsolationDomains list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -763,7 +682,7 @@ public async Task> ListBySubscriptionAsyn } /// Displays L2IsolationDomains list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -803,7 +722,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Displays L2IsolationDomains list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -832,7 +751,7 @@ public async Task> ListByResourceGroupNex /// Displays L2IsolationDomains list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -875,7 +794,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Displays L2IsolationDomains list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -902,7 +821,7 @@ public async Task> ListBySubscriptionNext /// Displays L2IsolationDomains list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs index b3bd1c5a3aa93..a99fef4fc7ae0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs @@ -33,7 +33,7 @@ public L3IsolationDomainsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create isolation domain resources for layer 3 connectivity between compute nodes and for communication with external services .This configuration is applied on the devices only after the creation of networks is completed and isolation domain is enabled. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Retrieves details of this L3 Isolation Domain. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionI } /// Retrieves details of this L3 Isolation Domain. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the L3 Isolation Domain resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// API to update certain properties of the L3 Isolation Domain resource. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the L3 Isolation Domain resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// API to update certain properties of the L3 Isolation Domain resource. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes layer 3 connectivity between compute nodes by managed by named L3 Isolation name. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the L3 Isolation Domain. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Displays L3IsolationDomains list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAsy } /// Displays L3IsolationDomains list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Displays L3IsolationDomains list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsyn } /// Displays L3IsolationDomains list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -513,9 +511,9 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI } /// Enables racks for this Isolation Domain. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// Request payload. /// The cancellation token to use. /// , , or is null. @@ -531,6 +529,7 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -539,9 +538,9 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Enables racks for this Isolation Domain. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. + /// Name of the L3 Isolation Domain. /// Request payload. /// The cancellation token to use. /// , , or is null. @@ -557,6 +556,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -564,84 +564,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource } } - internal HttpMessage CreateUpdateOptionBAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); - uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/updateOptionBAdministrativeState", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update administrative state of option B on CE devices. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateOptionBAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateOptionBAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update administrative state of option B on CE devices. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateOptionBAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateUpdateOptionBAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateClearArpTableRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body) + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -654,37 +577,32 @@ internal HttpMessage CreateClearArpTableRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/clearArpTable", false); + uri.AppendPath("/validateConfiguration", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; _userAgent.Apply(message); return message; } - /// Clears ARP tables for this Isolation Domain. - /// The ID of the target subscription. + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ClearArpTableAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearArpTableRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -692,25 +610,24 @@ public async Task ClearArpTableAsync(string subscriptionId, string res } } - /// Clears ARP tables for this Isolation Domain. - /// The ID of the target subscription. + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ClearArpTable(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearArpTableRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -718,7 +635,7 @@ public Response ClearArpTable(string subscriptionId, string resourceGroupName, s } } - internal HttpMessage CreateClearNeighborTableRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body) + internal HttpMessage CreateCommitConfigurationRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -731,37 +648,32 @@ internal HttpMessage CreateClearNeighborTableRequest(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/", false); uri.AppendPath(l3IsolationDomainName, true); - uri.AppendPath("/clearNeighborTable", false); + uri.AppendPath("/commitConfiguration", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; _userAgent.Apply(message); return message; } - /// Clears IPv6 neighbor tables for this Isolation Domain. - /// The ID of the target subscription. + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ClearNeighborTableAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public async Task CommitConfigurationAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearNeighborTableRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -769,25 +681,24 @@ public async Task ClearNeighborTableAsync(string subscriptionId, strin } } - /// Clears IPv6 neighbor tables for this Isolation Domain. - /// The ID of the target subscription. + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the L3IsolationDomain. - /// Request payload. + /// Name of the L3 Isolation Domain. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ClearNeighborTable(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response CommitConfiguration(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); - using var message = CreateClearNeighborTableRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, l3IsolationDomainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -811,7 +722,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Displays L3IsolationDomains list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -840,7 +751,7 @@ public async Task> ListByResourceGroupNex /// Displays L3IsolationDomains list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -883,7 +794,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Displays L3IsolationDomains list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -910,7 +821,7 @@ public async Task> ListBySubscriptionNext /// Displays L3IsolationDomains list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NeighborGroupsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NeighborGroupsRestOperations.cs new file mode 100644 index 0000000000000..2888497687c43 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NeighborGroupsRestOperations.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class NeighborGroupsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NeighborGroupsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NeighborGroupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups/", false); + uri.AppendPath(neighborGroupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Implements the Neighbor Group PUT method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, neighborGroupName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the Neighbor Group PUT method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, neighborGroupName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string neighborGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups/", false); + uri.AppendPath(neighborGroupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the Neighbor Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, neighborGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NeighborGroupData.DeserializeNeighborGroupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeighborGroupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the Neighbor Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, neighborGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NeighborGroupData.DeserializeNeighborGroupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeighborGroupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups/", false); + uri.AppendPath(neighborGroupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Neighbor Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// Neighbor Group properties to update. Only annotations are supported. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, neighborGroupName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Neighbor Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// Neighbor Group properties to update. Only annotations are supported. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string neighborGroupName, NeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, neighborGroupName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string neighborGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups/", false); + uri.AppendPath(neighborGroupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements Neighbor Group DELETE method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, neighborGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements Neighbor Group DELETE method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neighbor Group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string neighborGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, neighborGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NeighborGroups list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NeighborGroups list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/neighborGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NeighborGroups list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NeighborGroups list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NeighborGroups list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NeighborGroups list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NeighborGroups list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NeighborGroups list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeighborGroupsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NeighborGroupsListResult.DeserializeNeighborGroupsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDeviceSkusRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDeviceSkusRestOperations.cs index b38baeab01da9..9cc1101b3b2c5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDeviceSkusRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDeviceSkusRestOperations.cs @@ -33,7 +33,7 @@ public NetworkDeviceSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -55,9 +55,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string networkDevic return message; } - /// Get Network Device SKU details. - /// The ID of the target subscription. - /// Name of the Network Device Sku. + /// Get a Network Device SKU details. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Network Device SKU. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -84,9 +84,9 @@ public async Task> GetAsync(string subscriptionId } } - /// Get Network Device SKU details. - /// The ID of the target subscription. - /// Name of the Network Device Sku. + /// Get a Network Device SKU details. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Network Device SKU. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -131,7 +131,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// List Network Device SKUs for the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -156,7 +156,7 @@ public async Task> ListBySubscriptionAsync } /// List Network Device SKUs for the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -196,7 +196,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// List Network Device SKUs for the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -223,7 +223,7 @@ public async Task> ListBySubscriptionNextP /// List Network Device SKUs for the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDevicesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDevicesRestOperations.cs index 28f3697663652..55b7b34d244bf 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDevicesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkDevicesRestOperations.cs @@ -33,7 +33,7 @@ public NetworkDevicesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create a Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create a Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// Request payload. @@ -135,8 +135,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get the Network Device resource details. - /// The ID of the target subscription. + /// Gets the Network Device resource details. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// The cancellation token to use. @@ -166,8 +166,8 @@ public async Task> GetAsync(string subscriptionId, s } } - /// Get the Network Device resource details. - /// The ID of the target subscription. + /// Gets the Network Device resource details. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update certain properties of the Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// Network Device properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update certain properties of the Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// Network Device properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete the Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete the Network Device resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Device. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all the Network Device resources in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAsync(s } /// List all the Network Device resources in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// List all the Network Device resources in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsync(st } /// List all the Network Device resources in a given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -487,7 +485,7 @@ public Response ListBySubscription(string subscription } } - internal HttpMessage CreateRebootRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) + internal HttpMessage CreateRebootRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, RebootProperties body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -504,27 +502,34 @@ internal HttpMessage CreateRebootRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; _userAgent.Apply(message); return message; } /// Reboot the Network Device. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. + /// Request payload. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RebootAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public async Task RebootAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, RebootProperties body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(body, nameof(body)); - using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -533,22 +538,25 @@ public async Task RebootAsync(string subscriptionId, string resourceGr } /// Reboot the Network Device. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. + /// Request payload. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Reboot(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public Response Reboot(string subscriptionId, string resourceGroupName, string networkDeviceName, RebootProperties body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(body, nameof(body)); - using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -556,7 +564,7 @@ public Response Reboot(string subscriptionId, string resourceGroupName, string n } } - internal HttpMessage CreateRestoreConfigRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) + internal HttpMessage CreateRefreshConfigurationRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -569,7 +577,7 @@ internal HttpMessage CreateRestoreConfigRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/restoreConfig", false); + uri.AppendPath("/refreshConfiguration", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -577,23 +585,24 @@ internal HttpMessage CreateRestoreConfigRequest(string subscriptionId, string re return message; } - /// Restore the configuration of the Network Device resource to last known good configuration. - /// The ID of the target subscription. + /// Refreshes the configuration the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RestoreConfigAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public async Task RefreshConfigurationAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateRestoreConfigRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRefreshConfigurationRequest(subscriptionId, resourceGroupName, networkDeviceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -601,23 +610,24 @@ public async Task RestoreConfigAsync(string subscriptionId, string res } } - /// Restore the configuration of the Network Device resource to last known good configuration. - /// The ID of the target subscription. + /// Refreshes the configuration the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RestoreConfig(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public Response RefreshConfiguration(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateRestoreConfigRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRefreshConfigurationRequest(subscriptionId, resourceGroupName, networkDeviceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -625,7 +635,7 @@ public Response RestoreConfig(string subscriptionId, string resourceGroupName, s } } - internal HttpMessage CreateUpdateVersionRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersionProperties body) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateDeviceAdministrativeState body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -638,7 +648,7 @@ internal HttpMessage CreateUpdateVersionRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/updateVersion", false); + uri.AppendPath("/updateAdministrativeState", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -650,25 +660,26 @@ internal HttpMessage CreateUpdateVersionRequest(string subscriptionId, string re return message; } - /// Update the SKU version of the Network Device resource. - /// The ID of the target subscription. + /// Updates the Administrative state of the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateVersionAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersionProperties body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateDeviceAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdateVersionRequest(subscriptionId, resourceGroupName, networkDeviceName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -676,94 +687,26 @@ public async Task UpdateVersionAsync(string subscriptionId, string res } } - /// Update the SKU version of the Network Device resource. - /// The ID of the target subscription. + /// Updates the Administrative state of the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response UpdateVersion(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersionProperties body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateDeviceAdministrativeState body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdateVersionRequest(subscriptionId, resourceGroupName, networkDeviceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGenerateSupportPackageRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); - uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/generateSupportPackage", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Generate Support Package for the given Network Device. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task GenerateSupportPackageAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - - using var message = CreateGenerateSupportPackageRequest(subscriptionId, resourceGroupName, networkDeviceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Generate Support Package for the given Network Device. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GenerateSupportPackage(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - - using var message = CreateGenerateSupportPackageRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -771,7 +714,7 @@ public Response GenerateSupportPackage(string subscriptionId, string resourceGro } } - internal HttpMessage CreateUpdatePowerCycleRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdatePowerCycleProperties body) + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersion body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -784,7 +727,7 @@ internal HttpMessage CreateUpdatePowerCycleRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/updatePowerCycle", false); + uri.AppendPath("/upgrade", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -796,25 +739,26 @@ internal HttpMessage CreateUpdatePowerCycleRequest(string subscriptionId, string return message; } - /// Update PDU power cycle of the Network Device. - /// The ID of the target subscription. + /// Upgrades the version of the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdatePowerCycleAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersion body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdatePowerCycleRequest(subscriptionId, resourceGroupName, networkDeviceName, body); + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkDeviceName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -822,94 +766,26 @@ public async Task UpdatePowerCycleAsync(string subscriptionId, string } } - /// Update PDU power cycle of the Network Device. - /// The ID of the target subscription. + /// Upgrades the version of the Network Device. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// Request payload. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response UpdatePowerCycle(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + public Response Upgrade(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateVersion body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNull(body, nameof(body)); - using var message = CreateUpdatePowerCycleRequest(subscriptionId, resourceGroupName, networkDeviceName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetStatusRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); - uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/getStatus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the running status of the Network Device. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task GetStatusAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the running status of the Network Device. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetStatus(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkDeviceName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -933,7 +809,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all the Network Device resources in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -962,7 +838,7 @@ public async Task> ListByResourceGroupNextPag /// List all the Network Device resources in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -1005,7 +881,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// List all the Network Device resources in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -1032,7 +908,7 @@ public async Task> ListBySubscriptionNextPage /// List all the Network Device resources in a given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricControllersRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricControllersRestOperations.cs index edc4b00214076..965424e21922a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricControllersRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricControllersRestOperations.cs @@ -33,7 +33,7 @@ public NetworkFabricControllersRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Creates a Network Fabric Controller. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Creates a Network Fabric Controller. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Shows the provisioning status of Network Fabric Controller. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscri } /// Shows the provisioning status of Network Fabric Controller. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates are currently not supported for the Network Fabric Controller resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// Network Fabric Controller properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates are currently not supported for the Network Fabric Controller resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// Network Fabric Controller properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the Network Fabric Controller resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the Network Fabric Controller resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric Controller. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Lists all the NetworkFabricControllers thats available in the resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGr } /// Lists all the NetworkFabricControllers thats available in the resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Lists all the NetworkFabricControllers by subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscripti } /// Lists all the NetworkFabricControllers by subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -487,144 +485,6 @@ public Response ListBySubscription(string su } } - internal HttpMessage CreateEnableWorkloadManagementNetworkRequest(string subscriptionId, string resourceGroupName, string networkFabricControllerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/", false); - uri.AppendPath(networkFabricControllerName, true); - uri.AppendPath("/enableWorkloadManagementNetwork", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Enables the workloadManagementNetwork (Tenant Network). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the networkFabricController. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task EnableWorkloadManagementNetworkAsync(string subscriptionId, string resourceGroupName, string networkFabricControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkFabricControllerName, nameof(networkFabricControllerName)); - - using var message = CreateEnableWorkloadManagementNetworkRequest(subscriptionId, resourceGroupName, networkFabricControllerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Enables the workloadManagementNetwork (Tenant Network). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the networkFabricController. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response EnableWorkloadManagementNetwork(string subscriptionId, string resourceGroupName, string networkFabricControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkFabricControllerName, nameof(networkFabricControllerName)); - - using var message = CreateEnableWorkloadManagementNetworkRequest(subscriptionId, resourceGroupName, networkFabricControllerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDisableWorkloadManagementNetworkRequest(string subscriptionId, string resourceGroupName, string networkFabricControllerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/", false); - uri.AppendPath(networkFabricControllerName, true); - uri.AppendPath("/disableWorkloadManagementNetwork", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Disables the workloadManagementNetwork (Tenant Network). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the networkFabricController. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DisableWorkloadManagementNetworkAsync(string subscriptionId, string resourceGroupName, string networkFabricControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkFabricControllerName, nameof(networkFabricControllerName)); - - using var message = CreateDisableWorkloadManagementNetworkRequest(subscriptionId, resourceGroupName, networkFabricControllerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Disables the workloadManagementNetwork (Tenant Network). - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the networkFabricController. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DisableWorkloadManagementNetwork(string subscriptionId, string resourceGroupName, string networkFabricControllerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkFabricControllerName, nameof(networkFabricControllerName)); - - using var message = CreateDisableWorkloadManagementNetworkRequest(subscriptionId, resourceGroupName, networkFabricControllerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -641,7 +501,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Lists all the NetworkFabricControllers thats available in the resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -670,7 +530,7 @@ public async Task> ListByResourceGr /// Lists all the NetworkFabricControllers thats available in the resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -713,7 +573,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all the NetworkFabricControllers by subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -740,7 +600,7 @@ public async Task> ListBySubscripti /// Lists all the NetworkFabricControllers by subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricSkusRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricSkusRestOperations.cs index 70760a0c17812..806c3aea8a20c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricSkusRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricSkusRestOperations.cs @@ -33,7 +33,7 @@ public NetworkFabricSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -55,9 +55,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string networkFabri return message; } - /// Implements Network Fabric Sku GET method. - /// The ID of the target subscription. - /// Name of the Network Fabric Sku. + /// Implements Network Fabric SKU GET method. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -84,9 +84,9 @@ public async Task> GetAsync(string subscriptionId } } - /// Implements Network Fabric Sku GET method. - /// The ID of the target subscription. - /// Name of the Network Fabric Sku. + /// Implements Network Fabric SKU GET method. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Network Fabric SKU. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -130,8 +130,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) return message; } - /// Implements NetworkFabricSkus list by subscription GET method. - /// The ID of the target subscription. + /// Implements Network Fabric SKUs list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -155,8 +155,8 @@ public async Task> ListBySubscriptionAsync } } - /// Implements NetworkFabricSkus list by subscription GET method. - /// The ID of the target subscription. + /// Implements Network Fabric SKUs list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -194,9 +194,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Implements NetworkFabricSkus list by subscription GET method. + /// Implements Network Fabric SKUs list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -221,9 +221,9 @@ public async Task> ListBySubscriptionNextP } } - /// Implements NetworkFabricSkus list by subscription GET method. + /// Implements Network Fabric SKUs list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricsRestOperations.cs index ad044be5adb4b..0d0ecbd3ac5e0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkFabricsRestOperations.cs @@ -33,7 +33,7 @@ public NetworkFabricsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Network Fabric resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionId, s } /// Get Network Fabric resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update certain properties of the Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// Network Fabric properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update certain properties of the Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// Network Fabric properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete Network Fabric resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Fabric. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all the Network Fabric resources in the given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAsync(s } /// List all the Network Fabric resources in the given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// List all the Network Fabric resources in the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsync(st } /// List all the Network Fabric resources in the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -509,9 +507,9 @@ internal HttpMessage CreateProvisionRequest(string subscriptionId, string resour } /// Provisions the underlying resources in the given Network Fabric instance. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -525,6 +523,7 @@ public async Task ProvisionAsync(string subscriptionId, string resourc await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -533,9 +532,9 @@ public async Task ProvisionAsync(string subscriptionId, string resourc } /// Provisions the underlying resources in the given Network Fabric instance. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -549,6 +548,7 @@ public Response Provision(string subscriptionId, string resourceGroupName, strin _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -578,9 +578,9 @@ internal HttpMessage CreateDeprovisionRequest(string subscriptionId, string reso } /// Deprovisions the underlying resources in the given Network Fabric instance. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -594,6 +594,7 @@ public async Task DeprovisionAsync(string subscriptionId, string resou await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -602,9 +603,9 @@ public async Task DeprovisionAsync(string subscriptionId, string resou } /// Deprovisions the underlying resources in the given Network Fabric instance. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -618,6 +619,536 @@ public Response Deprovision(string subscriptionId, string resourceGroupName, str _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateVersion body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Upgrades the version of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Network Fabric properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateVersion body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkFabricName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades the version of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Network Fabric properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateVersion body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkFabricName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateRefreshConfigurationRequest(string subscriptionId, string resourceGroupName, string networkFabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/refreshConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Refreshes the configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RefreshConfigurationAsync(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateRefreshConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Refreshes the configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RefreshConfiguration(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateRefreshConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateWorkloadManagementBfdConfigurationRequest(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/updateWorkloadManagementBfdConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateWorkloadManagementBfdConfigurationAsync(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateWorkloadManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Workload Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateWorkloadManagementBfdConfiguration(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateWorkloadManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateInfraManagementBfdConfigurationRequest(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/updateInfraManagementBfdConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateInfraManagementBfdConfigurationAsync(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateInfraManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Infra Management BFD Configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateInfraManagementBfdConfiguration(string subscriptionId, string resourceGroupName, string networkFabricName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateInfraManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string networkFabricName, ValidateConfigurationProperties body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/validateConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates the configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Validate configuration properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string networkFabricName, ValidateConfigurationProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates the configuration of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Validate configuration properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string networkFabricName, ValidateConfigurationProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetTopologyRequest(string subscriptionId, string resourceGroupName, string networkFabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/getTopology", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets Topology of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task GetTopologyAsync(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateGetTopologyRequest(subscriptionId, resourceGroupName, networkFabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets Topology of the underlying resources in the given Network Fabric instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetTopology(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateGetTopologyRequest(subscriptionId, resourceGroupName, networkFabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCommitConfigurationRequest(string subscriptionId, string resourceGroupName, string networkFabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/commitConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CommitConfigurationAsync(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Atomic update of the given Network Fabric instance. Sync update of NFA resources at Fabric level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CommitConfiguration(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: case 202: return message.Response; default: @@ -641,7 +1172,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all the Network Fabric resources in the given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -670,7 +1201,7 @@ public async Task> ListByResourceGroupNextPag /// List all the Network Fabric resources in the given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -713,7 +1244,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// List all the Network Fabric resources in the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -740,7 +1271,7 @@ public async Task> ListBySubscriptionNextPage /// List all the Network Fabric resources in the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs index 7357c9ce2065e..2dc4c1e33f2cb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs @@ -33,7 +33,7 @@ public NetworkInterfacesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,10 +64,10 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create a Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. + /// Name of the Network Device. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -93,10 +93,10 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create a Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. + /// Name of the Network Device. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -144,10 +144,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the Network Interface resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -177,10 +177,10 @@ public async Task> GetAsync(string subscriptionId } /// Get the Network Interface resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -236,10 +236,10 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update certain properties of the Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// NetworkInterface properties to update. Only tags are supported. /// The cancellation token to use. /// , , , or is null. @@ -265,10 +265,10 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update certain properties of the Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// NetworkInterface properties to update. Only tags are supported. /// The cancellation token to use. /// , , , or is null. @@ -316,10 +316,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete the Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -334,7 +334,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -344,10 +343,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete the Network Interface resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterfaceName. + /// Name of the Network Device. + /// Name of the Network Interface. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -362,7 +361,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -371,7 +369,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) + internal HttpMessage CreateListByNetworkDeviceRequest(string subscriptionId, string resourceGroupName, string networkDeviceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -393,19 +391,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List all the Network Interface resources in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public async Task> ListByNetworkDeviceAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateListByNetworkDeviceRequest(subscriptionId, resourceGroupName, networkDeviceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -422,19 +420,19 @@ public async Task> ListAsync(string subscription } /// List all the Network Interface resources in a given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public Response ListByNetworkDevice(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateListByNetworkDeviceRequest(subscriptionId, resourceGroupName, networkDeviceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -450,81 +448,6 @@ public Response List(string subscriptionId, string resour } } - internal HttpMessage CreateGetStatusRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkDevices/", false); - uri.AppendPath(networkDeviceName, true); - uri.AppendPath("/networkInterfaces/", false); - uri.AppendPath(networkInterfaceName, true); - uri.AppendPath("/getStatus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get the running status of the Network Interface. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task GetStatusAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get the running status of the Network Interface. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetStatus(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeState body) { var message = _pipeline.CreateMessage(); @@ -553,10 +476,10 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI } /// Update the admin state of the Network Interface. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. + /// Name of the Network Device. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -573,6 +496,7 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -581,10 +505,10 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Update the admin state of the Network Interface. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// Name of the NetworkInterface. + /// Name of the Network Device. + /// Name of the Network Interface. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -601,6 +525,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -608,7 +533,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName) + internal HttpMessage CreateListByNetworkDeviceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -624,20 +549,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List all the Network Interface resources in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public async Task> ListByNetworkDeviceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateListByNetworkDeviceNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkDeviceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -655,20 +580,20 @@ public async Task> ListNextPageAsync(string next /// List all the Network Interface resources in a given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. + /// Name of the Network Device. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public Response ListByNetworkDeviceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateListByNetworkDeviceNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkDeviceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkPacketBrokersRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkPacketBrokersRestOperations.cs new file mode 100644 index 0000000000000..51d4aa189f64a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkPacketBrokersRestOperations.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class NetworkPacketBrokersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkPacketBrokersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NetworkPacketBrokersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/", false); + uri.AppendPath(networkPacketBrokerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkPacketBrokerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkPacketBrokerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string networkPacketBrokerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/", false); + uri.AppendPath(networkPacketBrokerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves details of this Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkPacketBrokerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkPacketBrokerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves details of this Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkPacketBrokerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkPacketBrokerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/", false); + uri.AppendPath(networkPacketBrokerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// API to update certain properties of the Network Packet Broker resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// Network Packet Broker properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkPacketBrokerName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// API to update certain properties of the Network Packet Broker resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// Network Packet Broker properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkPacketBrokerName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string networkPacketBrokerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/", false); + uri.AppendPath(networkPacketBrokerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkPacketBrokerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes Network Packet Broker. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Packet Broker. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string networkPacketBrokerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkPacketBrokerName, nameof(networkPacketBrokerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkPacketBrokerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NetworkPacketBrokers list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NetworkPacketBrokers list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Packet Brokers list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Packet Brokers list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays NetworkPacketBrokers list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays NetworkPacketBrokers list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Packet Brokers list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Packet Brokers list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkPacketBrokersListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkPacketBrokersListResult.DeserializeNetworkPacketBrokersListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRackSkusRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRackSkusRestOperations.cs deleted file mode 100644 index 4611e844a89bd..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRackSkusRestOperations.cs +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal partial class NetworkRackSkusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of NetworkRackSkusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public NetworkRackSkusRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string networkRackSkuName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/", false); - uri.AppendPath(networkRackSkuName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get Network Rack SKU resource. - /// The ID of the target subscription. - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var message = CreateGetRequest(subscriptionId, networkRackSkuName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkuData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkRackSkuData.DeserializeNetworkRackSkuData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((NetworkRackSkuData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get Network Rack SKU resource. - /// The ID of the target subscription. - /// Name of the Network Rack Sku. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string networkRackSkuName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(networkRackSkuName, nameof(networkRackSkuName)); - - using var message = CreateGetRequest(subscriptionId, networkRackSkuName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkuData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkRackSkuData.DeserializeNetworkRackSkuData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((NetworkRackSkuData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkRackSkus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all Network Rack SKUs in the given subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkusListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkRackSkusListResult.DeserializeNetworkRackSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all Network Rack SKUs in the given subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkusListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkRackSkusListResult.DeserializeNetworkRackSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List all Network Rack SKUs in the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkusListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkRackSkusListResult.DeserializeNetworkRackSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List all Network Rack SKUs in the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkRackSkusListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkRackSkusListResult.DeserializeNetworkRackSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRacksRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRacksRestOperations.cs index 2f7bcd68d61a2..a95b393d24016 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRacksRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRacksRestOperations.cs @@ -33,7 +33,7 @@ public NetworkRacksRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Create Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Create Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Network Rack resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionId, str } /// Get Network Rack resource details. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update certain properties of the Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// Network Rack properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update certain properties of the Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// Network Rack properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// The cancellation token to use. @@ -321,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete Network Rack resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Network Rack. /// The cancellation token to use. @@ -365,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all Network Rack resources in the given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -392,7 +392,7 @@ public async Task> ListByResourceGroupAsync(str } /// List all Network Rack resources in the given resource group. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -436,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// List all Network Rack resources in the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -461,7 +461,7 @@ public async Task> ListBySubscriptionAsync(stri } /// List all Network Rack resources in the given subscription. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -501,7 +501,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all Network Rack resources in the given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -530,7 +530,7 @@ public async Task> ListByResourceGroupNextPageA /// List all Network Rack resources in the given resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -573,7 +573,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// List all Network Rack resources in the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -600,7 +600,7 @@ public async Task> ListBySubscriptionNextPageAs /// List all Network Rack resources in the given subscription. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapRulesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapRulesRestOperations.cs new file mode 100644 index 0000000000000..3e870c41d0b9a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapRulesRestOperations.cs @@ -0,0 +1,849 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class NetworkTapRulesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkTapRulesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NetworkTapRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRuleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkTapRuleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkTapRuleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Network Tap Rule resource details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkTapRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapRuleData.DeserializeNetworkTapRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkTapRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Network Tap Rule resource details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkTapRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapRuleData.DeserializeNetworkTapRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkTapRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRulePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update certain properties of the Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Network Tap Rule properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkTapRuleName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update certain properties of the Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Network Tap Rule properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string networkTapRuleName, NetworkTapRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkTapRuleName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkTapRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete Network Tap Rule resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkTapRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the Network Tap Rule resources in the given resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the Network Tap Rule resources in the given resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the Network Tap Rule resources in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the Network Tap Rule resources in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendPath("/updateAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapRuleName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkTapRuleName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapRuleName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResyncRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendPath("/resync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResyncAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, networkTapRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resync(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, networkTapRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string networkTapRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTapRules/", false); + uri.AppendPath(networkTapRuleName, true); + uri.AppendPath("/validateConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkTapRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap Rule. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string networkTapRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkTapRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the Network Tap Rule resources in the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the Network Tap Rule resources in the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the Network Tap Rule resources in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the Network Tap Rule resources in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapRulesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapRulesListResult.DeserializeNetworkTapRulesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapsRestOperations.cs new file mode 100644 index 0000000000000..5849742b78b11 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapsRestOperations.cs @@ -0,0 +1,778 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + internal partial class NetworkTapsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkTapsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NetworkTapsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-15"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkTapName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, networkTapName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string networkTapName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves details of this Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkTapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapData.DeserializeNetworkTapData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkTapData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves details of this Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkTapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapData.DeserializeNetworkTapData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkTapData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// API to update certain properties of the Network Tap resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Network Tap properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkTapName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// API to update certain properties of the Network Tap resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Network Tap properties to update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string networkTapName, NetworkTapPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkTapName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string networkTapName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkTapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes Network Tap. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, networkTapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Taps list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Taps list by resource group GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Taps list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Taps list by subscription GET method. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkTapName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendPath("/updateAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkTapName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkTapName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateResyncRequest(string subscriptionId, string resourceGroupName, string networkTapName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkTaps/", false); + uri.AppendPath(networkTapName, true); + uri.AppendPath("/resync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResyncAsync(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, networkTapName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Implements the operation to the underlying resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Tap. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resync(string subscriptionId, string resourceGroupName, string networkTapName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + + using var message = CreateResyncRequest(subscriptionId, resourceGroupName, networkTapName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Taps list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Taps list by resource group GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Displays Network Taps list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Displays Network Taps list by subscription GET method. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkTapsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkTapsListResult.DeserializeNetworkTapsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkToNetworkInterconnectsRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkToNetworkInterconnectsRestOperations.cs index 49d19f0b187ac..a753311432589 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkToNetworkInterconnectsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkToNetworkInterconnectsRestOperations.cs @@ -33,7 +33,7 @@ public NetworkToNetworkInterconnectsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -64,10 +64,10 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Configuration used to setup CE-PE connectivity PUT Method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -93,10 +93,10 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Configuration used to setup CE-PE connectivity PUT Method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// Request payload. /// The cancellation token to use. /// , , , or is null. @@ -144,10 +144,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements NetworkToNetworkInterconnects GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -177,10 +177,10 @@ public async Task> GetAsync(string su } /// Implements NetworkToNetworkInterconnects GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnect. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -209,6 +209,90 @@ public Response Get(string subscriptionId, str } } + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/networkToNetworkInterconnects/", false); + uri.AppendPath(networkToNetworkInterconnectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update certain properties of the Network To NetworkInterconnects resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Network to Network Interconnect properties to update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update certain properties of the Network To NetworkInterconnects resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Network to Network Interconnect properties to update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, NetworkToNetworkInterconnectPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName) { var message = _pipeline.CreateMessage(); @@ -232,10 +316,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements NetworkToNetworkInterconnects DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -250,7 +334,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -260,10 +343,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements NetworkToNetworkInterconnects DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. - /// Name of the NetworkToNetworkInterconnectName. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -278,7 +361,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -287,7 +369,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string n } } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string networkFabricName) + internal HttpMessage CreateListByNetworkFabricRequest(string subscriptionId, string resourceGroupName, string networkFabricName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -309,19 +391,19 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Implements Network To Network Interconnects list by Network Fabric GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + public async Task> ListByNetworkFabricAsync(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, networkFabricName); + using var message = CreateListByNetworkFabricRequest(subscriptionId, resourceGroupName, networkFabricName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -338,19 +420,19 @@ public async Task> ListAsync(string } /// Implements Network To Network Interconnects list by Network Fabric GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + public Response ListByNetworkFabric(string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, networkFabricName); + using var message = CreateListByNetworkFabricRequest(subscriptionId, resourceGroupName, networkFabricName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -366,7 +448,177 @@ public Response List(string subscriptionId, s } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName) + internal HttpMessage CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/networkToNetworkInterconnects/", false); + uri.AppendPath(networkToNetworkInterconnectName, true); + uri.AppendPath("/updateNpbStaticRouteBfdAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the NPB Static Route BFD Administrative State. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Request payload. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateNpbStaticRouteBfdAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the NPB Static Route BFD Administrative State. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Request payload. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateNpbStaticRouteBfdAdministrativeState(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/networkFabrics/", false); + uri.AppendPath(networkFabricName, true); + uri.AppendPath("/networkToNetworkInterconnects/", false); + uri.AppendPath(networkToNetworkInterconnectName, true); + uri.AppendPath("/updateAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Admin State. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Request payload. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Admin State. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Network Fabric. + /// Name of the Network to Network Interconnect. + /// Request payload. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkFabricName, string networkToNetworkInterconnectName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNullOrEmpty(networkToNetworkInterconnectName, nameof(networkToNetworkInterconnectName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByNetworkFabricNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -382,20 +634,20 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Implements Network To Network Interconnects list by Network Fabric GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + public async Task> ListByNetworkFabricNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkFabricName); + using var message = CreateListByNetworkFabricNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkFabricName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -413,20 +665,20 @@ public async Task> ListNextPageAsync /// Implements Network To Network Interconnects list by Network Fabric GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkFabric. + /// Name of the Network Fabric. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) + public Response ListByNetworkFabricNextPage(string nextLink, string subscriptionId, string resourceGroupName, string networkFabricName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkFabricName); + using var message = CreateListByNetworkFabricNextPageRequest(nextLink, subscriptionId, resourceGroupName, networkFabricName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs index dcdb60939858f..383b5d98fbf63 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs @@ -33,7 +33,7 @@ public RoutePoliciesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -62,7 +62,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Implements Route Policy PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// Request payload. @@ -89,7 +89,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } /// Implements Route Policy PUT method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// Request payload. @@ -136,7 +136,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Implements Route Policy GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// The cancellation token to use. @@ -167,7 +167,7 @@ public async Task> GetAsync(string subscriptionId, str } /// Implements Route Policy GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// The cancellation token to use. @@ -222,7 +222,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// API to update certain properties of the Route Policy resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// Route Policy properties to update. @@ -249,7 +249,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// API to update certain properties of the Route Policy resource. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// Route Policy properties to update. @@ -296,7 +296,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Implements Route Policy DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// The cancellation token to use. @@ -312,7 +312,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -322,7 +321,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Implements Route Policy DELETE method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the Route Policy. /// The cancellation token to use. @@ -338,7 +337,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -367,7 +365,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Implements RoutePolicies list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -394,7 +392,7 @@ public async Task> ListByResourceGroupAsync(st } /// Implements RoutePolicies list by resource group GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. @@ -438,7 +436,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Implements RoutePolicies list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -463,7 +461,7 @@ public async Task> ListBySubscriptionAsync(str } /// Implements RoutePolicies list by subscription GET method. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -487,6 +485,227 @@ public Response ListBySubscription(string subscriptionI } } + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string routePolicyName, UpdateAdministrativeState body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/routePolicies/", false); + uri.AppendPath(routePolicyName, true); + uri.AppendPath("/updateAdministrativeState", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updated the admin state for this Route Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string routePolicyName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, routePolicyName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updated the admin state for this Route Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// Request payload. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string routePolicyName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, routePolicyName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateValidateConfigurationRequest(string subscriptionId, string resourceGroupName, string routePolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/routePolicies/", false); + uri.AppendPath(routePolicyName, true); + uri.AppendPath("/validateConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ValidateConfigurationAsync(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, routePolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates the configuration of the resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ValidateConfiguration(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, routePolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCommitConfigurationRequest(string subscriptionId, string resourceGroupName, string routePolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ManagedNetworkFabric/routePolicies/", false); + uri.AppendPath(routePolicyName, true); + uri.AppendPath("/commitConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CommitConfigurationAsync(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, routePolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Commits the configuration of the given resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Route Policy. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CommitConfiguration(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + + using var message = CreateCommitConfigurationRequest(subscriptionId, resourceGroupName, routePolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -503,7 +722,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Implements RoutePolicies list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -532,7 +751,7 @@ public async Task> ListByResourceGroupNextPage /// Implements RoutePolicies list by resource group GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. @@ -575,7 +794,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Implements RoutePolicies list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -602,7 +821,7 @@ public async Task> ListBySubscriptionNextPageA /// Implements RoutePolicies list by subscription GET method. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs index 218aed3c81e0d..a197589ee9302 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -22,13 +21,14 @@ public partial class RoutePolicyData : TrackedResourceData { /// Initializes a new instance of RoutePolicyData. /// The location. - /// Route Policy statements. - /// is null. - public RoutePolicyData(AzureLocation location, IEnumerable statements) : base(location) + /// Arm Resource ID of Network Fabric. + /// is null. + public RoutePolicyData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) { - Argument.AssertNotNull(statements, nameof(statements)); + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); - Statements = statements.ToList(); + Statements = new ChangeTrackingList(); + NetworkFabricId = networkFabricId; } /// Initializes a new instance of RoutePolicyData. @@ -39,20 +39,40 @@ public RoutePolicyData(AzureLocation location, IEnumerable The tags. /// The location. /// Switch configuration description. + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. /// Route Policy statements. - /// Gets the provisioning state of the resource. - internal RoutePolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList statements, ProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// Arm Resource ID of Network Fabric. + /// AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal RoutePolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, CommunityActionType? defaultAction, IList statements, ResourceIdentifier networkFabricId, AddressFamilyType? addressFamilyType, ConfigurationState? configurationState, ProvisioningState? provisioningState, AdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; + DefaultAction = defaultAction; Statements = statements; + NetworkFabricId = networkFabricId; + AddressFamilyType = addressFamilyType; + ConfigurationState = configurationState; ProvisioningState = provisioningState; + AdministrativeState = administrativeState; } /// Switch configuration description. public string Annotation { get; set; } + /// Default action that needs to be applied when no condition is matched. Example: Permit | Deny. + public CommunityActionType? DefaultAction { get; set; } /// Route Policy statements. public IList Statements { get; } - /// Gets the provisioning state of the resource. + /// Arm Resource ID of Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// AddressFamilyType. This parameter decides whether the given ipv4 or ipv6 route policy. + public AddressFamilyType? AddressFamilyType { get; set; } + /// Configuration state of the resource. + public ConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. public ProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public AdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs index 44bd5710eea5a..70de9bfdc6444 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs @@ -297,6 +297,218 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Rou } } + /// + /// Updated the admin state for this Route Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState + /// + /// + /// Operation Id + /// RoutePolicies_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _routePolicyRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updated the admin state for this Route Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/updateAdministrativeState + /// + /// + /// Operation Id + /// RoutePolicies_UpdateAdministrativeState + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request payload. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _routePolicyRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForDeviceUpdateOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the configuration of the resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration + /// + /// + /// Operation Id + /// RoutePolicies_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ValidateConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _routePolicyRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the configuration of the resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/validateConfiguration + /// + /// + /// Operation Id + /// RoutePolicies_ValidateConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation ValidateConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _routePolicyRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResponseOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Commits the configuration of the given resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration + /// + /// + /// Operation Id + /// RoutePolicies_CommitConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> CommitConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.CommitConfiguration"); + scope.Start(); + try + { + var response = await _routePolicyRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Commits the configuration of the given resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}/commitConfiguration + /// + /// + /// Operation Id + /// RoutePolicies_CommitConfiguration + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation CommitConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.CommitConfiguration"); + scope.Start(); + try + { + var response = _routePolicyRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new CommonPostActionResponseForStateUpdateOperationSource(), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md index c2444ec7c136f..02d1653652924 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: Azure.ResourceManager.ManagedNetworkFabric namespace: Azure.ResourceManager.ManagedNetworkFabric -require: https://github.com/Azure/azure-rest-api-specs/blob/453fb04aa9e602377784d62390d2985799a9efa0/specification/managednetworkfabric/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/managednetworkfabric/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true @@ -60,4 +60,4 @@ directive: where: $.definitions transform: $.ExpressRouteConnectionInformation.required = [ 'expressRouteCircuitId' ]; -``` \ No newline at end of file +```