From de399a68ed99b3d224bfc16416966fa346665f56 Mon Sep 17 00:00:00 2001 From: Mohana-Krishna-Nali <117837369+Mohana-Krishna-Nali@users.noreply.github.com> Date: Sat, 29 Jul 2023 13:45:45 +0530 Subject: [PATCH] Release Azure.ResourceManager.ManagedNetworkFabric for first GA (#37726) --- .vscode/cspell.json | 3 +- .../CHANGELOG.md | 24 +- .../README.md | 2 +- ...ger.ManagedNetworkFabric.netstandard2.0.cs | 3345 +++++++++++------ .../assets.json | 2 +- .../Sample_AccessControlListResource.cs | 151 - .../Sample_ExternalNetworkCollection.cs | 187 - .../Samples/Sample_ExternalNetworkResource.cs | 321 -- .../Sample_InternalNetworkCollection.cs | 227 -- .../Samples/Sample_InternalNetworkResource.cs | 395 -- .../Sample_L2IsolationDomainResource.cs | 280 -- .../Sample_L3IsolationDomainResource.cs | 309 -- .../Samples/Sample_NetworkDeviceCollection.cs | 44 +- ...ample_NetworkDeviceInterfaceCollection.cs} | 80 +- .../Sample_NetworkDeviceInterfaceResource.cs | 155 + .../Samples/Sample_NetworkDeviceResource.cs | 180 +- .../Sample_NetworkDeviceSkuCollection.cs | 16 +- .../Sample_NetworkDeviceSkuResource.cs | 6 +- ...tworkFabricAccessControlListCollection.cs} | 221 +- ..._NetworkFabricAccessControlListResource.cs | 377 ++ .../Samples/Sample_NetworkFabricCollection.cs | 179 +- ...ample_NetworkFabricControllerCollection.cs | 41 +- .../Sample_NetworkFabricControllerResource.cs | 91 +- ..._NetworkFabricExternalNetworkCollection.cs | 223 ++ ...le_NetworkFabricExternalNetworkResource.cs | 252 ++ ...ple_NetworkFabricIPCommunityCollection.cs} | 84 +- ...ample_NetworkFabricIPCommunityResource.cs} | 87 +- ...orkFabricIPExtendedCommunityCollection.cs} | 77 +- ...tworkFabricIPExtendedCommunityResource.cs} | 83 +- ...Sample_NetworkFabricIPPrefixCollection.cs} | 73 +- ...> Sample_NetworkFabricIPPrefixResource.cs} | 79 +- ..._NetworkFabricInternalNetworkCollection.cs | 253 ++ ...le_NetworkFabricInternalNetworkResource.cs | 316 ++ ..._NetworkFabricInternetGatewayCollection.cs | 120 + ...le_NetworkFabricInternetGatewayResource.cs | 125 + ...workFabricInternetGatewayRuleCollection.cs | 168 + ...etworkFabricInternetGatewayRuleResource.cs | 151 + ...tworkFabricL2IsolationDomainCollection.cs} | 69 +- ..._NetworkFabricL2IsolationDomainResource.cs | 245 ++ ...tworkFabricL3IsolationDomainCollection.cs} | 84 +- ..._NetworkFabricL3IsolationDomainResource.cs | 266 ++ ...le_NetworkFabricNeighborGroupCollection.cs | 177 + ...mple_NetworkFabricNeighborGroupResource.cs | 164 + .../Samples/Sample_NetworkFabricResource.cs | 402 +- ...ple_NetworkFabricRoutePolicyCollection.cs} | 97 +- ...Sample_NetworkFabricRoutePolicyResource.cs | 295 ++ .../Sample_NetworkFabricSkuCollection.cs | 16 +- .../Sample_NetworkFabricSkuResource.cs | 6 +- .../Sample_NetworkInterfaceResource.cs | 179 - .../Sample_NetworkPacketBrokerCollection.cs | 163 + .../Sample_NetworkPacketBrokerResource.cs | 151 + .../Samples/Sample_NetworkRackCollection.cs | 36 +- .../Samples/Sample_NetworkRackResource.cs | 32 +- .../Sample_NetworkRackSkuCollection.cs | 117 - .../Samples/Sample_NetworkRackSkuResource.cs | 49 - .../Samples/Sample_NetworkTapCollection.cs | 183 + .../Samples/Sample_NetworkTapResource.cs | 235 ++ .../Sample_NetworkTapRuleCollection.cs | 286 ++ .../Samples/Sample_NetworkTapRuleResource.cs | 357 ++ ..._NetworkToNetworkInterconnectCollection.cs | 107 +- ...le_NetworkToNetworkInterconnectResource.cs | 197 +- .../Samples/Sample_RoutePolicyResource.cs | 151 - ...esourceManager.ManagedNetworkFabric.csproj | 2 +- .../src/Generated/AccessControlListData.cs | 64 - .../ArmManagedNetworkFabricModelFactory.cs | 785 ++-- .../ManagedNetworkFabricExtensions.cs | 1057 ++++-- .../ResourceGroupResourceExtensionClient.cs | 98 +- .../SubscriptionResourceExtensionClient.cs | 495 ++- .../src/Generated/ExternalNetworkData.cs | 79 - .../src/Generated/ExternalNetworkResource.cs | 678 ---- .../src/Generated/IPCommunityData.cs | 61 - .../src/Generated/IPExtendedCommunityData.cs | 56 - .../src/Generated/IPPrefixData.cs | 58 - .../src/Generated/InternalNetworkData.cs | 104 - .../src/Generated/InternalNetworkResource.cs | 754 ---- .../src/Generated/L2IsolationDomainData.cs | 68 - .../src/Generated/L3IsolationDomainData.cs | 85 - ...teCommonPostActionResultOperationSource.cs | 31 + .../ExternalNetworkOperationSource.cs | 40 - ...etDeviceStatusPropertiesOperationSource.cs | 31 - .../IDictionaryOperationSource.cs | 42 - .../IPCommunityOperationSource.cs | 40 - .../IPPrefixOperationSource.cs | 40 - .../InterfaceStatusOperationSource.cs | 31 - .../InternalNetworkOperationSource.cs | 40 - .../L2IsolationDomainOperationSource.cs | 40 - .../L3IsolationDomainOperationSource.cs | 40 - .../NetworkDeviceInterfaceOperationSource.cs | 40 + ...kFabricAccessControlListOperationSource.cs | 40 + ...orkFabricExternalNetworkOperationSource.cs | 40 + ...NetworkFabricIPCommunityOperationSource.cs | 40 + ...abricIPExtendedCommunityOperationSource.cs | 40 + .../NetworkFabricIPPrefixOperationSource.cs | 40 + ...orkFabricInternalNetworkOperationSource.cs | 40 + ...orkFabricInternetGatewayOperationSource.cs | 40 + ...abricInternetGatewayRuleOperationSource.cs | 40 + ...kFabricL2IsolationDomainOperationSource.cs | 40 + ...kFabricL3IsolationDomainOperationSource.cs | 40 + ...tworkFabricNeighborGroupOperationSource.cs | 40 + ...NetworkFabricRoutePolicyOperationSource.cs | 40 + .../NetworkInterfaceOperationSource.cs | 40 - ... => NetworkPacketBrokerOperationSource.cs} | 16 +- .../NetworkTapOperationSource.cs | 40 + .../NetworkTapRuleOperationSource.cs | 40 + .../RoutePolicyOperationSource.cs | 40 - ...teCommonPostActionResultOperationSource.cs | 31 + ...SupportPackagePropertiesOperationSource.cs | 31 - ...idateConfigurationResultOperationSource.cs | 31 + .../Models/ARPProperties.Serialization.cs | 57 - .../src/Generated/Models/ARPProperties.cs | 61 - .../AccessControlListAction.Serialization.cs | 59 + .../Models/AccessControlListAction.cs | 32 + ...olListConditionProperties.Serialization.cs | 100 - .../AccessControlListConditionProperties.cs | 76 - ...ControlListMatchCondition.Serialization.cs | 229 ++ .../Models/AccessControlListMatchCondition.cs | 59 + ...rolListMatchConfiguration.Serialization.cs | 125 + .../AccessControlListMatchConfiguration.cs | 49 + .../Models/AccessControlListPatch.cs | 32 - ...sControlListPortCondition.Serialization.cs | 132 + .../Models/AccessControlListPortCondition.cs | 37 + .../AccessControlListsResult.Serialization.cs | 50 + ...tResult.cs => AccessControlListsResult.cs} | 20 +- .../src/Generated/Models/AclActionType.cs | 54 + .../Models/ActionIPCommunityProperties.cs | 15 +- .../ActionIPExtendedCommunityProperties.cs | 15 +- .../src/Generated/Models/AddressFamily.cs | 51 - .../src/Generated/Models/AddressFamilyType.cs | 51 + ...eState.cs => AdministrativeEnableState.cs} | 26 +- .../Models/AggregateRoute.Serialization.cs | 11 +- .../src/Generated/Models/AggregateRoute.cs | 17 +- .../Models/AggregateRouteConfiguration.cs | 6 +- ...tationResourceProperties.Serialization.cs} | 6 +- ...rce.cs => AnnotationResourceProperties.cs} | 10 +- .../Models/BfdAdministrativeState.cs | 57 + .../Models/BfdConfiguration.Serialization.cs | 22 +- .../src/Generated/Models/BfdConfiguration.cs | 18 +- .../Models/BgpConfiguration.Serialization.cs | 25 +- .../src/Generated/Models/BgpConfiguration.cs | 34 +- .../Generated/Models/BooleanEnumProperty.cs | 51 - ...DynamicMatchConfiguration.Serialization.cs | 109 + .../Models/CommonDynamicMatchConfiguration.cs | 42 + .../CommonMatchConditions.Serialization.cs | 89 + .../Generated/Models/CommonMatchConditions.cs | 40 + .../src/Generated/Models/Condition.cs | 54 - .../Generated/Models/ConditionActionType.cs | 51 - .../Models/ConnectedSubnet.Serialization.cs | 11 +- .../src/Generated/Models/ConnectedSubnet.cs | 16 +- ...nnectedSubnetRoutePolicy.Serialization.cs} | 25 +- .../Models/ConnectedSubnetRoutePolicy.cs | 34 + .../Models/DeviceLimits.Serialization.cs | 123 - .../src/Generated/Models/DeviceLimits.cs | 48 - ...ateCommonPostActionResult.Serialization.cs | 79 + .../DeviceUpdateCommonPostActionResult.cs | 43 + .../Generated/Models/EnabledDisabledState.cs | 51 - .../Models/ExportRoutePolicy.Serialization.cs | 63 + .../src/Generated/Models/ExportRoutePolicy.cs | 34 + ...ortRoutePolicyInformation.Serialization.cs | 63 + .../Models/ExportRoutePolicyInformation.cs | 34 + ...outeConnectionInformation.Serialization.cs | 4 +- .../ExpressRouteConnectionInformation.cs | 6 +- ...NetworkOptionAProperties.Serialization.cs} | 48 +- .../ExternalNetworkOptionAProperties.cs | 58 + .../Generated/Models/ExternalNetworkPatch.cs | 31 - ...orkPatchOptionAProperties.Serialization.cs | 177 + .../ExternalNetworkPatchOptionAProperties.cs | 58 + ...ernalNetworkPropertiesOptionAProperties.cs | 32 - .../ExternalNetworksList.Serialization.cs | 6 +- .../Generated/Models/ExternalNetworksList.cs | 12 +- .../Models/FabricBfdConfiguration.cs | 32 - ...GetDeviceStatusProperties.Serialization.cs | 45 - .../Models/GetDeviceStatusProperties.cs | 37 - .../IPCommunitiesListResult.Serialization.cs | 6 +- .../Models/IPCommunitiesListResult.cs | 12 +- .../IPCommunityAddOperationProperties.cs | 7 +- .../Models/IPCommunityIdList.Serialization.cs | 18 +- .../src/Generated/Models/IPCommunityIdList.cs | 6 +- .../src/Generated/Models/IPCommunityPatch.cs | 25 - .../Models/IPCommunityRule.Serialization.cs | 93 + .../src/Generated/Models/IPCommunityRule.cs | 55 + ...ExtendedCommunityAddOperationProperties.cs | 7 +- ...IPExtendedCommunityIdList.Serialization.cs | 18 +- .../Models/IPExtendedCommunityIdList.cs | 6 +- ...tendedCommunityListResult.Serialization.cs | 6 +- .../Models/IPExtendedCommunityListResult.cs | 12 +- .../Models/IPExtendedCommunityPatch.cs | 25 - .../IPExtendedCommunityRule.Serialization.cs | 68 + .../Models/IPExtendedCommunityRule.cs | 50 + .../Models/IPMatchCondition.Serialization.cs | 114 + .../src/Generated/Models/IPMatchCondition.cs | 45 + .../Models/IPMatchConditionPrefixType.cs | 51 + .../src/Generated/Models/IPPrefixPatch.cs | 25 - ...ation.cs => IPPrefixRule.Serialization.cs} | 20 +- ...esIPPrefixRulesItem.cs => IPPrefixRule.cs} | 20 +- .../Generated/Models/IPPrefixRuleCondition.cs | 57 + .../IPPrefixesListResult.Serialization.cs | 6 +- .../Generated/Models/IPPrefixesListResult.cs | 12 +- .../Models/ImportRoutePolicy.Serialization.cs | 63 + .../src/Generated/Models/ImportRoutePolicy.cs | 34 + ...ortRoutePolicyInformation.Serialization.cs | 63 + .../Models/ImportRoutePolicyInformation.cs | 34 + .../Models/InterfaceStatus.Serialization.cs | 61 - .../src/Generated/Models/InterfaceStatus.cs | 44 - .../src/Generated/Models/InterfaceType.cs | 51 - ...alNetworkBgpConfiguration.Serialization.cs | 230 ++ .../Models/InternalNetworkBgpConfiguration.cs | 36 + .../Generated/Models/InternalNetworkPatch.cs | 40 - ...kStaticRouteConfiguration.Serialization.cs | 114 + ...InternalNetworkStaticRouteConfiguration.cs | 33 + .../InternalNetworksList.Serialization.cs | 6 +- .../Generated/Models/InternalNetworksList.cs | 12 +- .../Models/InternetGatewayRuleAction.cs | 51 + .../InternetGatewayRules.Serialization.cs | 60 + .../Generated/Models/InternetGatewayRules.cs | 44 + ...netGatewayRulesListResult.Serialization.cs | 50 + .../Models/InternetGatewayRulesListResult.cs | 37 + .../Generated/Models/InternetGatewayType.cs | 51 + ...nternetGatewaysListResult.Serialization.cs | 50 + .../Models/InternetGatewaysListResult.cs | 37 + .../src/Generated/Models/IsCurrentVersion.cs | 51 - .../src/Generated/Models/IsManagementType.cs | 51 + .../Generated/Models/IsMonitoringEnabled.cs | 51 + .../src/Generated/Models/IsTestVersion.cs | 51 - .../IsWorkloadManagementNetworkEnabled.cs | 51 + .../IsolationDomainEncapsulationType.cs | 51 + ...IsolationDomainProperties.Serialization.cs | 86 + .../Models/IsolationDomainProperties.cs | 36 + .../Models/L2IsolationDomainPatch.cs | 29 - ...solationDomainsListResult.Serialization.cs | 6 +- .../Models/L2IsolationDomainsListResult.cs | 12 +- .../L3ExportRoutePolicy.Serialization.cs | 63 + .../Generated/Models/L3ExportRoutePolicy.cs | 34 + .../Models/L3IsolationDomainPatch.cs | 35 - ...tchPropertiesConnectedSubnetRoutePolicy.cs | 32 - ...solationDomainsListResult.Serialization.cs | 6 +- .../Models/L3IsolationDomainsListResult.cs | 12 +- .../L3OptionBProperties.Serialization.cs | 99 + .../Generated/Models/L3OptionBProperties.cs | 41 + .../Layer2Configuration.Serialization.cs | 48 +- .../Generated/Models/Layer2Configuration.cs | 18 +- .../Generated/Models/Layer3Configuration.cs | 48 - .../Models/Layer3IPPrefixProperties.cs | 18 +- .../Models/Layer3OptionAProperties.cs | 48 - .../src/Generated/Models/Layer4Protocol.cs | 51 + ...rationPatchableProperties.Serialization.cs | 63 + ...NetworkConfigurationPatchableProperties.cs | 32 + ...kConfigurationProperties.Serialization.cs} | 6 +- ...nagementNetworkConfigurationProperties.cs} | 14 +- ...gurationIPGroupProperties.Serialization.cs | 85 + .../MatchConfigurationIPGroupProperties.cs | 40 + .../Models/NeighborAddress.Serialization.cs | 12 +- .../src/Generated/Models/NeighborAddress.cs | 10 +- .../NeighborGroupDestination.Serialization.cs | 97 + .../Models/NeighborGroupDestination.cs | 38 + .../NeighborGroupsListResult.Serialization.cs | 50 + .../Models/NeighborGroupsListResult.cs | 37 + .../NetworkDeviceAdministrativeState.cs | 57 + .../Models/NetworkDeviceData.Serialization.cs | 62 +- ...tworkDeviceInterfaceData.Serialization.cs} | 49 +- ...workDeviceInterfacePatch.Serialization.cs} | 2 +- ...atch.cs => NetworkDeviceInterfacePatch.cs} | 6 +- ...eviceInterfaceProperties.Serialization.cs} | 6 +- ...cs => NetworkDeviceInterfaceProperties.cs} | 10 +- .../Models/NetworkDeviceInterfaceType.cs | 51 + ...tworkDeviceInterfacesList.Serialization.cs | 50 + ...List.cs => NetworkDeviceInterfacesList.cs} | 14 +- .../Generated/Models/NetworkDevicePatch.cs | 14 +- .../Models/NetworkDeviceRackRoleType.cs | 60 - ...tworkDeviceRebootContent.Serialization.cs} | 11 +- .../Models/NetworkDeviceRebootContent.cs | 21 + .../Models/NetworkDeviceRebootType.cs | 57 + ...DeviceRoleType.cs => NetworkDeviceRole.cs} | 36 +- .../Generated/Models/NetworkDeviceRoleName.cs | 4 +- ...tworkDeviceRoleProperties.Serialization.cs | 74 - .../Models/NetworkDeviceRoleProperties.cs | 36 - .../NetworkDeviceSkuData.Serialization.cs | 27 +- .../Models/NetworkDeviceSkusListResult.cs | 6 +- ...bricAccessControlListData.Serialization.cs | 245 ++ ...ricAccessControlListPatch.Serialization.cs | 70 + .../NetworkFabricAccessControlListPatch.cs | 35 + .../NetworkFabricAdministrativeState.cs | 57 + .../Models/NetworkFabricBooleanValue.cs | 51 + .../Models/NetworkFabricConfigurationState.cs | 75 + .../Models/NetworkFabricConfigurationType.cs | 51 + ...tworkFabricControllerData.Serialization.cs | 75 +- ...NetworkFabricControllerOperationalState.cs | 54 - .../Models/NetworkFabricControllerPatch.cs | 7 +- .../Models/NetworkFabricControllerSKU.cs | 54 + ...FabricControllerServices.Serialization.cs} | 6 +- ....cs => NetworkFabricControllerServices.cs} | 12 +- .../NetworkFabricControllersListResult.cs | 6 +- .../Models/NetworkFabricData.Serialization.cs | 172 +- .../NetworkFabricErrorResult.Serialization.cs | 38 + .../Models/NetworkFabricErrorResult.cs | 30 + ...abricExternalNetworkData.Serialization.cs} | 114 +- ...bricExternalNetworkPatch.Serialization.cs} | 32 +- .../NetworkFabricExternalNetworkPatch.cs | 37 + .../Models/NetworkFabricIPAddressType.cs | 51 + ...workFabricIPCommunityData.Serialization.cs | 179 + ...orkFabricIPCommunityPatch.Serialization.cs | 45 + .../Models/NetworkFabricIPCommunityPatch.cs | 25 + ...cIPExtendedCommunityData.Serialization.cs} | 48 +- ...cIPExtendedCommunityPatch.Serialization.cs | 50 + .../NetworkFabricIPExtendedCommunityPatch.cs | 27 + ...etworkFabricIPPrefixData.Serialization.cs} | 53 +- ...etworkFabricIPPrefixPatch.Serialization.cs | 50 + .../Models/NetworkFabricIPPrefixPatch.cs | 27 + ...abricInternalNetworkData.Serialization.cs} | 168 +- ...bricInternalNetworkPatch.Serialization.cs} | 47 +- .../NetworkFabricInternalNetworkPatch.cs | 50 + ...FabricInternetGatewayData.Serialization.cs | 186 + ...bricInternetGatewayPatch.Serialization.cs} | 10 +- .../NetworkFabricInternetGatewayPatch.cs | 23 + ...cInternetGatewayRuleData.Serialization.cs} | 62 +- ...InternetGatewayRulePatch.Serialization.cs} | 2 +- .../NetworkFabricInternetGatewayRulePatch.cs | 18 + ...ricL2IsolationDomainData.Serialization.cs} | 53 +- ...icL2IsolationDomainPatch.Serialization.cs} | 2 +- .../NetworkFabricL2IsolationDomainPatch.cs | 23 + ...ricL3IsolationDomainData.Serialization.cs} | 70 +- ...icL3IsolationDomainPatch.Serialization.cs} | 12 +- .../NetworkFabricL3IsolationDomainPatch.cs | 29 + .../NetworkFabricLayer3IPPrefixProperties.cs | 40 - ...kFabricNeighborGroupData.Serialization.cs} | 76 +- ...kFabricNeighborGroupPatch.Serialization.cs | 45 + .../Models/NetworkFabricNeighborGroupPatch.cs | 23 + .../Models/NetworkFabricOperationalState.cs | 66 - .../Models/NetworkFabricOptionAProperties.cs | 44 - ...rkFabricOptionBProperties.Serialization.cs | 70 - .../Models/NetworkFabricOptionBProperties.cs | 45 - .../NetworkFabricPatch.Serialization.cs | 30 + .../Generated/Models/NetworkFabricPatch.cs | 33 +- ...minalServerConfiguration.Serialization.cs} | 39 +- ...lePropertiesTerminalServerConfiguration.cs | 43 + ...etworkFabricPortCondition.Serialization.cs | 107 + .../Models/NetworkFabricPortCondition.cs | 47 + .../Generated/Models/NetworkFabricPortType.cs | 51 + .../Models/NetworkFabricProvisioningState.cs | 63 + ...orkFabricRoutePolicyData.Serialization.cs} | 72 +- ...orkFabricRoutePolicyPatch.Serialization.cs | 45 + .../Models/NetworkFabricRoutePolicyPatch.cs | 25 + .../NetworkFabricSkuData.Serialization.cs | 54 +- .../Generated/Models/NetworkFabricSkuType.cs | 51 + .../Models/NetworkFabricSkusListResult.cs | 6 +- ...bricUpdateVersionContent.Serialization.cs} | 9 +- .../NetworkFabricUpdateVersionContent.cs | 21 + .../Models/NetworkFabricValidateAction.cs | 54 + .../Models/NetworkFabricsListResult.cs | 6 +- .../NetworkPacketBrokerData.Serialization.cs | 219 ++ ...NetworkPacketBrokerPatch.Serialization.cs} | 2 +- .../Models/NetworkPacketBrokerPatch.cs | 18 + ...kPacketBrokersListResult.Serialization.cs} | 12 +- .../Models/NetworkPacketBrokersListResult.cs | 37 + .../Models/NetworkRackData.Serialization.cs | 40 +- .../Models/NetworkRackPatch.Serialization.cs | 9 - .../src/Generated/Models/NetworkRackPatch.cs | 34 +- .../Generated/Models/NetworkRackRoleName.cs | 51 - .../NetworkRackSkuData.Serialization.cs | 167 - .../Models/NetworkRackSkusListResult.cs | 37 - .../src/Generated/Models/NetworkRackType.cs | 54 + .../Models/NetworkRacksListResult.cs | 6 +- .../Models/NetworkTapData.Serialization.cs | 205 + ...kTapDestinationProperties.Serialization.cs | 104 + .../Models/NetworkTapDestinationProperties.cs | 46 + .../Models/NetworkTapDestinationType.cs | 51 + .../Models/NetworkTapEncapsulationType.cs | 51 + ...on.cs => NetworkTapPatch.Serialization.cs} | 14 +- .../src/Generated/Models/NetworkTapPatch.cs | 29 + ...arametersDestinationsItem.Serialization.cs | 104 + ...kTapPatchableParametersDestinationsItem.cs | 30 + .../Generated/Models/NetworkTapPollingType.cs | 51 + ...ropertiesDestinationsItem.Serialization.cs | 104 + .../NetworkTapPropertiesDestinationsItem.cs | 30 + .../NetworkTapRuleAction.Serialization.cs | 100 + .../Generated/Models/NetworkTapRuleAction.cs | 46 + .../NetworkTapRuleData.Serialization.cs | 270 ++ ...workTapRuleMatchCondition.Serialization.cs | 119 + .../Models/NetworkTapRuleMatchCondition.cs | 37 + ...TapRuleMatchConfiguration.Serialization.cs | 125 + .../NetworkTapRuleMatchConfiguration.cs | 49 + .../NetworkTapRulePatch.Serialization.cs | 70 + .../Generated/Models/NetworkTapRulePatch.cs | 35 + ...etworkTapRulesListResult.Serialization.cs} | 12 +- .../Models/NetworkTapRulesListResult.cs | 37 + ...=> NetworkTapsListResult.Serialization.cs} | 12 +- .../Generated/Models/NetworkTapsListResult.cs | 37 + ...ToNetworkInterconnectData.Serialization.cs | 128 +- ...tionBLayer3Configuration.Serialization.cs} | 40 +- ...kInterconnectOptionBLayer3Configuration.cs | 30 + ...oNetworkInterconnectPatch.Serialization.cs | 182 + .../NetworkToNetworkInterconnectPatch.cs | 59 + .../NetworkToNetworkInterconnectsList.cs | 2 +- .../src/Generated/Models/NniType.cs | 4 +- ...bStaticRouteConfiguration.Serialization.cs | 99 + .../Models/NpbStaticRouteConfiguration.cs | 41 + .../src/Generated/Models/OperationalStatus.cs | 54 - .../Models/OptionAProperties.Serialization.cs | 93 + .../src/Generated/Models/OptionAProperties.cs | 40 + ...ptionBLayer3Configuration.Serialization.cs | 117 + .../Models/OptionBLayer3Configuration.cs | 40 + .../Models/OptionBProperties.Serialization.cs | 17 +- .../src/Generated/Models/OptionBProperties.cs | 16 +- .../Models/PollingIntervalInSecond.cs | 60 + .../PortGroupProperties.Serialization.cs | 70 + .../Generated/Models/PortGroupProperties.cs | 36 + .../src/Generated/Models/PowerCycleState.cs | 51 - .../src/Generated/Models/PowerEnd.cs | 51 - .../src/Generated/Models/ProvisioningState.cs | 60 - .../RoutePoliciesListResult.Serialization.cs | 6 +- .../Models/RoutePoliciesListResult.cs | 6 +- .../Generated/Models/RoutePolicyActionType.cs | 54 + .../Models/RoutePolicyConditionType.cs | 51 + .../Models/RoutePolicyPatch.Serialization.cs | 32 - .../src/Generated/Models/RoutePolicyPatch.cs | 25 - .../Models/RoutePolicyStatementProperties.cs | 4 +- .../RouteTargetInformation.Serialization.cs | 134 + .../Models/RouteTargetInformation.cs | 47 + .../Generated/Models/SourceDestinationType.cs | 51 + .../src/Generated/Models/State.cs | 51 - ...teCommonPostActionResult.Serialization.cs} | 25 +- .../StateUpdateCommonPostActionResult.cs | 31 + ...StatementActionProperties.Serialization.cs | 4 +- .../Models/StatementActionProperties.cs | 16 +- ...tementConditionProperties.Serialization.cs | 61 +- .../Models/StatementConditionProperties.cs | 12 +- .../Models/StaticRouteConfiguration.cs | 10 +- .../StaticRouteConfigurationExtension.cs | 51 + .../Generated/Models/StaticRouteProperties.cs | 14 +- .../SupportPackageProperties.Serialization.cs | 33 - .../Models/SupportPackageProperties.cs | 29 - .../Models/SupportedConnectorProperties.cs | 4 +- ...upportedVersionProperties.Serialization.cs | 29 +- .../Models/SupportedVersionProperties.cs | 16 +- .../src/Generated/Models/TapRuleActionType.cs | 66 + ...rminalServerConfiguration.Serialization.cs | 74 +- .../Models/TerminalServerConfiguration.cs | 39 +- ...ministrativeStateContent.Serialization.cs} | 7 +- ...cs => UpdateAdministrativeStateContent.cs} | 8 +- ...strativeStateOnResources.Serialization.cs} | 7 +- ...> UpdateAdministrativeStateOnResources.cs} | 10 +- ...dministrativeStateContent.Serialization.cs | 41 + .../UpdateDeviceAdministrativeStateContent.cs | 21 + .../Models/UpdatePowerCycleProperties.cs | 27 - .../Models/UpdateVersionProperties.cs | 29 - ...idateConfigurationContent.Serialization.cs | 26 + .../Models/ValidateConfigurationContent.cs | 21 + ...lidateConfigurationResult.Serialization.cs | 59 + .../Models/ValidateConfigurationResult.cs | 36 + .../VlanGroupProperties.Serialization.cs | 70 + .../Generated/Models/VlanGroupProperties.cs | 36 + .../VlanMatchCondition.Serialization.cs | 109 + .../Generated/Models/VlanMatchCondition.cs | 42 + ...urationOptionAProperties.Serialization.cs} | 98 +- .../VpnConfigurationOptionAProperties.cs | 44 + ...tchableOptionAProperties.Serialization.cs} | 106 +- ...ConfigurationPatchableOptionAProperties.cs | 44 + ...rationPatchableProperties.Serialization.cs | 93 + .../VpnConfigurationPatchableProperties.cs | 42 + ...pnConfigurationProperties.Serialization.cs | 31 +- .../Models/VpnConfigurationProperties.cs | 24 +- .../Models/WorkloadServices.Serialization.cs | 58 - .../src/Generated/Models/WorkloadServices.cs | 37 - .../src/Generated/NetworkDeviceCollection.cs | 4 +- .../src/Generated/NetworkDeviceData.cs | 45 +- ...cs => NetworkDeviceInterfaceCollection.cs} | 106 +- .../Generated/NetworkDeviceInterfaceData.cs | 68 + ...e.cs => NetworkDeviceInterfaceResource.cs} | 186 +- .../src/Generated/NetworkDeviceResource.cs | 304 +- .../Generated/NetworkDeviceSkuCollection.cs | 12 +- .../src/Generated/NetworkDeviceSkuData.cs | 20 +- .../src/Generated/NetworkDeviceSkuResource.cs | 4 +- ...tworkFabricAccessControlListCollection.cs} | 90 +- .../NetworkFabricAccessControlListData.cs | 78 + .../NetworkFabricAccessControlListResource.cs | 822 ++++ .../Generated/NetworkFabricControllerData.cs | 37 +- .../NetworkFabricControllerResource.cs | 136 - .../src/Generated/NetworkFabricData.cs | 105 +- ...NetworkFabricExternalNetworkCollection.cs} | 110 +- .../NetworkFabricExternalNetworkData.cs | 85 + .../NetworkFabricExternalNetworkResource.cs | 450 +++ ... => NetworkFabricIPCommunityCollection.cs} | 94 +- .../Generated/NetworkFabricIPCommunityData.cs | 60 + ...cs => NetworkFabricIPCommunityResource.cs} | 142 +- ...orkFabricIPExtendedCommunityCollection.cs} | 90 +- .../NetworkFabricIPExtendedCommunityData.cs | 66 + ...tworkFabricIPExtendedCommunityResource.cs} | 142 +- ....cs => NetworkFabricIPPrefixCollection.cs} | 90 +- .../Generated/NetworkFabricIPPrefixData.cs | 60 + ...ce.cs => NetworkFabricIPPrefixResource.cs} | 142 +- ...NetworkFabricInternalNetworkCollection.cs} | 110 +- .../NetworkFabricInternalNetworkData.cs | 112 + .../NetworkFabricInternalNetworkResource.cs | 526 +++ .../NetworkFabricInternetGatewayCollection.cs | 259 ++ .../NetworkFabricInternetGatewayData.cs | 76 + ...> NetworkFabricInternetGatewayResource.cs} | 286 +- ...workFabricInternetGatewayRuleCollection.cs | 341 ++ .../NetworkFabricInternetGatewayRuleData.cs | 62 + ...etworkFabricInternetGatewayRuleResource.cs | 610 +++ ...tworkFabricL2IsolationDomainCollection.cs} | 90 +- .../NetworkFabricL2IsolationDomainData.cs | 75 + ...NetworkFabricL2IsolationDomainResource.cs} | 318 +- ...tworkFabricL3IsolationDomainCollection.cs} | 90 +- .../NetworkFabricL3IsolationDomainData.cs | 81 + ...NetworkFabricL3IsolationDomainResource.cs} | 370 +- .../NetworkFabricNeighborGroupCollection.cs | 341 ++ .../NetworkFabricNeighborGroupData.cs | 61 + .../NetworkFabricNeighborGroupResource.cs | 610 +++ .../src/Generated/NetworkFabricResource.cs | 536 ++- ... => NetworkFabricRoutePolicyCollection.cs} | 90 +- .../Generated/NetworkFabricRoutePolicyData.cs | 74 + .../NetworkFabricRoutePolicyResource.cs | 822 ++++ .../Generated/NetworkFabricSkuCollection.cs | 16 +- .../src/Generated/NetworkFabricSkuData.cs | 47 +- .../src/Generated/NetworkFabricSkuResource.cs | 4 +- .../src/Generated/NetworkInterfaceData.cs | 67 - .../NetworkPacketBrokerCollection.cs | 341 ++ .../src/Generated/NetworkPacketBrokerData.cs | 73 + ...urce.cs => NetworkPacketBrokerResource.cs} | 212 +- .../src/Generated/NetworkRackData.cs | 39 +- .../src/Generated/NetworkRackSkuCollection.cs | 259 -- .../src/Generated/NetworkRackSkuData.cs | 63 - .../src/Generated/NetworkRackSkuResource.cs | 154 - .../src/Generated/NetworkTapCollection.cs | 341 ++ .../src/Generated/NetworkTapData.cs | 81 + .../src/Generated/NetworkTapResource.cs | 754 ++++ .../src/Generated/NetworkTapRuleCollection.cs | 341 ++ .../src/Generated/NetworkTapRuleData.cs | 86 + .../src/Generated/NetworkTapRuleResource.cs | 822 ++++ .../NetworkToNetworkInterconnectCollection.cs | 24 +- .../NetworkToNetworkInterconnectData.cs | 64 +- .../NetworkToNetworkInterconnectResource.cs | 185 +- .../AccessControlListsRestOperations.cs | 367 +- .../ExternalNetworksRestOperations.cs | 455 +-- .../InternalNetworksRestOperations.cs | 497 +-- .../InternetGatewayRulesRestOperations.cs | 628 ++++ .../InternetGatewaysRestOperations.cs | 480 +++ .../IpCommunitiesRestOperations.cs | 80 +- .../IpExtendedCommunitiesRestOperations.cs | 64 +- .../IpPrefixesRestOperations.cs | 64 +- .../L2IsolationDomainsRestOperations.cs | 243 +- .../L3IsolationDomainsRestOperations.cs | 255 +- .../NeighborGroupsRestOperations.cs | 628 ++++ .../NetworkDeviceSkusRestOperations.cs | 22 +- .../NetworkDevicesRestOperations.cs | 324 +- .../NetworkFabricControllersRestOperations.cs | 174 +- .../NetworkFabricSkusRestOperations.cs | 30 +- .../NetworkFabricsRestOperations.cs | 585 ++- .../NetworkInterfacesRestOperations.cs | 249 +- .../NetworkPacketBrokersRestOperations.cs | 628 ++++ .../NetworkRackSkusRestOperations.cs | 251 -- .../NetworkRacksRestOperations.cs | 34 +- .../NetworkTapRulesRestOperations.cs | 849 +++++ .../NetworkTapsRestOperations.cs | 778 ++++ ...orkToNetworkInterconnectsRestOperations.cs | 330 +- .../RoutePoliciesRestOperations.cs | 285 +- .../src/Generated/RoutePolicyData.cs | 58 - .../src/autorest.md | 104 +- ...dNetworkFabricManagementTestEnvironment.cs | 136 +- .../tests/Scenario/ExternalNetworkTests.cs | 81 +- .../tests/Scenario/InternalNetworkTests.cs | 105 +- .../tests/Scenario/InternetGatewayTests.cs | 39 + .../tests/Scenario/IpCommunityTests.cs | 67 +- .../Scenario/IpExtendedCommunityTests.cs | 50 +- .../tests/Scenario/IpPrefixTests.cs | 62 +- .../tests/Scenario/L2IsolationDomainTests.cs | 64 +- .../tests/Scenario/L3IsolationDomainTests.cs | 83 +- .../tests/Scenario/NetworkDeviceTests.cs | 23 +- .../Scenario/NetworkFabricControllerTests.cs | 70 +- .../tests/Scenario/NetworkFabricTests.cs | 180 +- .../tests/Scenario/NetworkInterfaceTests.cs | 46 +- .../tests/Scenario/NetworkRackTests.cs | 21 +- .../NetworkToNetworkInterconnectTests.cs | 61 +- .../tests/Scenario/RoutePolicyTests.cs | 110 +- 573 files changed, 41132 insertions(+), 17201 deletions(-) delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkCollection.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkCollection.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_NetworkInterfaceCollection.cs => Sample_NetworkDeviceInterfaceCollection.cs} (70%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_AccessControlListCollection.cs => Sample_NetworkFabricAccessControlListCollection.cs} (58%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPCommunityCollection.cs => Sample_NetworkFabricIPCommunityCollection.cs} (72%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPCommunityResource.cs => Sample_NetworkFabricIPCommunityResource.cs} (59%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPExtendedCommunityCollection.cs => Sample_NetworkFabricIPExtendedCommunityCollection.cs} (71%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPExtendedCommunityResource.cs => Sample_NetworkFabricIPExtendedCommunityResource.cs} (58%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPPrefixCollection.cs => Sample_NetworkFabricIPPrefixCollection.cs} (74%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_IPPrefixResource.cs => Sample_NetworkFabricIPPrefixResource.cs} (61%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_L2IsolationDomainCollection.cs => Sample_NetworkFabricL2IsolationDomainCollection.cs} (71%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_L3IsolationDomainCollection.cs => Sample_NetworkFabricL3IsolationDomainCollection.cs} (68%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/{Sample_RoutePolicyCollection.cs => Sample_NetworkFabricRoutePolicyCollection.cs} (62%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuCollection.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/DeviceUpdateCommonPostActionResultOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ExternalNetworkOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/GetDeviceStatusPropertiesOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IDictionaryOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPCommunityOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPPrefixOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InterfaceStatusOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternalNetworkOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L2IsolationDomainOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L3IsolationDomainOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkDeviceInterfaceOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricAccessControlListOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricExternalNetworkOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPCommunityOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPExtendedCommunityOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPPrefixOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternalNetworkOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayRuleOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL2IsolationDomainOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL3IsolationDomainOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricNeighborGroupOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricRoutePolicyOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkInterfaceOperationSource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/{IPExtendedCommunityOperationSource.cs => NetworkPacketBrokerOperationSource.cs} (50%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkTapRuleOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/RoutePolicyOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/StateUpdateCommonPostActionResultOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/SupportPackagePropertiesOperationSource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResultOperationSource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ARPProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListAction.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListConditionProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListMatchConfiguration.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPortCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.Serialization.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AccessControlListsListResult.cs => AccessControlListsResult.cs} (54%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AclActionType.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamily.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AddressFamilyType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AdministrativeState.cs => AdministrativeEnableState.cs} (55%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AnnotationResource.Serialization.cs => AnnotationResourceProperties.Serialization.cs} (80%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AnnotationResource.cs => AnnotationResourceProperties.cs} (76%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BfdAdministrativeState.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BooleanEnumProperty.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonMatchConditions.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConditionActionType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.Serialization.cs => ConnectedSubnetRoutePolicy.Serialization.cs} (55%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ConnectedSubnetRoutePolicy.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceLimits.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnabledDisabledState.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicy.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExportRoutePolicyInformation.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{ExternalNetworkPropertiesOptionAProperties.Serialization.cs => ExternalNetworkOptionAProperties.Serialization.cs} (70%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/GetDeviceStatusProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityRule.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityRule.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchConditionPrefixType.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPPrefixPropertiesIPPrefixRulesItem.Serialization.cs => IPPrefixRule.Serialization.cs} (74%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPPrefixPropertiesIPPrefixRulesItem.cs => IPPrefixRule.cs} (75%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRuleCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicy.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ImportRoutePolicyInformation.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceStatus.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleAction.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsCurrentVersion.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsManagementType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsMonitoringEnabled.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsTestVersion.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsWorkloadManagementNetworkEnabled.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainEncapsulationType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3ExportRoutePolicy.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3OptionBProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer4Protocol.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ManagementNetworkConfigurationPatchableProperties.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{ManagementNetworkConfiguration.Serialization.cs => ManagementNetworkConfigurationProperties.Serialization.cs} (82%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{ManagementNetworkConfiguration.cs => ManagementNetworkConfigurationProperties.cs} (65%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceAdministrativeState.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkInterfaceData.Serialization.cs => NetworkDeviceInterfaceData.Serialization.cs} (77%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkInterfacePatch.Serialization.cs => NetworkDeviceInterfacePatch.Serialization.cs} (90%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkInterfacePatch.cs => NetworkDeviceInterfacePatch.cs} (69%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{DeviceInterfaceProperties.Serialization.cs => NetworkDeviceInterfaceProperties.Serialization.cs} (88%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{DeviceInterfaceProperties.cs => NetworkDeviceInterfaceProperties.cs} (73%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.Serialization.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkInterfacesList.cs => NetworkDeviceInterfacesList.cs} (60%) delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRackRoleType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{UpdatePowerCycleProperties.Serialization.cs => NetworkDeviceRebootContent.Serialization.cs} (60%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkDeviceRoleType.cs => NetworkDeviceRole.cs} (51%) delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListData.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAdministrativeState.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricBooleanValue.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationState.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationType.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerOperationalState.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerSKU.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{InfrastructureServices.Serialization.cs => NetworkFabricControllerServices.Serialization.cs} (85%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{InfrastructureServices.cs => NetworkFabricControllerServices.cs} (72%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{ExternalNetworkData.Serialization.cs => NetworkFabricExternalNetworkData.Serialization.cs} (60%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{ExternalNetworkPatch.Serialization.cs => NetworkFabricExternalNetworkPatch.Serialization.cs} (78%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPAddressType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityData.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AccessControlListData.Serialization.cs => NetworkFabricIPExtendedCommunityData.Serialization.cs} (69%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPPrefixData.Serialization.cs => NetworkFabricIPPrefixData.Serialization.cs} (66%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{InternalNetworkData.Serialization.cs => NetworkFabricInternalNetworkData.Serialization.cs} (63%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{InternalNetworkPatch.Serialization.cs => NetworkFabricInternalNetworkPatch.Serialization.cs} (69%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayData.Serialization.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPPrefixPatch.Serialization.cs => NetworkFabricInternetGatewayPatch.Serialization.cs} (65%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPExtendedCommunityData.Serialization.cs => NetworkFabricInternetGatewayRuleData.Serialization.cs} (73%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPCommunityPatch.Serialization.cs => NetworkFabricInternetGatewayRulePatch.Serialization.cs} (90%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{L2IsolationDomainData.Serialization.cs => NetworkFabricL2IsolationDomainData.Serialization.cs} (75%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{L2IsolationDomainPatch.Serialization.cs => NetworkFabricL2IsolationDomainPatch.Serialization.cs} (93%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{L3IsolationDomainData.Serialization.cs => NetworkFabricL3IsolationDomainData.Serialization.cs} (71%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{L3IsolationDomainPatch.Serialization.cs => NetworkFabricL3IsolationDomainPatch.Serialization.cs} (88%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainPatch.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricLayer3IPPrefixProperties.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPCommunityData.Serialization.cs => NetworkFabricNeighborGroupData.Serialization.cs} (70%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOperationalState.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionBProperties.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkFabricLayer3IPPrefixProperties.Serialization.cs => NetworkFabricPatchablePropertiesTerminalServerConfiguration.Serialization.cs} (58%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPatchablePropertiesTerminalServerConfiguration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricProvisioningState.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{RoutePolicyData.Serialization.cs => NetworkFabricRoutePolicyData.Serialization.cs} (59%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{UpdateVersionProperties.Serialization.cs => NetworkFabricUpdateVersionContent.Serialization.cs} (61%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricValidateAction.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerData.Serialization.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{IPExtendedCommunityPatch.Serialization.cs => NetworkPacketBrokerPatch.Serialization.cs} (92%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AccessControlListsListResult.Serialization.cs => NetworkPacketBrokersListResult.Serialization.cs} (69%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackRoleName.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkusListResult.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapData.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapEncapsulationType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{AccessControlListPatch.Serialization.cs => NetworkTapPatch.Serialization.cs} (76%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatchableParametersDestinationsItem.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPollingType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleAction.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleData.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchCondition.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleMatchConfiguration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulePatch.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkRackSkusListResult.Serialization.cs => NetworkTapRulesListResult.Serialization.cs} (72%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRulesListResult.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkInterfacesList.Serialization.cs => NetworkTapsListResult.Serialization.cs} (72%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{Layer3Configuration.Serialization.cs => NetworkToNetworkInterconnectOptionBLayer3Configuration.Serialization.cs} (68%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NpbStaticRouteConfiguration.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OperationalStatus.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionAProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/OptionBLayer3Configuration.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PollingIntervalInSecond.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PortGroupProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerCycleState.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/PowerEnd.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyActionType.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyConditionType.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RouteTargetInformation.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SourceDestinationType.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/State.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{FabricBfdConfiguration.Serialization.cs => StateUpdateCommonPostActionResult.Serialization.cs} (54%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfigurationExtension.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TapRuleActionType.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{UpdateAdministrativeState.Serialization.cs => UpdateAdministrativeStateContent.Serialization.cs} (79%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{UpdateAdministrativeState.cs => UpdateAdministrativeStateContent.cs} (64%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{EnableDisableOnResources.Serialization.cs => UpdateAdministrativeStateOnResources.Serialization.cs} (75%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{EnableDisableOnResources.cs => UpdateAdministrativeStateOnResources.cs} (55%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanGroupProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VlanMatchCondition.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{NetworkFabricOptionAProperties.Serialization.cs => VpnConfigurationOptionAProperties.Serialization.cs} (83%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/{Layer3OptionAProperties.Serialization.cs => VpnConfigurationPatchableOptionAProperties.Serialization.cs} (82%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.Serialization.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.Serialization.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{NetworkInterfaceCollection.cs => NetworkDeviceInterfaceCollection.cs} (63%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{NetworkInterfaceResource.cs => NetworkDeviceInterfaceResource.cs} (57%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{AccessControlListCollection.cs => NetworkFabricAccessControlListCollection.cs} (62%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{ExternalNetworkCollection.cs => NetworkFabricExternalNetworkCollection.cs} (61%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPCommunityCollection.cs => NetworkFabricIPCommunityCollection.cs} (63%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPCommunityResource.cs => NetworkFabricIPCommunityResource.cs} (71%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPExtendedCommunityCollection.cs => NetworkFabricIPExtendedCommunityCollection.cs} (62%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPExtendedCommunityResource.cs => NetworkFabricIPExtendedCommunityResource.cs} (69%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPPrefixCollection.cs => NetworkFabricIPPrefixCollection.cs} (65%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{IPPrefixResource.cs => NetworkFabricIPPrefixResource.cs} (72%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{InternalNetworkCollection.cs => NetworkFabricInternalNetworkCollection.cs} (61%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{AccessControlListResource.cs => NetworkFabricInternetGatewayResource.cs} (58%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{L2IsolationDomainCollection.cs => NetworkFabricL2IsolationDomainCollection.cs} (63%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{L2IsolationDomainResource.cs => NetworkFabricL2IsolationDomainResource.cs} (62%) rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{L3IsolationDomainCollection.cs => NetworkFabricL3IsolationDomainCollection.cs} (63%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{L3IsolationDomainResource.cs => NetworkFabricL3IsolationDomainResource.cs} (62%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{RoutePolicyCollection.cs => NetworkFabricRoutePolicyCollection.cs} (64%) create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerData.cs rename sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/{RoutePolicyResource.cs => NetworkPacketBrokerResource.cs} (66%) delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuCollection.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuData.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackSkuResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleCollection.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewayRulesRestOperations.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewaysRestOperations.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NeighborGroupsRestOperations.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkPacketBrokersRestOperations.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkRackSkusRestOperations.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapRulesRestOperations.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkTapsRestOperations.cs delete mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs create mode 100644 sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternetGatewayTests.cs diff --git a/.vscode/cspell.json b/.vscode/cspell.json index b0d889e9c3f84..0b38302d8cff1 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -673,7 +673,8 @@ "words": [ "evpn", "mbps", - "gshut" + "gshut", + "dscp" ] }, { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/CHANGELOG.md b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/CHANGELOG.md index a6260351d86be..f720bd01e75a4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/CHANGELOG.md +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/CHANGELOG.md @@ -1,14 +1,30 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0 (2023-07-28) + +This release is the first stable release of the Managed Network Fabric library. ### Features Added -### Breaking Changes +- Upgraded API version to 2023-06-15, which supports the following new resources: + - InternetGateyways + - InternetGatewayRules + - NetworkTap + - NetworkTapRules + - NetworkPacketBroker + - NeighborGroup -### Bugs Fixed +### Breaking Changes -### Other Changes +- Supported new parameters and removed deprecated parameters in all existing resources. +- Supported new post actions in the existing resources. +- Removed some post actions that are not needed. +- Prepended `NetworkFabric` prefix to all single / simple model names. +- Corrected the format of all `ResourceIdentifier` type properties / parameters. +- Corrected the name of interval / duration properties / parameters that end with units. +- Optimized the name of some models and functions. +- Corrected all acronyms that not follow [.Net Naming Guidelines](https://docs.microsoft.com/dotnet/standard/design-guidelines/naming-guidelines). +- Corrected enumeration name by following [Naming Enumerations Rule](https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces#naming-enumerations). ## 1.0.0-beta.1 (2023-06-28) diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/README.md b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/README.md index 97b4da7dc0874..9cf5126324921 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/README.md +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/README.md @@ -17,7 +17,7 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Microsoft Azure Azure.ResourceManager.ManagedNetworkFabric management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.ManagedNetworkFabric --prerelease +dotnet add package Azure.ResourceManager.ManagedNetworkFabric ``` ### Prerequisites 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..13bd0f74a0c1a 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 @@ -1,450 +1,10 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class AccessControlListCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected AccessControlListCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accessControlListName, Azure.ResourceManager.ManagedNetworkFabric.AccessControlListData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accessControlListName, Azure.ResourceManager.ManagedNetworkFabric.AccessControlListData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string accessControlListName, 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 accessControlListName, 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 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 string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList Conditions { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - } - public partial class AccessControlListResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected AccessControlListResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.AccessControlListData 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 accessControlListName) { 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.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 partial class ExternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ExternalNetworkCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string externalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string externalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string externalNetworkName, 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 externalNetworkName, 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 ExternalNetworkData : Azure.ResourceManager.Models.ResourceData - { - public ExternalNetworkData(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? 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 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.PeeringOption PeeringOption { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - } - public partial class ExternalNetworkResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - 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 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 partial class InternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected InternalNetworkCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string internalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string internalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string internalNetworkName, 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 internalNetworkName, 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 InternalNetworkData : Azure.ResourceManager.Models.ResourceData - { - public InternalNetworkData(int vlanId) { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? 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 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 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 int VlanId { get { throw null; } set { } } - } - public partial class InternalNetworkResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - 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 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 partial class IPCommunityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected IPCommunityCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipCommunityName, Azure.ResourceManager.ManagedNetworkFabric.IPCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipCommunityName, Azure.ResourceManager.ManagedNetworkFabric.IPCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string ipCommunityName, 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 ipCommunityName, 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 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 string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IList CommunityMembers { 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 - { - public static readonly Azure.Core.ResourceType ResourceType; - protected IPCommunityResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.IPCommunityData 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 ipCommunityName) { 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.IPCommunityPatch 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.IPCommunityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class IPExtendedCommunityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected IPExtendedCommunityCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipExtendedCommunityName, Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipExtendedCommunityName, Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string ipExtendedCommunityName, 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 ipExtendedCommunityName, 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 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 string Annotation { get { throw null; } set { } } - 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 - { - public static readonly Azure.Core.ResourceType ResourceType; - protected IPExtendedCommunityResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityData 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 ipExtendedCommunityName) { 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.IPExtendedCommunityPatch 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.IPExtendedCommunityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class IPPrefixCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected IPPrefixCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipPrefixName, Azure.ResourceManager.ManagedNetworkFabric.IPPrefixData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipPrefixName, Azure.ResourceManager.ManagedNetworkFabric.IPPrefixData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string ipPrefixName, 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 ipPrefixName, 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 IPPrefixData : Azure.ResourceManager.Models.TrackedResourceData - { - public IPPrefixData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable ipPrefixRules) : base (default(Azure.Core.AzureLocation)) { } - public string Annotation { get { throw null; } set { } } - 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 - { - public static readonly Azure.Core.ResourceType ResourceType; - protected IPPrefixResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.IPPrefixData 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 ipPrefixName) { 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.IPPrefixPatch 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.IPPrefixPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class L2IsolationDomainCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected L2IsolationDomainCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string l2IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string l2IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string l2IsolationDomainName, 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 l2IsolationDomainName, 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 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 string Annotation { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList DisabledOnResources { get { throw null; } } - public int? Mtu { get { throw null; } set { } } - public string NetworkFabricId { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public int? VlanId { get { throw null; } set { } } - } - public partial class L2IsolationDomainResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected L2IsolationDomainResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainData 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 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 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 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 partial class L3IsolationDomainCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected L3IsolationDomainCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string l3IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string l3IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string l3IsolationDomainName, 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 l3IsolationDomainName, 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 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 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.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 { } } - } - public partial class L3IsolationDomainResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected L3IsolationDomainResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainData 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 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 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; } - 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 GetExternalNetwork(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetExternalNetworkAsync(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ManagedNetworkFabric.ExternalNetworkCollection GetExternalNetworks() { throw null; } - public virtual Azure.Response GetInternalNetwork(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetInternalNetworkAsync(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ManagedNetworkFabric.InternalNetworkCollection GetInternalNetworks() { 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.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 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 static partial class ManagedNetworkFabricExtensions { - public static Azure.Response GetAccessControlList(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetAccessControlListAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.AccessControlListResource GetAccessControlListResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.AccessControlListCollection GetAccessControlLists(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetAccessControlLists(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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.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; } - public static Azure.Response GetIPCommunity(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetIPCommunityAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPCommunityResource GetIPCommunityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityCollection GetIPExtendedCommunities(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetIPExtendedCommunities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetIPExtendedCommunitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetIPExtendedCommunity(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetIPExtendedCommunityAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPExtendedCommunityResource GetIPExtendedCommunityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetIPPrefix(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetIPPrefixAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPPrefixCollection GetIPPrefixes(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetIPPrefixes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetIPPrefixesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.IPPrefixResource GetIPPrefixResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetL2IsolationDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetL2IsolationDomainAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainResource GetL2IsolationDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.L2IsolationDomainCollection GetL2IsolationDomains(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetL2IsolationDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetL2IsolationDomainsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetL3IsolationDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetL3IsolationDomainAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.L3IsolationDomainResource GetL3IsolationDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - 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 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.NetworkDeviceInterfaceResource GetNetworkDeviceInterfaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceResource GetNetworkDeviceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceCollection GetNetworkDevices(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkDevices(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -454,6 +14,12 @@ public static partial class ManagedNetworkFabricExtensions public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceSkuResource GetNetworkDeviceSkuResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceSkuCollection GetNetworkDeviceSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } public static Azure.Response GetNetworkFabric(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricAccessControlList(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricAccessControlListAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListResource GetNetworkFabricAccessControlListResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListCollection GetNetworkFabricAccessControlLists(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricAccessControlLists(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricAccessControlListsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkFabricAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkFabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetNetworkFabricController(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkFabricControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetworkFabricControllerAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string networkFabricControllerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -461,7 +27,63 @@ public static partial class ManagedNetworkFabricExtensions public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricControllerCollection GetNetworkFabricControllers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkFabricControllers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNetworkFabricControllersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkResource GetNetworkFabricExternalNetworkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkResource GetNetworkFabricInternalNetworkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkFabricInternetGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricInternetGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayResource GetNetworkFabricInternetGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkFabricInternetGatewayRule(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricInternetGatewayRuleAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayRuleResource GetNetworkFabricInternetGatewayRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayRuleCollection GetNetworkFabricInternetGatewayRules(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricInternetGatewayRules(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricInternetGatewayRulesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayCollection GetNetworkFabricInternetGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricInternetGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricInternetGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityCollection GetNetworkFabricIPCommunities(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricIPCommunities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricIPCommunitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricIPCommunity(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricIPCommunityAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityResource GetNetworkFabricIPCommunityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityCollection GetNetworkFabricIPExtendedCommunities(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricIPExtendedCommunities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricIPExtendedCommunitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricIPExtendedCommunity(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricIPExtendedCommunityAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityResource GetNetworkFabricIPExtendedCommunityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkFabricIPPrefix(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricIPPrefixAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixCollection GetNetworkFabricIPPrefixes(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricIPPrefixes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricIPPrefixesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixResource GetNetworkFabricIPPrefixResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetNetworkFabricL2IsolationDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricL2IsolationDomainAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainResource GetNetworkFabricL2IsolationDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainCollection GetNetworkFabricL2IsolationDomains(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricL2IsolationDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricL2IsolationDomainsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricL3IsolationDomain(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricL3IsolationDomainAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainResource GetNetworkFabricL3IsolationDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainCollection GetNetworkFabricL3IsolationDomains(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricL3IsolationDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricL3IsolationDomainsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricNeighborGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricNeighborGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string neighborGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricNeighborGroupResource GetNetworkFabricNeighborGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricNeighborGroupCollection GetNetworkFabricNeighborGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricNeighborGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricNeighborGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricResource GetNetworkFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyCollection GetNetworkFabricRoutePolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetNetworkFabricRoutePolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetNetworkFabricRoutePoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetNetworkFabricRoutePolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetNetworkFabricRoutePolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyResource GetNetworkFabricRoutePolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricCollection GetNetworkFabrics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNetworkFabrics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNetworkFabricsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -469,24 +91,31 @@ public static partial class ManagedNetworkFabricExtensions public static System.Threading.Tasks.Task> GetNetworkFabricSkuAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string networkFabricSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } 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; } - public static Azure.AsyncPageable GetRoutePoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetRoutePolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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 NetworkDeviceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -506,15 +135,62 @@ 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.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } public string HostName { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleType? NetworkDeviceRole { get { throw null; } set { } } + public System.Net.IPAddress 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; } } + public Azure.Core.ResourceIdentifier NetworkRackId { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } public string SerialNumber { get { throw null; } set { } } public string Version { get { throw null; } } } + public partial class NetworkDeviceInterfaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkDeviceInterfaceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkInterfaceName, Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceInterfaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkInterfaceName, Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceInterfaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkInterfaceName, 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 networkInterfaceName, 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 NetworkDeviceInterfaceData : Azure.ResourceManager.Models.ResourceData + { + public NetworkDeviceInterfaceData() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public string ConnectedTo { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType? InterfaceType { get { throw null; } } + public System.Net.IPAddress IPv4Address { get { throw null; } } + public string IPv6Address { get { throw null; } } + public string PhysicalIdentifier { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkDeviceInterfaceResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkDeviceInterfaceResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceInterfaceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName) { 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.NetworkDeviceInterfacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NetworkDeviceResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; @@ -526,29 +202,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.Response GetNetworkDeviceInterface(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetworkDeviceInterfaceAsync(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceInterfaceCollection GetNetworkDeviceInterfaces() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reboot(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RebootAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootContent content, 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.UpdateDeviceAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateDeviceAdministrativeStateContent content, 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.NetworkFabricUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricUpdateVersionContent content, 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 { @@ -566,11 +238,10 @@ protected NetworkDeviceSkuCollection() { } public partial class NetworkDeviceSkuData : Azure.ResourceManager.Models.ResourceData { 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 System.Collections.Generic.IList Interfaces { get { throw null; } } public string Manufacturer { get { throw null; } set { } } public string Model { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList SupportedRoleTypes { get { throw null; } } public System.Collections.Generic.IList SupportedVersions { get { throw null; } } } @@ -584,6 +255,60 @@ protected NetworkDeviceSkuResource() { } 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 partial class NetworkFabricAccessControlListCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricAccessControlListCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accessControlListName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accessControlListName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string accessControlListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string accessControlListName, 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 accessControlListName, 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 NetworkFabricAccessControlListData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricAccessControlListData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public System.Uri AclsUri { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType? 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 Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkFabricAccessControlListResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricAccessControlListResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListData 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 accessControlListName) { 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.NetworkFabricAccessControlListPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAccessControlListPatch 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 NetworkFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NetworkFabricCollection() { } @@ -619,16 +344,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.NetworkFabricControllerServices InfrastructureServices { get { throw null; } } public string IPv4AddressSpace { get { throw null; } set { } } public string IPv6AddressSpace { get { throw null; } set { } } + public bool? IsWorkloadManagementNetwork { get { throw null; } } + 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 Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkFabricIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU? NfcSku { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? 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.NetworkFabricControllerServices WorkloadServices { get { throw null; } } } public partial class NetworkFabricControllerResource : Azure.ResourceManager.ArmResource { @@ -641,10 +368,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,205 +379,826 @@ 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.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } public string Annotation { get { throw null; } set { } } - public int? FabricASN { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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 Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? 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 + public partial class NetworkFabricExternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricExternalNetworkCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string externalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string externalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string externalNetworkName, 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 externalNetworkName, 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 NetworkFabricExternalNetworkData : Azure.ResourceManager.Models.ResourceData + { + public NetworkFabricExternalNetworkData(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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 Azure.Core.ResourceIdentifier NetworkToNetworkInterconnectId { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkOptionAProperties 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 Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkFabricExternalNetworkResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected NetworkFabricResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricData Data { get { throw null; } } + protected NetworkFabricExternalNetworkResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkData 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 networkFabricName) { 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.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.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 partial class NetworkFabricSkuCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected NetworkFabricSkuCollection() { } - public virtual Azure.Response Exists(string networkFabricSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string networkFabricSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string networkFabricSkuName, 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 networkFabricSkuName, 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 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.NetworkFabricExternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricExternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateStaticRouteBfdAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricInternalNetworkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricInternalNetworkCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string internalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string internalNetworkName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string internalNetworkName, 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 internalNetworkName, 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 NetworkFabricSkuData : Azure.ResourceManager.Models.ResourceData + public partial class NetworkFabricInternalNetworkData : Azure.ResourceManager.Models.ResourceData { - public NetworkFabricSkuData() { } - public System.Uri DetailsUri { get { throw null; } } - public int? MaxComputeRacks { get { throw null; } set { } } - public string MaxSupportedVer { get { throw null; } } - public string MinSupportedVer { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public string TypePropertiesType { get { throw null; } } + public NetworkFabricInternalNetworkData(int vlanId) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkBgpConfiguration BgpConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList ConnectedIPv4Subnets { get { throw null; } } + public System.Collections.Generic.IList ConnectedIPv6Subnets { get { throw null; } } + 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.StaticRouteConfigurationExtension? 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.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkStaticRouteConfiguration StaticRouteConfiguration { get { throw null; } set { } } + public int VlanId { get { throw null; } set { } } } - public partial class NetworkFabricSkuResource : Azure.ResourceManager.ArmResource + public partial class NetworkFabricInternalNetworkResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected NetworkFabricSkuResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuData Data { get { throw null; } } + protected NetworkFabricInternalNetworkResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string networkFabricSkuName) { 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 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.NetworkFabricInternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricInternalNetworkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateBgpAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateBgpAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateStaticRouteBfdAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricInternetGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricInternetGatewayCollection() { } + 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 NetworkInterfaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class NetworkFabricInternetGatewayData : Azure.ResourceManager.Models.TrackedResourceData { - protected NetworkInterfaceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkInterfaceName, Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkInterfaceName, Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string networkInterfaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string networkInterfaceName, 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 networkInterfaceName, 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 NetworkFabricInternetGatewayData(Azure.Core.AzureLocation location, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType 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 System.Net.IPAddress IPv4Address { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkFabricControllerId { get { throw null; } set { } } + public int? Port { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType TypePropertiesType { get { throw null; } set { } } + } + public partial class NetworkFabricInternetGatewayResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricInternetGatewayResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayData 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.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.NetworkFabricInternetGatewayPatch 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.NetworkFabricInternetGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricInternetGatewayRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricInternetGatewayRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string internetGatewayRuleName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayRuleData 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.NetworkFabricInternetGatewayRuleData 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 NetworkInterfaceData : Azure.ResourceManager.Models.ResourceData + public partial class NetworkFabricInternetGatewayRuleData : Azure.ResourceManager.Models.TrackedResourceData { - public NetworkInterfaceData() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } + public NetworkFabricInternetGatewayRuleData(Azure.Core.AzureLocation location, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRules ruleProperties) : base (default(Azure.Core.AzureLocation)) { } public string Annotation { get { throw null; } set { } } - public string ConnectedTo { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType? InterfaceType { get { throw null; } } - public string IPv4Address { get { throw null; } } - public string IPv6Address { get { throw null; } } - public string PhysicalIdentifier { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList InternetGatewayIds { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRules RuleProperties { get { throw null; } set { } } } - public partial class NetworkInterfaceResource : Azure.ResourceManager.ArmResource + public partial class NetworkFabricInternetGatewayRuleResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected NetworkInterfaceResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkInterfaceData Data { get { throw null; } } + protected NetworkFabricInternetGatewayRuleResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayRuleData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName) { 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.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 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 NetworkRackCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected NetworkRackCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkRackName, Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkRackName, Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string networkRackName, 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 networkRackName, 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 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.NetworkFabricInternetGatewayRulePatch 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.NetworkFabricInternetGatewayRulePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricIPCommunityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricIPCommunityCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipCommunityName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipCommunityName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ipCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ipCommunityName, 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 ipCommunityName, 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 NetworkRackData : Azure.ResourceManager.Models.TrackedResourceData + public partial class NetworkFabricIPCommunityData : Azure.ResourceManager.Models.TrackedResourceData { - public NetworkRackData(Azure.Core.AzureLocation location, string networkRackSku, string networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public NetworkFabricIPCommunityData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } 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 Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPCommunityRules { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } } - public partial class NetworkRackResource : Azure.ResourceManager.ArmResource + public partial class NetworkFabricIPCommunityResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected NetworkRackResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData Data { get { throw null; } } + protected NetworkFabricIPCommunityResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityData 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 networkRackName) { 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 ipCommunityName) { 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.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.NetworkFabricIPCommunityPatch 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.NetworkFabricIPCommunityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricIPExtendedCommunityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricIPExtendedCommunityCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipExtendedCommunityName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipExtendedCommunityName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ipExtendedCommunityName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ipExtendedCommunityName, 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 ipExtendedCommunityName, 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 NetworkFabricIPExtendedCommunityData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricIPExtendedCommunityData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable ipExtendedCommunityRules) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPExtendedCommunityRules { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkFabricIPExtendedCommunityResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricIPExtendedCommunityResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityData 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 ipExtendedCommunityName) { 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.NetworkFabricIPExtendedCommunityPatch 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.NetworkFabricIPExtendedCommunityPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricIPPrefixCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricIPPrefixCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ipPrefixName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ipPrefixName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ipPrefixName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ipPrefixName, 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 ipPrefixName, 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 NetworkFabricIPPrefixData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricIPPrefixData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public System.Collections.Generic.IList IPPrefixRules { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkFabricIPPrefixResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricIPPrefixResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixData 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 ipPrefixName) { 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.NetworkFabricIPPrefixPatch 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.NetworkFabricIPPrefixPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricL2IsolationDomainCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricL2IsolationDomainCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string l2IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string l2IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string l2IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string l2IsolationDomainName, 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 l2IsolationDomainName, 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 NetworkFabricL2IsolationDomainData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricL2IsolationDomainData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId, int vlanId) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public int? Mtu { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public int VlanId { get { throw null; } set { } } + } + public partial class NetworkFabricL2IsolationDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricL2IsolationDomainResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainData 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 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 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.NetworkFabricL2IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricL2IsolationDomainPatch 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 NetworkFabricL3IsolationDomainCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricL3IsolationDomainCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string l3IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string l3IsolationDomainName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string l3IsolationDomainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string l3IsolationDomainName, 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 l3IsolationDomainName, 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 NetworkFabricL3IsolationDomainData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricL3IsolationDomainData(Azure.Core.AzureLocation location, Azure.Core.ResourceIdentifier networkFabricId) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? 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.NetworkFabricConfigurationState? 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.NetworkFabricProvisioningState? 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 { } } + } + public partial class NetworkFabricL3IsolationDomainResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricL3IsolationDomainResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainData 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 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; } + 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 GetNetworkFabricExternalNetwork(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetworkFabricExternalNetworkAsync(string externalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkCollection GetNetworkFabricExternalNetworks() { throw null; } + public virtual Azure.Response GetNetworkFabricInternalNetwork(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetworkFabricInternalNetworkAsync(string internalNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkCollection GetNetworkFabricInternalNetworks() { 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.NetworkFabricL3IsolationDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricL3IsolationDomainPatch 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 NetworkFabricNeighborGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricNeighborGroupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neighborGroupName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricNeighborGroupData 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.NetworkFabricNeighborGroupData 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 NetworkFabricNeighborGroupData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricNeighborGroupData(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.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkFabricNeighborGroupResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricNeighborGroupResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricNeighborGroupData 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.NetworkFabricNeighborGroupPatch 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.NetworkFabricNeighborGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricData 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 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.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 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.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateInfraManagementBfdConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateWorkloadManagementBfdConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateWorkloadManagementBfdConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Upgrade(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NetworkFabricRoutePolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricRoutePolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string routePolicyName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string routePolicyName, Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string routePolicyName, 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 routePolicyName, 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 NetworkFabricRoutePolicyData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkFabricRoutePolicyData(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.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Statements { get { throw null; } } + } + public partial class NetworkFabricRoutePolicyResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricRoutePolicyResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyData 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 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; } + 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.NetworkFabricRoutePolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateAdministrativeState(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricRoutePolicyPatch 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 NetworkFabricSkuCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkFabricSkuCollection() { } + public virtual Azure.Response Exists(string networkFabricSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkFabricSkuName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkFabricSkuName, 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 networkFabricSkuName, 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 NetworkFabricSkuData : Azure.ResourceManager.Models.ResourceData + { + public NetworkFabricSkuData() { } + public string Details { get { throw null; } } + public int? MaxComputeRacks { get { throw null; } set { } } + public int? MaximumServerCount { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedVersions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType? TypePropertiesType { get { throw null; } } + } + public partial class NetworkFabricSkuResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkFabricSkuResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricSkuData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string networkFabricSkuName) { 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 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.NetworkFabricProvisioningState? 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() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string networkRackName, Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string networkRackName, Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkRackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkRackName, 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 networkRackName, 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 NetworkRackData : Azure.ResourceManager.Models.TrackedResourceData + { + 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 Azure.Core.ResourceIdentifier NetworkFabricId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackType? NetworkRackType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + } + public partial class NetworkRackResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkRackResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkRackData 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 networkRackName) { 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.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 Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackRoleName RoleName { get { throw null; } set { } } + 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.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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.NetworkTapPollingType? PollingType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier SourceTapRuleId { get { throw null; } } + } + public partial class NetworkTapResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkTapResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkTapData 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 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.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, 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 NetworkRackSkuResource : Azure.ResourceManager.ArmResource + public partial class NetworkTapRuleData : Azure.ResourceManager.Models.TrackedResourceData + { + public NetworkTapRuleData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType? 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 Azure.Core.ResourceIdentifier NetworkTapId { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond? PollingIntervalInSeconds { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? 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 NetworkRackSkuResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkRackSkuData Data { get { throw null; } } + protected NetworkTapRuleResource() { } + public virtual Azure.ResourceManager.ManagedNetworkFabric.NetworkTapRuleData 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 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.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, 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 +1217,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.NetworkFabricBooleanValue useOptionB) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty? UseOptionB { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NpbStaticRouteConfiguration NpbStaticRouteConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectOptionBLayer3Configuration OptionBLayer3Configuration { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue UseOptionB { get { throw null; } set { } } } public partial class NetworkToNetworkInterconnectResource : Azure.ResourceManager.ArmResource { @@ -893,124 +1243,116 @@ 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.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, 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.UpdateAdministrativeStateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateNpbStaticRouteBfdAdministrativeStateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateContent content, 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 +} +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class AccessControlListAction { - protected RoutePolicyCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string routePolicyName, Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string routePolicyName, Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string routePolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string routePolicyName, 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 routePolicyName, 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 AccessControlListAction() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AclActionType? AclActionType { get { throw null; } set { } } + public string CounterName { get { throw null; } set { } } } - public partial class RoutePolicyData : Azure.ResourceManager.Models.TrackedResourceData + public partial class AccessControlListMatchCondition : Azure.ResourceManager.ManagedNetworkFabric.Models.CommonMatchConditions { - public RoutePolicyData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable statements) : base (default(Azure.Core.AzureLocation)) { } - public string Annotation { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public System.Collections.Generic.IList Statements { get { throw null; } } + 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 RoutePolicyResource : Azure.ResourceManager.ArmResource + public partial class AccessControlListMatchConfiguration { - public static readonly Azure.Core.ResourceType ResourceType; - protected RoutePolicyResource() { } - public virtual Azure.ResourceManager.ManagedNetworkFabric.RoutePolicyData 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 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; } - 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.RoutePolicyPatch 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.RoutePolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public AccessControlListMatchConfiguration() { } + public System.Collections.Generic.IList Actions { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType? 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 { } } } -} -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - public partial class AccessControlListConditionProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource + public partial class AccessControlListPortCondition : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortCondition { - 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 AccessControlListPortCondition(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol layer4Protocol) : base (default(Azure.ResourceManager.ManagedNetworkFabric.Models.Layer4Protocol)) { } + public System.Collections.Generic.IList Flags { get { throw null; } } } - public partial class AccessControlListPatch + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AclActionType : System.IEquatable { - public AccessControlListPatch() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamily? AddressFamily { 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; } } + 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; } } public partial class ActionIPCommunityProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.IPCommunityAddOperationProperties { public ActionIPCommunityProperties() { } - public System.Collections.Generic.IList DeleteIPCommunityIds { get { throw null; } } - public System.Collections.Generic.IList SetIPCommunityIds { get { throw null; } } + public System.Collections.Generic.IList DeleteIPCommunityIds { get { throw null; } } + public System.Collections.Generic.IList SetIPCommunityIds { get { throw null; } } } public partial class ActionIPExtendedCommunityProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.IPExtendedCommunityAddOperationProperties { public ActionIPExtendedCommunityProperties() { } - public System.Collections.Generic.IList DeleteIPExtendedCommunityIds { get { throw null; } } - public System.Collections.Generic.IList SetIPExtendedCommunityIds { get { throw null; } } + public System.Collections.Generic.IList DeleteIPExtendedCommunityIds { get { throw null; } } + 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)] - public readonly partial struct AdministrativeState : System.IEquatable + public readonly partial struct AdministrativeEnableState : System.IEquatable { 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 bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState other) { throw null; } + public AdministrativeEnableState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState Disable { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState Enable { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState 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.AdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState left, Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState left, Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState right) { throw null; } public override string ToString() { throw null; } } public partial class AggregateRoute { - public AggregateRoute() { } + public AggregateRoute(string prefix) { } public string Prefix { get { throw null; } set { } } } public partial class AggregateRouteConfiguration @@ -1037,96 +1379,107 @@ public AggregateRouteConfiguration() { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride left, Azure.ResourceManager.ManagedNetworkFabric.Models.AllowASOverride right) { throw null; } public override string ToString() { throw null; } } - public partial class AnnotationResource + public partial class AnnotationResourceProperties { - public AnnotationResource() { } + public AnnotationResourceProperties() { } public string Annotation { get { throw null; } set { } } } 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.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.NetworkFabricBooleanValue? defaultRouteOriginate = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue?), 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.DeviceUpdateCommonPostActionResult DeviceUpdateCommonPostActionResult(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), System.Collections.Generic.IEnumerable successfulDevices = null, System.Collections.Generic.IEnumerable failedDevices = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ExternalNetworkOptionAProperties ExternalNetworkOptionAProperties(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.ExternalNetworkPatchOptionAProperties ExternalNetworkPatchOptionAProperties(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.InternalNetworkBgpConfiguration InternalNetworkBgpConfiguration(string annotation = null, Azure.ResourceManager.ManagedNetworkFabric.Models.BfdConfiguration bfdConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue? defaultRouteOriginate = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue?), 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.NeighborAddress NeighborAddress(string address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?)) { 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?), Azure.Core.ResourceIdentifier networkRackId = null, System.Net.IPAddress managementIPv4Address = null, string managementIPv6Address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkDeviceInterfaceData NetworkDeviceInterfaceData(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.NetworkDeviceInterfaceType? interfaceType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType?), System.Net.IPAddress ipv4Address = null, string ipv6Address = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { 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.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricAccessControlListData NetworkFabricAccessControlListData(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.NetworkFabricConfigurationType? configurationType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType?), System.Uri aclsUri = null, System.Collections.Generic.IEnumerable matchConfigurations = null, System.Collections.Generic.IEnumerable dynamicMatchConfigurations = null, System.DateTimeOffset? lastSyncedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { 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.NetworkFabricControllerServices infrastructureServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerServices workloadServices = null, Azure.ResourceManager.ManagedNetworkFabric.Models.ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, System.Collections.Generic.IEnumerable networkFabricIds = null, bool? isWorkloadManagementNetwork = 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.NetworkFabricControllerSKU? nfcSku = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerServices NetworkFabricControllerServices(System.Collections.Generic.IEnumerable ipv4AddressSpaces = null, System.Collections.Generic.IEnumerable ipv6AddressSpaces = null) { 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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricErrorResult NetworkFabricErrorResult(Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricExternalNetworkData NetworkFabricExternalNetworkData(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, Azure.Core.ResourceIdentifier 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.ExternalNetworkOptionAProperties optionAProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternalNetworkData NetworkFabricInternalNetworkData(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.StaticRouteConfigurationExtension? extension = default(Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension?), int vlanId = 0, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkBgpConfiguration bgpConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.InternalNetworkStaticRouteConfiguration staticRouteConfiguration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayData NetworkFabricInternetGatewayData(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, System.Net.IPAddress ipv4Address = null, int? port = default(int?), Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType typePropertiesType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType), Azure.Core.ResourceIdentifier networkFabricControllerId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricInternetGatewayRuleData NetworkFabricInternetGatewayRuleData(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.InternetGatewayRules ruleProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), System.Collections.Generic.IEnumerable internetGatewayIds = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPCommunityData NetworkFabricIPCommunityData(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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPExtendedCommunityData NetworkFabricIPExtendedCommunityData(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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricIPPrefixData NetworkFabricIPPrefixData(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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL2IsolationDomainData NetworkFabricL2IsolationDomainData(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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricL3IsolationDomainData NetworkFabricL3IsolationDomainData(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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricNeighborGroupData NetworkFabricNeighborGroupData(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.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.NetworkFabricRoutePolicyData NetworkFabricRoutePolicyData(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.Core.ResourceIdentifier networkFabricId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType? addressFamilyType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.AddressFamilyType?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { 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.NetworkFabricSkuType? typePropertiesType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType?), int? maxComputeRacks = default(int?), int? maximumServerCount = default(int?), System.Collections.Generic.IEnumerable supportedVersions = null, string details = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { 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.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { 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.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?)) { 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.NetworkTapPollingType? pollingType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { 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.NetworkFabricConfigurationType? configurationType = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType?), System.Uri tapRulesUri = null, System.Collections.Generic.IEnumerable matchConfigurations = null, System.Collections.Generic.IEnumerable dynamicMatchConfigurations = null, Azure.Core.ResourceIdentifier networkTapId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond? pollingIntervalInSeconds = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PollingIntervalInSecond?), System.DateTimeOffset? lastSyncedOn = default(System.DateTimeOffset?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { 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.NetworkFabricBooleanValue useOptionB = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue), Azure.ResourceManager.ManagedNetworkFabric.Models.Layer2Configuration layer2Configuration = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectOptionBLayer3Configuration 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.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState? provisioningState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState?), Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkToNetworkInterconnectOptionBLayer3Configuration NetworkToNetworkInterconnectOptionBLayer3Configuration(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.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.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.Models.StateUpdateCommonPostActionResult StateUpdateCommonPostActionResult(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?)) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerConfiguration TerminalServerConfiguration(string username = null, string password = null, string serialNumber = null, Azure.Core.ResourceIdentifier networkDeviceId = null, string primaryIPv4Prefix = null, string primaryIPv6Prefix = null, string secondaryIPv4Prefix = null, string secondaryIPv6Prefix = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.ValidateConfigurationResult ValidateConfigurationResult(Azure.ResponseError error = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? configurationState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState?), System.Uri uri = null) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationProperties VpnConfigurationProperties(Azure.Core.ResourceIdentifier networkToNetworkInterconnectId = null, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState? administrativeState = default(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState?), Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption peeringOption = default(Azure.ResourceManager.ManagedNetworkFabric.Models.PeeringOption), Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBProperties optionBProperties = null, Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationOptionAProperties 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 partial class BgpConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResourceProperties { - 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 Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue? DefaultRouteOriginate { get { throw null; } set { } } + 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 + public partial class CommonDynamicMatchConfiguration { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BooleanEnumProperty(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty False { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty True { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty 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.BooleanEnumProperty left, Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.BooleanEnumProperty (string value) { throw null; } - 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 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 { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CommunityActionType : System.IEquatable @@ -1146,503 +1499,986 @@ public BgpConfiguration(int peerASN) { } public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType left, Azure.ResourceManager.ManagedNetworkFabric.Models.CommunityActionType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Condition : System.IEquatable + public partial class ConnectedSubnet : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResourceProperties { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public Condition(string value) { throw null; } - 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 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; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.Condition left, Azure.ResourceManager.ManagedNetworkFabric.Models.Condition right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.Condition (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.Condition left, Azure.ResourceManager.ManagedNetworkFabric.Models.Condition right) { throw null; } - public override string ToString() { throw null; } + public ConnectedSubnet(string prefix) { } + public string Prefix { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ConditionActionType : System.IEquatable + public partial class ConnectedSubnetRoutePolicy { - 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; } - [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 override string ToString() { throw null; } + 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 ConnectedSubnet : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource + public partial class DeviceUpdateCommonPostActionResult : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricErrorResult { - public ConnectedSubnet() { } - public string Prefix { get { throw null; } set { } } + internal DeviceUpdateCommonPostActionResult() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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 DeviceInterfaceProperties + public partial class ExportRoutePolicy { - public DeviceInterfaceProperties() { } - public string Identifier { get { throw null; } set { } } - public string InterfaceType { get { throw null; } set { } } - public System.Collections.Generic.IList SupportedConnectorTypes { get { throw null; } } + 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 DeviceLimits + public partial class ExpressRouteConnectionInformation { - 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 ExpressRouteConnectionInformation(Azure.Core.ResourceIdentifier expressRouteCircuitId) { } + public string ExpressRouteAuthorizationKey { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExpressRouteCircuitId { get { throw null; } set { } } + } + public partial class ExternalNetworkOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties + { + public ExternalNetworkOptionAProperties() { } + 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 ExternalNetworkPatchOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties + { + public ExternalNetworkPatchOptionAProperties() { } + 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 ImportRoutePolicy + { + public ImportRoutePolicy() { } + public Azure.Core.ResourceIdentifier ImportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportIPv6RoutePolicyId { get { throw null; } set { } } + } + public partial class ImportRoutePolicyInformation + { + public ImportRoutePolicyInformation() { } + public Azure.Core.ResourceIdentifier ImportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ImportIPv6RoutePolicyId { get { throw null; } set { } } + } + public partial class InternalNetworkBgpConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.BgpConfiguration + { + public InternalNetworkBgpConfiguration() { } + } + public partial class InternalNetworkStaticRouteConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration + { + public InternalNetworkStaticRouteConfiguration() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension? Extension { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EnabledDisabledState : System.IEquatable + public readonly partial struct InternetGatewayRuleAction : 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 InternetGatewayRuleAction(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction Allow { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction 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.InternetGatewayRuleAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction right) { throw null; } public override string ToString() { throw null; } } - public partial class EnableDisableOnResources + public partial class InternetGatewayRules { - public EnableDisableOnResources() { } - public System.Collections.Generic.IList ResourceIds { get { throw null; } } + public InternetGatewayRules(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction action, System.Collections.Generic.IEnumerable addressList) { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayRuleAction Action { get { throw null; } set { } } + public System.Collections.Generic.IList AddressList { get { throw null; } } } - public partial class ExpressRouteConnectionInformation + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InternetGatewayType : System.IEquatable { - public ExpressRouteConnectionInformation(string expressRouteCircuitId) { } - public string ExpressRouteAuthorizationKey { get { throw null; } set { } } - public string ExpressRouteCircuitId { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InternetGatewayType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType Infrastructure { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType Workload { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType 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.InternetGatewayType left, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType left, Azure.ResourceManager.ManagedNetworkFabric.Models.InternetGatewayType right) { throw null; } + public override string ToString() { throw null; } } - public partial class ExternalNetworkPatch + public partial class IPCommunityAddOperationProperties { - 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.PeeringOption? PeeringOption { get { throw null; } set { } } + public IPCommunityAddOperationProperties() { } + public System.Collections.Generic.IList AddIPCommunityIds { get { throw null; } } } - public partial class ExternalNetworkPropertiesOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3OptionAProperties + public partial class IPCommunityIdList { - public ExternalNetworkPropertiesOptionAProperties() { } + public IPCommunityIdList() { } + public System.Collections.Generic.IList IPCommunityIds { get { throw null; } } } - public partial class FabricBfdConfiguration + public partial class IPCommunityRule { - public FabricBfdConfiguration() { } - public int? Interval { get { throw null; } } - public int? Multiplier { get { throw null; } } + 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 GetDeviceStatusProperties + public partial class IPExtendedCommunityAddOperationProperties { - 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; } } + public IPExtendedCommunityAddOperationProperties() { } + public System.Collections.Generic.IList AddIPExtendedCommunityIds { get { throw null; } } } - public partial class InfrastructureServices + public partial class IPExtendedCommunityRule { - internal InfrastructureServices() { } - public System.Collections.Generic.IReadOnlyList IPv4AddressSpaces { get { throw null; } } - public System.Collections.Generic.IReadOnlyList IPv6AddressSpaces { get { throw null; } } + 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 InterfaceStatus + public partial class IPMatchCondition { - 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 IPMatchCondition() { } + public System.Collections.Generic.IList IPGroupNames { get { throw null; } } + public System.Collections.Generic.IList IPPrefixValues { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType? PrefixType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.SourceDestinationType? SourceDestinationType { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct InterfaceType : System.IEquatable + public readonly partial struct IPMatchConditionPrefixType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public InterfaceType(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType Data { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType Management { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType other) { throw null; } + public IPMatchConditionPrefixType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType LongestPrefix { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType Prefix { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType 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.InterfaceType left, Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType left, Azure.ResourceManager.ManagedNetworkFabric.Models.InterfaceType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPMatchConditionPrefixType right) { throw null; } public override string ToString() { throw null; } } - public partial class InternalNetworkPatch + public partial class IPPrefixRule { - public InternalNetworkPatch() { } - public string Annotation { get { throw null; } set { } } - 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 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.IPPrefixRuleCondition? Condition { get { throw null; } set { } } + public string NetworkPrefix { get { throw null; } set { } } + public long SequenceNumber { get { throw null; } set { } } + public string SubnetMaskLength { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IPPrefixRuleCondition : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IPPrefixRuleCondition(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition EqualTo { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition GreaterThanOrEqualTo { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition LesserThanOrEqualTo { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition Range { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition 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.IPPrefixRuleCondition left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition left, Azure.ResourceManager.ManagedNetworkFabric.Models.IPPrefixRuleCondition right) { throw null; } + public override string ToString() { throw null; } + } + [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 IsMonitoringEnabled : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + 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.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; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IsolationDomainEncapsulationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IsolationDomainEncapsulationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType Gre { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType 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.IsolationDomainEncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class IsolationDomainProperties + { + public IsolationDomainProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainEncapsulationType? 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 IsWorkloadManagementNetworkEnabled : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + 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.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 L3ExportRoutePolicy + { + public L3ExportRoutePolicy() { } + public Azure.Core.ResourceIdentifier ExportIPv4RoutePolicyId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ExportIPv6RoutePolicyId { get { throw null; } set { } } + } + public partial class L3OptionBProperties + { + 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() { } + public System.Collections.Generic.IList Interfaces { get { throw null; } } public int? Mtu { get { throw null; } set { } } - public Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfiguration StaticRouteConfiguration { get { throw null; } set { } } } - public partial class IPCommunityAddOperationProperties + public partial class Layer3IPPrefixProperties { - public IPCommunityAddOperationProperties() { } - public System.Collections.Generic.IList AddIPCommunityIds { get { throw null; } } + public Layer3IPPrefixProperties() { } + 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 IPCommunityIdList + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Layer4Protocol : System.IEquatable { - public IPCommunityIdList() { } - public System.Collections.Generic.IList IPCommunityIds { get { throw null; } } + 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 IPCommunityPatch + public partial class ManagedResourceGroupConfiguration { - public IPCommunityPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public ManagedResourceGroupConfiguration() { } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } } - public partial class IPExtendedCommunityAddOperationProperties + public partial class ManagementNetworkConfigurationPatchableProperties { - public IPExtendedCommunityAddOperationProperties() { } - public System.Collections.Generic.IList AddIPExtendedCommunityIds { get { throw null; } } + 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 IPExtendedCommunityPatch + public partial class ManagementNetworkConfigurationProperties { - public IPExtendedCommunityPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + 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 { } } } - public partial class IPPrefixPatch + public partial class MatchConfigurationIPGroupProperties { - public IPPrefixPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public MatchConfigurationIPGroupProperties() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType? IPAddressType { get { throw null; } set { } } + public System.Collections.Generic.IList IPPrefixes { get { throw null; } } + public string Name { get { throw null; } set { } } } - public partial class IPPrefixPropertiesIPPrefixRulesItem + public partial class NeighborAddress { - public IPPrefixPropertiesIPPrefixRulesItem(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 NeighborAddress() { } + public string Address { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkDeviceAdministrativeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkDeviceAdministrativeState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState GracefulQuarantine { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState Quarantine { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState Resync { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState Rma { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState 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.NetworkDeviceAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkDeviceInterfacePatch + { + public NetworkDeviceInterfacePatch() { } + public string Annotation { get { throw null; } set { } } + } + public partial class NetworkDeviceInterfaceProperties + { + public NetworkDeviceInterfaceProperties() { } + public string Identifier { get { throw null; } set { } } + public string InterfaceType { get { throw null; } set { } } + public System.Collections.Generic.IList SupportedConnectorTypes { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkDeviceInterfaceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkDeviceInterfaceType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType Data { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType Management { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType 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.NetworkDeviceInterfaceType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceInterfaceType right) { throw null; } + public override string ToString() { throw null; } + } + 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 partial class NetworkDeviceRebootContent + { + public NetworkDeviceRebootContent() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType? RebootType { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkDeviceRebootType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkDeviceRebootType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType GracefulRebootWithoutZtp { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType GracefulRebootWithZtp { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType UngracefulRebootWithoutZtp { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType UngracefulRebootWithZtp { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType 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.NetworkDeviceRebootType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRebootType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkDeviceRole : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + 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.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)] + public readonly partial struct NetworkDeviceRoleName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkDeviceRoleName(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName CE { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName Management { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName Npb { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName ToR { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName TS { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName 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.NetworkDeviceRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName (string value) { throw null; } + 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 NetworkFabricAccessControlListPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricAccessControlListPatch() { } + public System.Uri AclsUri { get { throw null; } set { } } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType? ConfigurationType { get { throw null; } set { } } + public System.Collections.Generic.IList DynamicMatchConfigurations { get { throw null; } } + public System.Collections.Generic.IList MatchConfigurations { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkFabricAdministrativeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkFabricAdministrativeState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState Disabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState Enabled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState Mat { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState Rma { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState 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.NetworkFabricAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricAdministrativeState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkFabricBooleanValue : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkFabricBooleanValue(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue False { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue 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.NetworkFabricBooleanValue left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkFabricConfigurationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkFabricConfigurationState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Accepted { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState DeferredControl { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Deprovisioned { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Deprovisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState ErrorDeprovisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState ErrorProvisioning { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Failed { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Provisioned { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Rejected { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState 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.NetworkFabricConfigurationState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkFabricConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkFabricConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType File { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType Inline { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType 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.NetworkFabricConfigurationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetworkFabricControllerPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricControllerPatch() { } + public System.Collections.Generic.IList InfrastructureExpressRouteConnections { get { throw null; } } + public System.Collections.Generic.IList WorkloadExpressRouteConnections { get { throw null; } } + } + public partial class NetworkFabricControllerServices + { + internal NetworkFabricControllerServices() { } + public System.Collections.Generic.IReadOnlyList IPv4AddressSpaces { get { throw null; } } + public System.Collections.Generic.IReadOnlyList IPv6AddressSpaces { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IsCurrentVersion : System.IEquatable + public readonly partial struct NetworkFabricControllerSKU : 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 NetworkFabricControllerSKU(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU Basic { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU HighPerformance { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU 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.NetworkFabricControllerSKU left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricControllerSKU right) { throw null; } public override string ToString() { throw null; } } + public partial class NetworkFabricErrorResult + { + internal NetworkFabricErrorResult() { } + public Azure.ResponseError Error { get { throw null; } } + } + public partial class NetworkFabricExternalNetworkPatch + { + public NetworkFabricExternalNetworkPatch() { } + public string Annotation { 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.ExternalNetworkPatchOptionAProperties 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 NetworkFabricInternalNetworkPatch + { + public NetworkFabricInternalNetworkPatch() { } + public string Annotation { get { throw null; } set { } } + 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 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 NetworkFabricInternetGatewayPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricInternetGatewayPatch() { } + public Azure.Core.ResourceIdentifier InternetGatewayRuleId { get { throw null; } set { } } + } + public partial class NetworkFabricInternetGatewayRulePatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricInternetGatewayRulePatch() { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IsTestVersion : System.IEquatable + public readonly partial struct NetworkFabricIPAddressType : 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 NetworkFabricIPAddressType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType IPv4 { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType IPv6 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType 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.NetworkFabricIPAddressType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricIPAddressType right) { throw null; } public override string ToString() { throw null; } } - public partial class L2IsolationDomainPatch + public partial class NetworkFabricIPCommunityPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricIPCommunityPatch() { } + public System.Collections.Generic.IList IPCommunityRules { get { throw null; } } + } + public partial class NetworkFabricIPExtendedCommunityPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricIPExtendedCommunityPatch() { } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList IPExtendedCommunityRules { get { throw null; } } + } + public partial class NetworkFabricIPPrefixPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - public L2IsolationDomainPatch() { } + public NetworkFabricIPPrefixPatch() { } + public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList IPPrefixRules { get { throw null; } } + } + public partial class NetworkFabricL2IsolationDomainPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch + { + public NetworkFabricL2IsolationDomainPatch() { } 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 NetworkFabricL3IsolationDomainPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - public L3IsolationDomainPatch() { } + public NetworkFabricL3IsolationDomainPatch() { } 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 L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.EnabledDisabledState? AdministrativeState { get { throw null; } } - public string ExportRoutePolicyId { get { throw null; } set { } } } - public partial class Layer2Configuration + public partial class NetworkFabricNeighborGroupPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - 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 NetworkFabricNeighborGroupPatch() { } + public string Annotation { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NeighborGroupDestination Destination { get { throw null; } set { } } } - public partial class Layer3Configuration : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricLayer3IPPrefixProperties + public partial class NetworkFabricPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - 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 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 Layer3IPPrefixProperties + public partial class NetworkFabricPatchablePropertiesTerminalServerConfiguration : Azure.ResourceManager.ManagedNetworkFabric.Models.TerminalServerPatchableProperties { - public Layer3IPPrefixProperties() { } + 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 Layer3OptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.Layer3IPPrefixProperties - { - 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 { } } - } - public partial class ManagedResourceGroupConfiguration - { - public ManagedResourceGroupConfiguration() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - } - public partial class ManagementNetworkConfiguration - { - public ManagementNetworkConfiguration(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 { } } - } - public partial class NeighborAddress - { - public NeighborAddress() { } - public string Address { get { throw null; } set { } } - public string OperationalState { get { throw null; } } - } - public partial class NetworkDevicePatch + public partial class NetworkFabricPortCondition { - 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; } } + public NetworkFabricPortCondition(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.NetworkFabricPortType? PortType { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkDeviceRackRoleType : System.IEquatable + public readonly partial struct NetworkFabricPortType : 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 NetworkFabricPortType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType DestinationPort { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType SourcePort { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType 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.NetworkFabricPortType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkDeviceRoleName : System.IEquatable + public readonly partial struct NetworkFabricProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NetworkDeviceRoleName(string value) { throw null; } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName CE { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName Management { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName NPB { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName ToR { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName TS { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName other) { throw null; } + public NetworkFabricProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState 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.NetworkDeviceRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceRoleName right) { throw null; } + public static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class NetworkDeviceRoleProperties + public partial class NetworkFabricRoutePolicyPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - 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 { } } + public NetworkFabricRoutePolicyPatch() { } + public System.Collections.Generic.IList Statements { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkDeviceRoleType : System.IEquatable + public readonly partial struct NetworkFabricSkuType : 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; } + public NetworkFabricSkuType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType MultiRack { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType SingleRack { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType 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 static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricSkuType right) { throw null; } public override string ToString() { throw null; } } + public partial class NetworkFabricUpdateVersionContent + { + public NetworkFabricUpdateVersionContent() { } + public string Version { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkFabricControllerOperationalState : System.IEquatable + public readonly partial struct NetworkFabricValidateAction : 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; } + public NetworkFabricValidateAction(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction Cabling { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction Configuration { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction Connectivity { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction 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 static bool operator ==(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction right) { throw null; } public override string ToString() { throw null; } } - public partial class NetworkFabricControllerPatch + public partial class NetworkPacketBrokerPatch : 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 NetworkPacketBrokerPatch() { } } - public partial class NetworkFabricLayer3IPPrefixProperties + public partial class NetworkRackPatch { - public NetworkFabricLayer3IPPrefixProperties() { } - 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 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 NetworkTapDestinationProperties { - 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 NetworkTapDestinationProperties() { } + public Azure.Core.ResourceIdentifier DestinationId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DestinationTapRuleId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType? DestinationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.IsolationDomainProperties IsolationDomainProperties { get { throw null; } set { } } + public string Name { get { throw null; } set { } } } - public partial class NetworkFabricOptionBProperties + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkTapDestinationType : System.IEquatable { - 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; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkTapDestinationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType Direct { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType IsolationDomain { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType 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.NetworkTapDestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationType right) { throw null; } + public override string ToString() { throw null; } } - public partial class NetworkFabricPatch + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkTapEncapsulationType : System.IEquatable { - 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 { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkTapEncapsulationType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType GTPv1 { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType 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.NetworkTapEncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapEncapsulationType right) { throw null; } + public override string ToString() { throw null; } } - public partial class NetworkInterfacePatch + public partial class NetworkTapPatch : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkRackPatch { - public NetworkInterfacePatch() { } + public NetworkTapPatch() { } public string Annotation { get { throw null; } set { } } + public System.Collections.Generic.IList Destinations { get { throw null; } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType? PollingType { get { throw null; } set { } } } - public partial class NetworkRackPatch + public partial class NetworkTapPatchableParametersDestinationsItem : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationProperties { - public NetworkRackPatch() { } - public System.BinaryData Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public NetworkTapPatchableParametersDestinationsItem() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NetworkRackRoleName : System.IEquatable + public readonly partial struct NetworkTapPollingType : 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 NetworkTapPollingType(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType Pull { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType Push { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType 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.NetworkTapPollingType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType left, Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapPollingType right) { throw null; } public override string ToString() { throw null; } } + public partial class NetworkTapPropertiesDestinationsItem : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkTapDestinationProperties + { + public NetworkTapPropertiesDestinationsItem() { } + } + public partial class NetworkTapRuleAction + { + public NetworkTapRuleAction() { } + public Azure.Core.ResourceIdentifier DestinationId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricBooleanValue? 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.NetworkTapEncapsulationType? EncapsulationType { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricPortCondition 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.NetworkFabricIPAddressType? 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.NetworkFabricConfigurationType? 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 NetworkToNetworkInterconnectOptionBLayer3Configuration : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionBLayer3Configuration + { + public NetworkToNetworkInterconnectOptionBLayer3Configuration() { } + } + 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 { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct NniType : System.IEquatable { @@ -1650,7 +2486,7 @@ public NetworkRackPatch() { } private readonly int _dummyPrimitive; public NniType(string value) { throw null; } public static Azure.ResourceManager.ManagedNetworkFabric.Models.NniType CE { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.NniType NPB { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.NniType Npb { get { throw null; } } public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.NniType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1661,30 +2497,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,61 +2545,29 @@ public OptionBProperties() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PowerCycleState : 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; } - [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 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 PollingIntervalInSecond : 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 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.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.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 ProvisioningState : System.IEquatable + public partial class PortGroupProperties { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProvisioningState(string value) { 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; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState 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.ProvisioningState left, Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.ProvisioningState (string value) { throw null; } - 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 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 RedistributeConnectedSubnet : System.IEquatable @@ -1797,40 +2605,80 @@ 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 { - public RoutePolicyPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + 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 RoutePolicyStatementProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResource + public partial class RoutePolicyStatementProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.AnnotationResourceProperties { public RoutePolicyStatementProperties(long sequenceNumber, Azure.ResourceManager.ManagedNetworkFabric.Models.StatementConditionProperties condition, Azure.ResourceManager.ManagedNetworkFabric.Models.StatementActionProperties action) { } public Azure.ResourceManager.ManagedNetworkFabric.Models.StatementActionProperties Action { get { throw null; } set { } } 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; } } + } [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 { } } @@ -1838,8 +2686,14 @@ public StatementActionProperties(Azure.ResourceManager.ManagedNetworkFabric.Mode public partial class StatementConditionProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.IPCommunityIdList { public StatementConditionProperties() { } - public System.Collections.Generic.IList IPExtendedCommunityIds { get { throw null; } } - public string IPPrefixId { get { throw null; } set { } } + public System.Collections.Generic.IList IPExtendedCommunityIds { get { throw null; } } + public Azure.Core.ResourceIdentifier IPPrefixId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.RoutePolicyConditionType? RoutePolicyConditionType { get { throw null; } set { } } + } + public partial class StateUpdateCommonPostActionResult : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricErrorResult + { + internal StateUpdateCommonPostActionResult() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? ConfigurationState { get { throw null; } } } public partial class StaticRouteConfiguration { @@ -1848,6 +2702,24 @@ public StaticRouteConfiguration() { } public System.Collections.Generic.IList IPv4Routes { get { throw null; } } public System.Collections.Generic.IList IPv6Routes { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StaticRouteConfigurationExtension : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StaticRouteConfigurationExtension(string value) { throw null; } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension NoExtension { get { throw null; } } + public static Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension Npb { get { throw null; } } + public bool Equals(Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension 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.StaticRouteConfigurationExtension left, Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension right) { throw null; } + public static implicit operator Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension left, Azure.ResourceManager.ManagedNetworkFabric.Models.StaticRouteConfigurationExtension right) { throw null; } + public override string ToString() { throw null; } + } public partial class StaticRouteProperties { public StaticRouteProperties(string prefix, System.Collections.Generic.IEnumerable nextHop) { } @@ -1863,24 +2735,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.NetworkFabricBooleanValue? 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 Azure.Core.ResourceIdentifier NetworkDeviceId { get { throw null; } } + 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 { @@ -1889,29 +2779,76 @@ public TerminalServerPatchableProperties() { } public string SerialNumber { get { throw null; } set { } } public string Username { get { throw null; } set { } } } - public partial class UpdateAdministrativeState : Azure.ResourceManager.ManagedNetworkFabric.Models.EnableDisableOnResources + public partial class UpdateAdministrativeStateContent : Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateOnResources + { + public UpdateAdministrativeStateContent() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeEnableState? State { get { throw null; } set { } } + } + public partial class UpdateAdministrativeStateOnResources + { + public UpdateAdministrativeStateOnResources() { } + public System.Collections.Generic.IList ResourceIds { get { throw null; } } + } + public partial class UpdateDeviceAdministrativeStateContent : Azure.ResourceManager.ManagedNetworkFabric.Models.UpdateAdministrativeStateOnResources + { + public UpdateDeviceAdministrativeStateContent() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkDeviceAdministrativeState? State { get { throw null; } set { } } + } + public partial class ValidateConfigurationContent + { + public ValidateConfigurationContent() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricValidateAction? ValidateAction { get { throw null; } set { } } + } + public partial class ValidateConfigurationResult : Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricErrorResult + { + internal ValidateConfigurationResult() { } + public Azure.ResourceManager.ManagedNetworkFabric.Models.NetworkFabricConfigurationState? 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 VpnConfigurationOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionAProperties { - public UpdateAdministrativeState() { } - public Azure.ResourceManager.ManagedNetworkFabric.Models.AdministrativeState? State { get { throw null; } set { } } + public VpnConfigurationOptionAProperties() { } + 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 UpdatePowerCycleProperties + public partial class VpnConfigurationPatchableOptionAProperties : Azure.ResourceManager.ManagedNetworkFabric.Models.OptionAProperties { - 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 VpnConfigurationPatchableOptionAProperties() { } + 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 UpdateVersionProperties + public partial class VpnConfigurationPatchableProperties { - public UpdateVersionProperties(string skuVersion) { } - public string SkuVersion { get { throw null; } } + public VpnConfigurationPatchableProperties() { } + public Azure.Core.ResourceIdentifier NetworkToNetworkInterconnectId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationPatchableOptionAProperties 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 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.NetworkFabricAdministrativeState? AdministrativeState { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkToNetworkInterconnectId { get { throw null; } set { } } + public Azure.ResourceManager.ManagedNetworkFabric.Models.VpnConfigurationOptionAProperties 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 { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1935,10 +2872,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/assets.json b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/assets.json index 003a50d76a3d0..3a93462ae7973 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/assets.json +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric", - "Tag": "net/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric_81afc1026e" + "Tag": "net/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric_258b2481b3" } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListResource.cs deleted file mode 100644 index db212aab53e6f..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListResource.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_AccessControlListResource - { - // AccessControlLists_Get_MinimumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_AccessControlListsGetMinimumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json - // this example is just showing the usage of "AccessControlLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AccessControlListResource created on azure - // for more information of creating AccessControlListResource, please refer to the document of AccessControlListResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string accessControlListName = "aclOne"; - ResourceIdentifier accessControlListResourceId = AccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); - AccessControlListResource accessControlList = client.GetAccessControlListResource(accessControlListResourceId); - - // invoke the operation - AccessControlListResource result = await accessControlList.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // AccessControlLists_Update_MinimumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_AccessControlListsUpdateMinimumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Update_MinimumSet_Gen.json - // this example is just showing the usage of "AccessControlLists_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AccessControlListResource created on azure - // for more information of creating AccessControlListResource, please refer to the document of AccessControlListResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string accessControlListName = "aclOne"; - ResourceIdentifier accessControlListResourceId = AccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); - AccessControlListResource accessControlList = client.GetAccessControlListResource(accessControlListResourceId); - - // invoke the operation - AccessControlListPatch patch = new AccessControlListPatch() - { - AddressFamily = AddressFamily.IPv4, - Conditions = -{ -new AccessControlListConditionProperties(4,ConditionActionType.Allow,"1.1.1.2","21","2.2.2.3","65000",6) -}, - }; - AccessControlListResource result = await accessControlList.UpdateAsync(patch); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // AccessControlLists_Delete_MinimumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_AccessControlListsDeleteMinimumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Delete_MinimumSet_Gen.json - // this example is just showing the usage of "AccessControlLists_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AccessControlListResource created on azure - // for more information of creating AccessControlListResource, please refer to the document of AccessControlListResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "subscriptionId"; - string accessControlListName = "aclOne"; - ResourceIdentifier accessControlListResourceId = AccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); - AccessControlListResource accessControlList = client.GetAccessControlListResource(accessControlListResourceId); - - // invoke the operation - await accessControlList.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // AccessControlLists_ListBySubscription_MinimumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAccessControlLists_AccessControlListsListBySubscriptionMinimumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListBySubscription_MinimumSet_Gen.json - // this example is just showing the usage of "AccessControlLists_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (AccessControlListResource item in subscriptionResource.GetAccessControlListsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkCollection.cs deleted file mode 100644 index f43eff7487505..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkCollection.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_ExternalNetworkCollection - { - // ExternalNetworks_Create_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_ExternalNetworksCreateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Create_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this ExternalNetworkResource - ExternalNetworkCollection collection = l3IsolationDomain.GetExternalNetworks(); - - // invoke the operation - string externalNetworkName = "example-externalnetwork"; - ExternalNetworkData data = new ExternalNetworkData(PeeringOption.OptionA) - { - OptionBProperties = new OptionBProperties() - { - ImportRouteTargets = -{ -"65046:10039" -}, - ExportRouteTargets = -{ -"65046:10039" -}, - }, - OptionAProperties = new ExternalNetworkPropertiesOptionAProperties() - { - Mtu = 1500, - VlanId = 1001, - PeerASN = 65047, - BfdConfiguration = new BfdConfiguration(), - PrimaryIPv4Prefix = "10.1.1.0/30", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", - SecondaryIPv4Prefix = "10.1.1.4/30", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", - }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, externalNetworkName, data); - ExternalNetworkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ExternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // ExternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_ExternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this ExternalNetworkResource - ExternalNetworkCollection collection = l3IsolationDomain.GetExternalNetworks(); - - // invoke the operation - string externalNetworkName = "example-externalnetwork"; - ExternalNetworkResource result = await collection.GetAsync(externalNetworkName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ExternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // ExternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_ExternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this ExternalNetworkResource - ExternalNetworkCollection collection = l3IsolationDomain.GetExternalNetworks(); - - // invoke the operation - string externalNetworkName = "example-externalnetwork"; - bool result = await collection.ExistsAsync(externalNetworkName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // ExternalNetworks_List_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ExternalNetworksListMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_List_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this ExternalNetworkResource - ExternalNetworkCollection collection = l3IsolationDomain.GetExternalNetworks(); - - // invoke the operation and iterate over the result - await foreach (ExternalNetworkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ExternalNetworkData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkResource.cs deleted file mode 100644 index cf2a9562d00e0..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_ExternalNetworkResource.cs +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_ExternalNetworkResource - { - // ExternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_ExternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - ExternalNetworkResource result = await externalNetwork.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ExternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // ExternalNetworks_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_ExternalNetworksUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Update_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - ExternalNetworkPatch patch = new ExternalNetworkPatch() - { - Annotation = "Lab 1", - PeeringOption = PeeringOption.OptionA, - OptionBProperties = new OptionBProperties() - { - ImportRouteTargets = -{ -"65046:10039" -}, - ExportRouteTargets = -{ -"65046:10039" -}, - }, - OptionAProperties = new Layer3OptionAProperties() - { - Mtu = 1500, - VlanId = 1001, - PeerASN = 65047, - BfdConfiguration = new BfdConfiguration(), - PrimaryIPv4Prefix = "10.1.1.0/30", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", - SecondaryIPv4Prefix = "10.1.1.4/30", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", - }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - }; - ArmOperation lro = await externalNetwork.UpdateAsync(WaitUntil.Completed, patch); - ExternalNetworkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - ExternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // ExternalNetworks_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_ExternalNetworksDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - await externalNetwork.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // ExternalNetworks_updateAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateAdministrativeState_ExternalNetworksUpdateAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await externalNetwork.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateBgpAdministrativeState_ExternalNetworksUpdateBgpAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_updateBgpAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await externalNetwork.UpdateBgpAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateBfdForBgpAdministrativeState_ExternalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_updateBfdForBgpAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await externalNetwork.UpdateBfdForBgpAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearIPv6Neighbors_ExternalNetworksClearIpv6NeighborsMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_clearIpv6Neighbors" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await externalNetwork.ClearIPv6NeighborsAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // ExternalNetworks_clearArpEntries_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearArpEntries_ExternalNetworksClearArpEntriesMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/ExternalNetworks_clearArpEntries_MaximumSet_Gen.json - // this example is just showing the usage of "ExternalNetworks_clearArpEntries" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ExternalNetworkResource created on azure - // for more information of creating ExternalNetworkResource, please refer to the document of ExternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string externalNetworkName = "example-externalnetwork"; - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); - ExternalNetworkResource externalNetwork = client.GetExternalNetworkResource(externalNetworkResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await externalNetwork.ClearArpEntriesAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkCollection.cs deleted file mode 100644 index 1fb9aa482c4ea..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkCollection.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_InternalNetworkCollection - { - // InternalNetworks_Create_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_InternalNetworksCreateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Create_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Create" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this InternalNetworkResource - InternalNetworkCollection collection = l3IsolationDomain.GetInternalNetworks(); - - // invoke the operation - string internalNetworkName = "example-internalnetwork"; - InternalNetworkData data = new InternalNetworkData(501) - { - Mtu = 1500, - ConnectedIPv4Subnets = -{ -new ConnectedSubnet() -{ -Prefix = "10.0.0.0/24", -} -}, - ConnectedIPv6Subnets = -{ -new ConnectedSubnet() -{ -Prefix = "3FFE:FFFF:0:CD30::a0/29", -} -}, - StaticRouteConfiguration = new StaticRouteConfiguration() - { - BfdConfiguration = new BfdConfiguration(), - IPv4Routes = -{ -new StaticRouteProperties("10.1.0.0/24",new string[] -{ -"10.0.0.1" -}) -}, - IPv6Routes = -{ -new StaticRouteProperties("2fff::/64",new string[] -{ -"2ffe::1" -}) -}, - }, - BgpConfiguration = new BgpConfiguration(6) - { - BfdConfiguration = new BfdConfiguration(), - DefaultRouteOriginate = BooleanEnumProperty.True, - AllowAS = 1, - AllowASOverride = AllowASOverride.Enable, - IPv4ListenRangePrefixes = -{ -"10.1.0.0/25" -}, - IPv6ListenRangePrefixes = -{ -"2fff::/66" -}, - IPv4NeighborAddress = -{ -new NeighborAddress() -{ -Address = "10.1.0.0", -} -}, - IPv6NeighborAddress = -{ -new NeighborAddress() -{ -Address = "2fff::", -} -}, - }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, internalNetworkName, data); - InternalNetworkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // InternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_InternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this InternalNetworkResource - InternalNetworkCollection collection = l3IsolationDomain.GetInternalNetworks(); - - // invoke the operation - string internalNetworkName = "example-internalnetwork"; - InternalNetworkResource result = await collection.GetAsync(internalNetworkName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // InternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_InternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this InternalNetworkResource - InternalNetworkCollection collection = l3IsolationDomain.GetInternalNetworks(); - - // invoke the operation - string internalNetworkName = "example-internalnetwork"; - bool result = await collection.ExistsAsync(internalNetworkName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // InternalNetworks_List_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_InternalNetworksListMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_List_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // get the collection of this InternalNetworkResource - InternalNetworkCollection collection = l3IsolationDomain.GetInternalNetworks(); - - // invoke the operation and iterate over the result - await foreach (InternalNetworkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InternalNetworkData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkResource.cs deleted file mode 100644 index 287d76229f241..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_InternalNetworkResource.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_InternalNetworkResource - { - // InternalNetworks_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_InternalNetworksGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Get_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - InternalNetworkResource result = await internalNetwork.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // InternalNetworks_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_InternalNetworksUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Update_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - InternalNetworkPatch patch = new InternalNetworkPatch() - { - Mtu = 1500, - ConnectedIPv4Subnets = -{ -new ConnectedSubnet() -{ -Prefix = "10.0.0.0/24", -} -}, - ConnectedIPv6Subnets = -{ -new ConnectedSubnet() -{ -Prefix = "3FFE:FFFF:0:CD30::a0/29", -} -}, - StaticRouteConfiguration = new StaticRouteConfiguration() - { - BfdConfiguration = new BfdConfiguration(), - IPv4Routes = -{ -new StaticRouteProperties("10.1.0.0/24",new string[] -{ -"10.0.0.1" -}) -}, - IPv6Routes = -{ -new StaticRouteProperties("2fff::/64",new string[] -{ -"2ffe::1" -}) -}, - }, - BgpConfiguration = new BgpConfiguration(6) - { - BfdConfiguration = new BfdConfiguration(), - DefaultRouteOriginate = BooleanEnumProperty.True, - AllowAS = 1, - AllowASOverride = AllowASOverride.Enable, - IPv4ListenRangePrefixes = -{ -"10.1.0.0/25" -}, - IPv6ListenRangePrefixes = -{ -"2fff::/66" -}, - IPv4NeighborAddress = -{ -new NeighborAddress() -{ -Address = "10.1.0.0", -} -}, - IPv6NeighborAddress = -{ -new NeighborAddress() -{ -Address = "2fff::", -} -}, - }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", - }; - ArmOperation lro = await internalNetwork.UpdateAsync(WaitUntil.Completed, patch); - InternalNetworkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - InternalNetworkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // InternalNetworks_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_InternalNetworksDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - await internalNetwork.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_updateAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateAdministrativeState_InternalNetworksUpdateAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" -}, - }; - await internalNetwork.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateBgpAdministrativeState_InternalNetworksUpdateBgpAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBgpAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_updateBgpAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" -}, - }; - await internalNetwork.UpdateBgpAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateBfdForBgpAdministrativeState_InternalNetworksUpdateBfdForBgpAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForBgpAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_updateBfdForBgpAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" -}, - }; - await internalNetwork.UpdateBfdForBgpAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearIPv6Neighbors_InternalNetworksClearIpv6NeighborsMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearIpv6Neighbors_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_clearIpv6Neighbors" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await internalNetwork.ClearIPv6NeighborsAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_clearArpEntries_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearArpEntries_InternalNetworksClearArpEntriesMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_clearArpEntries_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_clearArpEntries" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await internalNetwork.ClearArpEntriesAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateBfdForStaticRouteAdministrativeState_InternalNetworksUpdateBfdForStaticRouteAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/InternalNetworks_updateBfdForStaticRouteAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "InternalNetworks_updateBfdForStaticRouteAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this InternalNetworkResource created on azure - // for more information of creating InternalNetworkResource, please refer to the document of InternalNetworkResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - string internalNetworkName = "example-internalnetwork"; - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); - InternalNetworkResource internalNetwork = client.GetInternalNetworkResource(internalNetworkResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/example-l3domain/internalNetworks/example-internalnetwork" -}, - }; - await internalNetwork.UpdateBfdForStaticRouteAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainResource.cs deleted file mode 100644 index 938507ae11c29..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainResource.cs +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_L2IsolationDomainResource - { - // L2IsolationDomains_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_L2IsolationDomainsGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "l2IsolationDomainName"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - L2IsolationDomainResource result = await l2IsolationDomain.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // L2IsolationDomains_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_L2IsolationDomainsUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Update_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "l2IsolationDomainName"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - L2IsolationDomainPatch patch = new L2IsolationDomainPatch() - { - Mtu = 9000, - }; - ArmOperation lro = await l2IsolationDomain.UpdateAsync(WaitUntil.Completed, patch); - L2IsolationDomainResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // L2IsolationDomains_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_L2IsolationDomainsDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "example-l2domain"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - await l2IsolationDomain.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateAdministrativeState_L2IsolationDomainsUpdateAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "l2IsolationDomainName"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" -}, - }; - await l2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L2IsolationDomains_clearArpTable_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearArpTable_L2IsolationDomainsClearArpTableMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearArpTable_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_clearArpTable" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "example-l2domain"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" -}, - }; - await l2IsolationDomain.ClearArpTableAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L2IsolationDomains_clearNeighborTable_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearNeighborTable_L2IsolationDomainsClearNeighborTableMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_clearNeighborTable_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_clearNeighborTable" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "qc"; - string resourceGroupName = "rgL2IsolationDomains"; - string l2IsolationDomainName = "oz"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/example-l2domain" -}, - }; - await l2IsolationDomain.ClearNeighborTableAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L2IsolationDomains_getArpEntries_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetArpEntries_L2IsolationDomainsGetArpEntriesMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_getArpEntries_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_getArpEntries" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L2IsolationDomainResource created on azure - // for more information of creating L2IsolationDomainResource, please refer to the document of L2IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l2IsolationDomainName = "l2IsolationDomainName"; - ResourceIdentifier l2IsolationDomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = client.GetL2IsolationDomainResource(l2IsolationDomainResourceId); - - // invoke the operation - ArmOperation> lro = await l2IsolationDomain.GetArpEntriesAsync(WaitUntil.Completed); - IDictionary result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - - // L2IsolationDomains_ListBySubscription_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetL2IsolationDomains_L2IsolationDomainsListBySubscriptionMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json - // this example is just showing the usage of "L2IsolationDomains_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (L2IsolationDomainResource item in subscriptionResource.GetL2IsolationDomainsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainResource.cs deleted file mode 100644 index baf3e172fe326..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainResource.cs +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_L3IsolationDomainResource - { - // L3IsolationDomains_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_L3IsolationDomainsGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - L3IsolationDomainResource result = await l3IsolationDomain.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // L3IsolationDomains_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_L3IsolationDomainsUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Update_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - L3IsolationDomainPatch patch = new L3IsolationDomainPatch() - { - RedistributeConnectedSubnets = RedistributeConnectedSubnet.True, - RedistributeStaticRoutes = RedistributeStaticRoute.False, - AggregateRouteConfiguration = new AggregateRouteConfiguration() - { - IPv4Routes = -{ -new AggregateRoute() -{ -Prefix = "10.0.0.0/24", -} -}, - IPv6Routes = -{ -new AggregateRoute() -{ -Prefix = "3FFE:FFFF:0:CD30::a0/29", -} -}, - }, - Description = "creating L3 isolation domain", - ConnectedSubnetRoutePolicy = new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() - { - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - }, - }; - ArmOperation lro = await l3IsolationDomain.UpdateAsync(WaitUntil.Completed, patch); - L3IsolationDomainResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // L3IsolationDomains_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_L3IsolationDomainsDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - await l3IsolationDomain.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // L3IsolationDomains_ListBySubscription_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetL3IsolationDomains_L3IsolationDomainsListBySubscriptionMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (L3IsolationDomainResource item in subscriptionResource.GetL3IsolationDomainsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateAdministrativeState_L3IsolationDomainsUpdateAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await l3IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateOptionBAdministrativeState_L3IsolationDomainsUpdateOptionBAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_updateOptionBAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_updateOptionBAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await l3IsolationDomain.UpdateOptionBAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L3IsolationDomains_clearArpTable_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearArpTable_L3IsolationDomainsClearArpTableMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearArpTable_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_clearArpTable" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "l3IsolationDomainName"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/example-l3domain" -}, - }; - await l3IsolationDomain.ClearArpTableAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - - // L3IsolationDomains_clearNeighborTable_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ClearNeighborTable_L3IsolationDomainsClearNeighborTableMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_clearNeighborTable_MaximumSet_Gen.json - // this example is just showing the usage of "L3IsolationDomains_clearNeighborTable" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this L3IsolationDomainResource created on azure - // for more information of creating L3IsolationDomainResource, please refer to the document of L3IsolationDomainResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string l3IsolationDomainName = "example-l3domain"; - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); - - // invoke the operation - EnableDisableOnResources body = new EnableDisableOnResources() - { - ResourceIds = -{ -"wnaxqikneofcni" -}, - }; - await l3IsolationDomain.ClearNeighborTableAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceCollection.cs index ded686870aaff..63c734cbe0001 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceCollection.cs @@ -12,7 +12,6 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.ManagedNetworkFabric.Samples @@ -24,7 +23,7 @@ public partial class Sample_NetworkDeviceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkDevicesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,8 +33,8 @@ public async Task CreateOrUpdate_NetworkDevicesCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -43,17 +42,16 @@ public async Task CreateOrUpdate_NetworkDevicesCreateMaximumSetGen() NetworkDeviceCollection collection = resourceGroupResource.GetNetworkDevices(); // invoke the operation - string networkDeviceName = "networkDeviceName"; - NetworkDeviceData data = new NetworkDeviceData(new AzureLocation("eastus")) + string networkDeviceName = "example-device"; + NetworkDeviceData data = new NetworkDeviceData(new AzureLocation("eastuseuap")) { - Annotation = "null", - HostName = "networkDeviceName", - SerialNumber = "Arista;DCS-7280PR3-24;12.05;JPE21330382", - NetworkDeviceSku = "DefaultSku", - NetworkDeviceRole = NetworkDeviceRoleType.CE, + Annotation = "annotation", + HostName = "NFA-Device", + SerialNumber = "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", + NetworkDeviceSku = "DeviceSku", Tags = { -["keyID"] = "keyValue", +["keyID"] = "KeyValue", }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkDeviceName, data); @@ -71,7 +69,7 @@ public async Task CreateOrUpdate_NetworkDevicesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkDevicesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,8 +79,8 @@ public async Task Get_NetworkDevicesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -90,7 +88,7 @@ public async Task Get_NetworkDevicesGetMaximumSetGen() NetworkDeviceCollection collection = resourceGroupResource.GetNetworkDevices(); // invoke the operation - string networkDeviceName = "networkDeviceName"; + string networkDeviceName = "example-device"; NetworkDeviceResource result = await collection.GetAsync(networkDeviceName); // the variable result is a resource, you could call other operations on this instance as well @@ -105,7 +103,7 @@ public async Task Get_NetworkDevicesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkDevicesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,8 +113,8 @@ public async Task Exists_NetworkDevicesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -124,7 +122,7 @@ public async Task Exists_NetworkDevicesGetMaximumSetGen() NetworkDeviceCollection collection = resourceGroupResource.GetNetworkDevices(); // invoke the operation - string networkDeviceName = "networkDeviceName"; + string networkDeviceName = "example-device"; bool result = await collection.ExistsAsync(networkDeviceName); Console.WriteLine($"Succeeded: {result}"); @@ -135,7 +133,7 @@ public async Task Exists_NetworkDevicesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkDevicesListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,8 +143,8 @@ public async Task GetAll_NetworkDevicesListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceCollection.cs similarity index 70% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceCollection.cs index a24088cd244ab..83eab64209202 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceCollection.cs @@ -15,14 +15,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_NetworkInterfaceCollection + public partial class Sample_NetworkDeviceInterfaceCollection { // NetworkInterfaces_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkInterfacesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkInterfaces_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,27 +32,27 @@ public async Task CreateOrUpdate_NetworkInterfacesCreateMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - // get the collection of this NetworkInterfaceResource - NetworkInterfaceCollection collection = networkDevice.GetNetworkInterfaces(); + // get the collection of this NetworkDeviceInterfaceResource + NetworkDeviceInterfaceCollection collection = networkDevice.GetNetworkDeviceInterfaces(); // invoke the operation - string networkInterfaceName = "networkInterfaceName"; - NetworkInterfaceData data = new NetworkInterfaceData() + string networkInterfaceName = "example-interface"; + NetworkDeviceInterfaceData data = new NetworkDeviceInterfaceData() { - Annotation = "null", + Annotation = "annotation", }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkInterfaceName, data); - NetworkInterfaceResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkInterfaceName, data); + NetworkDeviceInterfaceResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - NetworkInterfaceData resourceData = result.Data; + NetworkDeviceInterfaceData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -62,7 +62,7 @@ public async Task CreateOrUpdate_NetworkInterfacesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkInterfacesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,22 +72,22 @@ public async Task Get_NetworkInterfacesGetMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - // get the collection of this NetworkInterfaceResource - NetworkInterfaceCollection collection = networkDevice.GetNetworkInterfaces(); + // get the collection of this NetworkDeviceInterfaceResource + NetworkDeviceInterfaceCollection collection = networkDevice.GetNetworkDeviceInterfaces(); // invoke the operation - string networkInterfaceName = "networkInterfaceName"; - NetworkInterfaceResource result = await collection.GetAsync(networkInterfaceName); + string networkInterfaceName = "example-interface"; + NetworkDeviceInterfaceResource result = await collection.GetAsync(networkInterfaceName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - NetworkInterfaceData resourceData = result.Data; + NetworkDeviceInterfaceData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -97,7 +97,7 @@ public async Task Get_NetworkInterfacesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkInterfacesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,29 +107,29 @@ public async Task Exists_NetworkInterfacesGetMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - // get the collection of this NetworkInterfaceResource - NetworkInterfaceCollection collection = networkDevice.GetNetworkInterfaces(); + // get the collection of this NetworkDeviceInterfaceResource + NetworkDeviceInterfaceCollection collection = networkDevice.GetNetworkDeviceInterfaces(); // invoke the operation - string networkInterfaceName = "networkInterfaceName"; + string networkInterfaceName = "example-interface"; bool result = await collection.ExistsAsync(networkInterfaceName); Console.WriteLine($"Succeeded: {result}"); } - // NetworkInterfaces_List_MaximumSet_Gen + // NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_NetworkInterfacesListMaximumSetGen() + public async Task GetAll_NetworkInterfacesListByNetworkDeviceMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_List_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_ListByNetworkDevice_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkInterfaces_ListByNetworkDevice" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -138,21 +138,21 @@ public async Task GetAll_NetworkInterfacesListMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - // get the collection of this NetworkInterfaceResource - NetworkInterfaceCollection collection = networkDevice.GetNetworkInterfaces(); + // get the collection of this NetworkDeviceInterfaceResource + NetworkDeviceInterfaceCollection collection = networkDevice.GetNetworkDeviceInterfaces(); // invoke the operation and iterate over the result - await foreach (NetworkInterfaceResource item in collection.GetAllAsync()) + await foreach (NetworkDeviceInterfaceResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - NetworkInterfaceData resourceData = item.Data; + NetworkDeviceInterfaceData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceResource.cs new file mode 100644 index 0000000000000..8451007a8b27c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceInterfaceResource.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkDeviceInterfaceResource + { + // NetworkInterfaces_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkInterfacesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkDeviceInterfaceResource created on azure + // for more information of creating NetworkDeviceInterfaceResource, please refer to the document of NetworkDeviceInterfaceResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; + string networkInterfaceName = "example-interface"; + ResourceIdentifier networkDeviceInterfaceResourceId = NetworkDeviceInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); + NetworkDeviceInterfaceResource networkDeviceInterface = client.GetNetworkDeviceInterfaceResource(networkDeviceInterfaceResourceId); + + // invoke the operation + NetworkDeviceInterfaceResource result = await networkDeviceInterface.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkDeviceInterfaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkInterfaces_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_NetworkInterfacesUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkInterfaces_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkDeviceInterfaceResource created on azure + // for more information of creating NetworkDeviceInterfaceResource, please refer to the document of NetworkDeviceInterfaceResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; + string networkInterfaceName = "example-interface"; + ResourceIdentifier networkDeviceInterfaceResourceId = NetworkDeviceInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); + NetworkDeviceInterfaceResource networkDeviceInterface = client.GetNetworkDeviceInterfaceResource(networkDeviceInterfaceResourceId); + + // invoke the operation + NetworkDeviceInterfacePatch patch = new NetworkDeviceInterfacePatch() + { + Annotation = "annotation", + }; + ArmOperation lro = await networkDeviceInterface.UpdateAsync(WaitUntil.Completed, patch); + NetworkDeviceInterfaceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkDeviceInterfaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkInterfaces_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_NetworkInterfacesDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkInterfaces_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkDeviceInterfaceResource created on azure + // for more information of creating NetworkDeviceInterfaceResource, please refer to the document of NetworkDeviceInterfaceResource + string subscriptionId = "94D0FD57-C08B-4CA3-A926-6B76D8B7B956"; + string resourceGroupName = "rgNetworkDevices"; + string networkDeviceName = "sjzd"; + string networkInterfaceName = "emrgu"; + ResourceIdentifier networkDeviceInterfaceResourceId = NetworkDeviceInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); + NetworkDeviceInterfaceResource networkDeviceInterface = client.GetNetworkDeviceInterfaceResource(networkDeviceInterfaceResourceId); + + // invoke the operation + await networkDeviceInterface.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_NetworkInterfacesUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkInterfaces_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkInterfaces_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkDeviceInterfaceResource created on azure + // for more information of creating NetworkDeviceInterfaceResource, please refer to the document of NetworkDeviceInterfaceResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; + string networkInterfaceName = "example-interface"; + ResourceIdentifier networkDeviceInterfaceResourceId = NetworkDeviceInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); + NetworkDeviceInterfaceResource networkDeviceInterface = client.GetNetworkDeviceInterfaceResource(networkDeviceInterfaceResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkDeviceInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceResource.cs index a3a7ef3a72b6e..6350f7a9edcb0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceResource.cs @@ -24,7 +24,7 @@ public partial class Sample_NetworkDeviceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkDevicesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,9 +34,9 @@ public async Task Get_NetworkDevicesGetMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); @@ -55,7 +55,7 @@ public async Task Get_NetworkDevicesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkDevicesUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Update_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,22 +65,22 @@ public async Task Update_NetworkDevicesUpdateMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); // invoke the operation NetworkDevicePatch patch = new NetworkDevicePatch() { + Annotation = "annotation", + HostName = "NFA-Device", + SerialNumber = "Vendor;DCS-7280XXX-24;12.05;JPE2111XXXX", Tags = { -["keyID"] = "keyValue", +["keyID"] = "KeyValue", }, - Annotation = "null", - HostName = "networkDeviceName", - SerialNumber = "Arista;DCS-7280PR3-24;12.05;JPE21330382", }; ArmOperation lro = await networkDevice.UpdateAsync(WaitUntil.Completed, patch); NetworkDeviceResource result = lro.Value; @@ -97,7 +97,7 @@ public async Task Update_NetworkDevicesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkDevicesDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Delete_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,9 +107,9 @@ public async Task Delete_NetworkDevicesDeleteMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); @@ -124,7 +124,7 @@ public async Task Delete_NetworkDevicesDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkDevices_NetworkDevicesListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDevices_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetNetworkDevices_NetworkDevicesListBySubscriptionMaximumSetGe // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -151,13 +151,13 @@ public async Task GetNetworkDevices_NetworkDevicesListBySubscriptionMaximumSetGe Console.WriteLine($"Succeeded"); } - // NetworkDevices_reboot_MaximumSet_Gen + // NetworkDevices_Reboot_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reboot_NetworkDevicesRebootMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_reboot_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_reboot" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Reboot_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkDevices_Reboot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -166,80 +166,30 @@ public async Task Reboot_NetworkDevicesRebootMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); // invoke the operation - await networkDevice.RebootAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // NetworkDevices_restoreConfig_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task RestoreConfig_NetworkDevicesRestoreConfigMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_restoreConfig_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_restoreConfig" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkDeviceResource created on azure - // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); - NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - - // invoke the operation - await networkDevice.RestoreConfigAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // NetworkDevices_updateVersion_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateVersion_NetworkDevicesUpdateVersionMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updateVersion_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_updateVersion" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkDeviceResource created on azure - // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); - NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); - - // invoke the operation - UpdateVersionProperties body = new UpdateVersionProperties("DefaultSku"); - await networkDevice.UpdateVersionAsync(WaitUntil.Completed, body); + NetworkDeviceRebootContent content = new NetworkDeviceRebootContent() + { + RebootType = NetworkDeviceRebootType.GracefulRebootWithZtp, + }; + ArmOperation lro = await networkDevice.RebootAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } - // NetworkDevices_generateSupportPackage_MaximumSet_Gen + // NetworkDevices_RefreshConfiguration_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GenerateSupportPackage_NetworkDevicesGenerateSupportPackageMaximumSetGen() + public async Task RefreshConfiguration_NetworkDevicesRefreshConfigurationMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_generateSupportPackage_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_generateSupportPackage" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_RefreshConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkDevices_RefreshConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -248,26 +198,26 @@ public async Task GenerateSupportPackage_NetworkDevicesGenerateSupportPackageMax // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); // invoke the operation - ArmOperation lro = await networkDevice.GenerateSupportPackageAsync(WaitUntil.Completed); - SupportPackageProperties result = lro.Value; + ArmOperation lro = await networkDevice.RefreshConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } - // NetworkDevices_updatePowerCycle_MaximumSet_Gen + // NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdatePowerCycle_NetworkDevicesUpdatePowerCycleMaximumSetGen() + public async Task UpdateAdministrativeState_NetworkDevicesUpdateAdministrativeStateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_updatePowerCycle_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_updatePowerCycle" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkDevices_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -276,26 +226,34 @@ public async Task UpdatePowerCycle_NetworkDevicesUpdatePowerCycleMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); // invoke the operation - UpdatePowerCycleProperties body = new UpdatePowerCycleProperties(PowerEnd.Primary, State.On); - await networkDevice.UpdatePowerCycleAsync(WaitUntil.Completed, body); + UpdateDeviceAdministrativeStateContent content = new UpdateDeviceAdministrativeStateContent() + { + State = NetworkDeviceAdministrativeState.Rma, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkDevice.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } - // NetworkDevices_getStatus_MaximumSet_Gen + // NetworkDevices_Upgrade_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetStatus_NetworkDevicesGetStatusMaximumSetGen() + public async Task Upgrade_NetworkDevicesUpgradeMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDevices_getStatus_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkDevices_getStatus" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDevices_Upgrade_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkDevices_Upgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -304,15 +262,19 @@ public async Task GetStatus_NetworkDevicesGetStatusMaximumSetGen() // this example assumes you already have this NetworkDeviceResource created on azure // for more information of creating NetworkDeviceResource, please refer to the document of NetworkDeviceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkDeviceName = "example-device"; ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); NetworkDeviceResource networkDevice = client.GetNetworkDeviceResource(networkDeviceResourceId); // invoke the operation - ArmOperation lro = await networkDevice.GetStatusAsync(WaitUntil.Completed); - GetDeviceStatusProperties result = lro.Value; + NetworkFabricUpdateVersionContent content = new NetworkFabricUpdateVersionContent() + { + Version = "1.0.0", + }; + ArmOperation lro = await networkDevice.UpgradeAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuCollection.cs index 65ac0b6906c18..ad3e42816a0ef 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NetworkDeviceSkuCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkDeviceSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDeviceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +32,7 @@ public async Task Get_NetworkDeviceSkusGetMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -40,7 +40,7 @@ public async Task Get_NetworkDeviceSkusGetMaximumSetGen() NetworkDeviceSkuCollection collection = subscriptionResource.GetNetworkDeviceSkus(); // invoke the operation - string networkDeviceSkuName = "DefaultSku"; + string networkDeviceSkuName = "example-deviceSku"; NetworkDeviceSkuResource result = await collection.GetAsync(networkDeviceSkuName); // the variable result is a resource, you could call other operations on this instance as well @@ -55,7 +55,7 @@ public async Task Get_NetworkDeviceSkusGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkDeviceSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDeviceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Exists_NetworkDeviceSkusGetMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -73,7 +73,7 @@ public async Task Exists_NetworkDeviceSkusGetMaximumSetGen() NetworkDeviceSkuCollection collection = subscriptionResource.GetNetworkDeviceSkus(); // invoke the operation - string networkDeviceSkuName = "DefaultSku"; + string networkDeviceSkuName = "example-deviceSku"; bool result = await collection.ExistsAsync(networkDeviceSkuName); Console.WriteLine($"Succeeded: {result}"); @@ -84,7 +84,7 @@ public async Task Exists_NetworkDeviceSkusGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkDeviceSkusListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDeviceSkus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task GetAll_NetworkDeviceSkusListBySubscriptionMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuResource.cs index 09fa935689401..0439a2be1a29a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkDeviceSkuResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkDeviceSkuResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkDeviceSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkDeviceSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkDeviceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,8 +31,8 @@ public async Task Get_NetworkDeviceSkusGetMaximumSetGen() // this example assumes you already have this NetworkDeviceSkuResource created on azure // for more information of creating NetworkDeviceSkuResource, please refer to the document of NetworkDeviceSkuResource - string subscriptionId = "subscriptionId"; - string networkDeviceSkuName = "DefaultSku"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string networkDeviceSkuName = "example-deviceSku"; ResourceIdentifier networkDeviceSkuResourceId = NetworkDeviceSkuResource.CreateResourceIdentifier(subscriptionId, networkDeviceSkuName); NetworkDeviceSkuResource networkDeviceSku = client.GetNetworkDeviceSkuResource(networkDeviceSkuResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs similarity index 58% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs index 6947c4629a679..8e0c60b163d1d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_AccessControlListCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_AccessControlListCollection + public partial class Sample_NetworkFabricAccessControlListCollection { - // AccessControlLists_Create_MinimumSet_Gen + // AccessControlLists_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_AccessControlListsCreateMinimumSetGen() + public async Task CreateOrUpdate_AccessControlListsCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Create_MinimumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Create_MaximumSet_Gen.json // this example is just showing the usage of "AccessControlLists_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,36 +34,173 @@ public async Task CreateOrUpdate_AccessControlListsCreateMinimumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this AccessControlListResource - AccessControlListCollection collection = resourceGroupResource.GetAccessControlLists(); + // get the collection of this NetworkFabricAccessControlListResource + NetworkFabricAccessControlListCollection collection = resourceGroupResource.GetNetworkFabricAccessControlLists(); // invoke the operation - string accessControlListName = "aclOne"; - AccessControlListData data = new AccessControlListData(new AzureLocation("EastUs"), AddressFamily.IPv4, new AccessControlListConditionProperties[] + string accessControlListName = "example-acl"; + NetworkFabricAccessControlListData data = new NetworkFabricAccessControlListData(new AzureLocation("eastUs")) { -new AccessControlListConditionProperties(3,ConditionActionType.Allow,"1.1.1.1","21","2.2.2.2","65000",6) - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accessControlListName, data); - AccessControlListResource result = lro.Value; + Annotation = "annotation", + ConfigurationType = NetworkFabricConfigurationType.File, + AclsUri = new Uri("https://ACL-Storage-URL"), + MatchConfigurations = +{ +new AccessControlListMatchConfiguration() +{ +MatchConfigurationName = "example-match", +SequenceNumber = 123, +IPAddressType = NetworkFabricIPAddressType.IPv4, +MatchConditions = +{ +new AccessControlListMatchCondition() +{ +EtherTypes = +{ +"0x1" +}, +Fragments = +{ +"0xff00-0xffff" +}, +IPLengths = +{ +"4094-9214" +}, +TtlValues = +{ +"23" +}, +DscpMarkings = +{ +"32" +}, +PortCondition = new AccessControlListPortCondition(Layer4Protocol.Tcp) +{ +Flags = +{ +"established" +}, +PortType = NetworkFabricPortType.SourcePort, +Ports = +{ +"1-20" +}, +PortGroupNames = +{ +"example-portGroup" +}, +}, +ProtocolTypes = +{ +"TCP" +}, +VlanMatchCondition = new VlanMatchCondition() +{ +Vlans = +{ +"20-30" +}, +InnerVlans = +{ +"30" +}, +VlanGroupNames = +{ +"example-vlanGroup" +}, +}, +IPCondition = new IPMatchCondition() +{ +SourceDestinationType = SourceDestinationType.SourceIP, +PrefixType = IPMatchConditionPrefixType.Prefix, +IPPrefixValues = +{ +"10.20.20.20/12" +}, +IPGroupNames = +{ +"example-ipGroup" +}, +}, +} +}, +Actions = +{ +new AccessControlListAction() +{ +AclActionType = AclActionType.Count, +CounterName = "example-counter", +} +}, +} +}, + DynamicMatchConfigurations = +{ +new CommonDynamicMatchConfiguration() +{ +IPGroups = +{ +new MatchConfigurationIPGroupProperties() +{ +Name = "example-ipGroup", +IPAddressType = NetworkFabricIPAddressType.IPv4, +IPPrefixes = +{ +"10.20.3.1/20" +}, +} +}, +VlanGroups = +{ +new VlanGroupProperties() +{ +Name = "example-vlanGroup", +Vlans = +{ +"20-30" +}, +} +}, +PortGroups = +{ +new PortGroupProperties() +{ +Name = "example-portGroup", +Ports = +{ +"100-200" +}, +} +}, +} +}, + Tags = +{ +["keyID"] = "KeyValue", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accessControlListName, data); + NetworkFabricAccessControlListResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = result.Data; + NetworkFabricAccessControlListData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // AccessControlLists_Get_MinimumSet_Gen + // AccessControlLists_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_AccessControlListsGetMinimumSetGen() + public async Task Get_AccessControlListsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json // this example is just showing the usage of "AccessControlLists_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,31 +210,31 @@ public async Task Get_AccessControlListsGetMinimumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this AccessControlListResource - AccessControlListCollection collection = resourceGroupResource.GetAccessControlLists(); + // get the collection of this NetworkFabricAccessControlListResource + NetworkFabricAccessControlListCollection collection = resourceGroupResource.GetNetworkFabricAccessControlLists(); // invoke the operation - string accessControlListName = "aclOne"; - AccessControlListResource result = await collection.GetAsync(accessControlListName); + string accessControlListName = "example-acl"; + NetworkFabricAccessControlListResource result = await collection.GetAsync(accessControlListName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = result.Data; + NetworkFabricAccessControlListData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // AccessControlLists_Get_MinimumSet_Gen + // AccessControlLists_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_AccessControlListsGetMinimumSetGen() + public async Task Exists_AccessControlListsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_Get_MinimumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json // this example is just showing the usage of "AccessControlLists_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,27 +244,27 @@ public async Task Exists_AccessControlListsGetMinimumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this AccessControlListResource - AccessControlListCollection collection = resourceGroupResource.GetAccessControlLists(); + // get the collection of this NetworkFabricAccessControlListResource + NetworkFabricAccessControlListCollection collection = resourceGroupResource.GetNetworkFabricAccessControlLists(); // invoke the operation - string accessControlListName = "aclOne"; + string accessControlListName = "example-acl"; bool result = await collection.ExistsAsync(accessControlListName); Console.WriteLine($"Succeeded: {result}"); } - // AccessControlLists_ListByResourceGroup_MinimumSet_Gen + // AccessControlLists_ListByResourceGroup_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_AccessControlListsListByResourceGroupMinimumSetGen() + public async Task GetAll_AccessControlListsListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/AccessControlLists_ListByResourceGroup_MinimumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "AccessControlLists_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,20 +274,20 @@ public async Task GetAll_AccessControlListsListByResourceGroupMinimumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this AccessControlListResource - AccessControlListCollection collection = resourceGroupResource.GetAccessControlLists(); + // get the collection of this NetworkFabricAccessControlListResource + NetworkFabricAccessControlListCollection collection = resourceGroupResource.GetNetworkFabricAccessControlLists(); // invoke the operation and iterate over the result - await foreach (AccessControlListResource item in collection.GetAllAsync()) + await foreach (NetworkFabricAccessControlListResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - AccessControlListData resourceData = item.Data; + NetworkFabricAccessControlListData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs new file mode 100644 index 0000000000000..3398d33a14c33 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricAccessControlListResource.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricAccessControlListResource + { + // AccessControlLists_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_AccessControlListsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + NetworkFabricAccessControlListResource result = await networkFabricAccessControlList.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricAccessControlListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AccessControlLists_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_AccessControlListsUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + NetworkFabricAccessControlListPatch patch = new NetworkFabricAccessControlListPatch() + { + ConfigurationType = NetworkFabricConfigurationType.File, + AclsUri = new Uri("https://microsoft.com/a"), + MatchConfigurations = +{ +new AccessControlListMatchConfiguration() +{ +MatchConfigurationName = "example-match", +SequenceNumber = 123, +IPAddressType = NetworkFabricIPAddressType.IPv4, +MatchConditions = +{ +new AccessControlListMatchCondition() +{ +EtherTypes = +{ +"0x1" +}, +Fragments = +{ +"0xff00-0xffff" +}, +IPLengths = +{ +"4094-9214" +}, +TtlValues = +{ +"23" +}, +DscpMarkings = +{ +"32" +}, +PortCondition = new AccessControlListPortCondition(Layer4Protocol.Tcp) +{ +Flags = +{ +"established" +}, +PortType = NetworkFabricPortType.SourcePort, +Ports = +{ +"1-20" +}, +PortGroupNames = +{ +"example-portGroup" +}, +}, +ProtocolTypes = +{ +"TCP" +}, +VlanMatchCondition = new VlanMatchCondition() +{ +Vlans = +{ +"20-30" +}, +InnerVlans = +{ +"30" +}, +VlanGroupNames = +{ +"example-vlanGroup" +}, +}, +IPCondition = new IPMatchCondition() +{ +SourceDestinationType = SourceDestinationType.SourceIP, +PrefixType = IPMatchConditionPrefixType.Prefix, +IPPrefixValues = +{ +"10.20.20.20/12" +}, +IPGroupNames = +{ +"example-ipGroup" +}, +}, +} +}, +Actions = +{ +new AccessControlListAction() +{ +AclActionType = AclActionType.Count, +CounterName = "example-counter", +} +}, +} +}, + DynamicMatchConfigurations = +{ +new CommonDynamicMatchConfiguration() +{ +IPGroups = +{ +new MatchConfigurationIPGroupProperties() +{ +Name = "example-ipGroup", +IPAddressType = NetworkFabricIPAddressType.IPv4, +IPPrefixes = +{ +"10.20.3.1/20" +}, +} +}, +VlanGroups = +{ +new VlanGroupProperties() +{ +Name = "example-vlanGroup", +Vlans = +{ +"20-30" +}, +} +}, +PortGroups = +{ +new PortGroupProperties() +{ +Name = "example-portGroup", +Ports = +{ +"100-200" +}, +} +}, +} +}, + Annotation = "annotation", + Tags = +{ +["keyID"] = "KeyValue", +}, + }; + ArmOperation lro = await networkFabricAccessControlList.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricAccessControlListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricAccessControlListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // AccessControlLists_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_AccessControlListsDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + await networkFabricAccessControlList.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // AccessControlLists_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricAccessControlLists_AccessControlListsListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricAccessControlListResource item in subscriptionResource.GetNetworkFabricAccessControlListsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricAccessControlListData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_AccessControlListsUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricAccessControlList.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // AccessControlLists_Resync_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resync_AccessControlListsResyncMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_Resync_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_Resync" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricAccessControlList.ResyncAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // AccessControlLists_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_AccessControlListsValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/AccessControlLists_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "AccessControlLists_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricAccessControlListResource created on azure + // for more information of creating NetworkFabricAccessControlListResource, please refer to the document of NetworkFabricAccessControlListResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string accessControlListName = "example-acl"; + ResourceIdentifier networkFabricAccessControlListResourceId = NetworkFabricAccessControlListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accessControlListName); + NetworkFabricAccessControlListResource networkFabricAccessControlList = client.GetNetworkFabricAccessControlListResource(networkFabricAccessControlListResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricAccessControlList.ValidateConfigurationAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs index 93de745e86879..bdd53f8e3167e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_NetworkFabricCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,8 +34,8 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -43,69 +43,120 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() NetworkFabricCollection collection = resourceGroupResource.GetNetworkFabrics(); // invoke the operation - string networkFabricName = "FabricName"; - NetworkFabricData data = new NetworkFabricData(new AzureLocation("eastuseuap")) + string networkFabricName = "example-fabric"; + NetworkFabricData data = new NetworkFabricData(new AzureLocation("eastuseuap"), "M4-A400-A100-C16-aa", new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/example-fabricController"), 8, "10.18.0.0/19", 29249, new TerminalServerConfiguration() { - Annotation = "annotationValue", - NetworkFabricSku = "M4-A400-A100-C16-aa", - RackCount = 4, - ServerCountPerRack = 8, - IPv4Prefix = "10.18.0.0/19", - IPv6Prefix = "3FFE:FFFF:0:CD40::/59", - FabricASN = 29249, - NetworkFabricControllerId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/fabricControllerName", - TerminalServerConfiguration = new TerminalServerConfiguration() - { - Username = "username", - Password = "xxxx", - SerialNumber = "123456", - PrimaryIPv4Prefix = "20.0.0.12/30", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a8/126", - SecondaryIPv4Prefix = "20.0.0.13/30", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::ac/126", - }, - ManagementNetworkConfiguration = new ManagementNetworkConfiguration(new VpnConfigurationProperties(PeeringOption.OptionA) - { - OptionBProperties = new NetworkFabricOptionBProperties(new string[] + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.13/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + Username = "username", + Password = "xxxx", + SerialNumber = "123456", + }, new ManagementNetworkConfigurationProperties(new VpnConfigurationProperties(PeeringOption.OptionA) { + NetworkToNetworkInterconnectId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni"), + OptionBProperties = new OptionBProperties() + { + ImportRouteTargets = +{ +"65046:10050" +}, + ExportRouteTargets = +{ +"65046:10050" +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ "65046:10039" - }, new string[] - { +}, + ImportIPv6RouteTargets = +{ "65046:10039" - }), - OptionAProperties = new NetworkFabricOptionAProperties() - { - Mtu = 5892, - VlanId = 2724, - PeerASN = 42666, - PrimaryIPv4Prefix = "20.0.0.12/30", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a8/126", - SecondaryIPv4Prefix = "20.0.0.13/30", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::ac/126", +}, + ExportIPv4RouteTargets = +{ +"65046:10039" +}, + ExportIPv6RouteTargets = +{ +"65046:10039" +}, }, - }, new VpnConfigurationProperties(PeeringOption.OptionA) + }, + OptionAProperties = new VpnConfigurationOptionAProperties() { - OptionBProperties = new NetworkFabricOptionBProperties(new string[] + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.13/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + Mtu = 1501, + VlanId = 3001, + PeerAsn = 1235, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 10, + }, + }, + }, new VpnConfigurationProperties(PeeringOption.OptionA) { + NetworkToNetworkInterconnectId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni"), + OptionBProperties = new OptionBProperties() + { + ImportRouteTargets = +{ "65046:10050" - }, new string[] - { +}, + ExportRouteTargets = +{ "65046:10050" - }), - OptionAProperties = new NetworkFabricOptionAProperties() +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ +"65046:10039" +}, + ImportIPv6RouteTargets = +{ +"65046:10039" +}, + ExportIPv4RouteTargets = +{ +"65046:10039" +}, + ExportIPv6RouteTargets = +{ +"65046:10039" +}, + }, + }, + OptionAProperties = new VpnConfigurationOptionAProperties() + { + PrimaryIPv4Prefix = "10.0.0.14/30", + PrimaryIPv6Prefix = "2FFE:FFFF:0:CD30::a7/126", + SecondaryIPv4Prefix = "10.0.0.15/30", + SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/126", + Mtu = 1500, + VlanId = 3000, + PeerAsn = 61234, + BfdConfiguration = new BfdConfiguration() { - Mtu = 5892, - VlanId = 2724, - PeerASN = 42666, - PrimaryIPv4Prefix = "10.0.0.14/30", - PrimaryIPv6Prefix = "2FFE:FFFF:0:CD30::a7/126", - SecondaryIPv4Prefix = "10.0.0.15/30", - SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/126", + IntervalInMilliSeconds = 300, + Multiplier = 5, }, - }), + }, + })) + { + Annotation = "annotation", + RackCount = 4, + IPv6Prefix = "3FFE:FFFF:0:CD40::/59", Tags = { -["key6468"] = "", +["keyID"] = "keyValue", }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkFabricName, data); @@ -123,7 +174,7 @@ public async Task CreateOrUpdate_NetworkFabricsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,8 +184,8 @@ public async Task Get_NetworkFabricsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -142,7 +193,7 @@ public async Task Get_NetworkFabricsGetMaximumSetGen() NetworkFabricCollection collection = resourceGroupResource.GetNetworkFabrics(); // invoke the operation - string networkFabricName = "FabricName"; + string networkFabricName = "example-fabric"; NetworkFabricResource result = await collection.GetAsync(networkFabricName); // the variable result is a resource, you could call other operations on this instance as well @@ -157,7 +208,7 @@ public async Task Get_NetworkFabricsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkFabricsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,8 +218,8 @@ public async Task Exists_NetworkFabricsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -176,7 +227,7 @@ public async Task Exists_NetworkFabricsGetMaximumSetGen() NetworkFabricCollection collection = resourceGroupResource.GetNetworkFabrics(); // invoke the operation - string networkFabricName = "FabricName"; + string networkFabricName = "example-fabric"; bool result = await collection.ExistsAsync(networkFabricName); Console.WriteLine($"Succeeded: {result}"); @@ -187,7 +238,7 @@ public async Task Exists_NetworkFabricsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkFabricsListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,8 +248,8 @@ public async Task GetAll_NetworkFabricsListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgNetworkFabrics"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerCollection.cs index 80cd6d88a6702..86981835ef98b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_NetworkFabricControllerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkFabricControllersCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,8 +34,8 @@ public async Task CreateOrUpdate_NetworkFabricControllersCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -43,20 +43,20 @@ public async Task CreateOrUpdate_NetworkFabricControllersCreateMaximumSetGen() NetworkFabricControllerCollection collection = resourceGroupResource.GetNetworkFabricControllers(); // invoke the operation - string networkFabricControllerName = "NetworkControllerName"; + string networkFabricControllerName = "example-networkController"; NetworkFabricControllerData data = new NetworkFabricControllerData(new AzureLocation("eastus")) { - Annotation = "lab 1", + Annotation = "annotation", InfrastructureExpressRouteConnections = { -new ExpressRouteConnectionInformation("/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") +new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) { -ExpressRouteAuthorizationKey = "xxxxxxx", +ExpressRouteAuthorizationKey = "1234ABCD-0A1B-1234-5678-123456ABCDEF", } }, WorkloadExpressRouteConnections = { -new ExpressRouteConnectionInformation("/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") +new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) { ExpressRouteAuthorizationKey = "xxxxx", } @@ -66,7 +66,10 @@ public async Task CreateOrUpdate_NetworkFabricControllersCreateMaximumSetGen() Name = "managedResourceGroupName", Location = new AzureLocation("eastus"), }, + IsWorkloadManagementNetworkEnabled = IsWorkloadManagementNetworkEnabled.True, IPv4AddressSpace = "172.253.0.0/19", + IPv6AddressSpace = "::/60", + NfcSku = NetworkFabricControllerSKU.Standard, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkFabricControllerName, data); NetworkFabricControllerResource result = lro.Value; @@ -83,7 +86,7 @@ public async Task CreateOrUpdate_NetworkFabricControllersCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricControllersGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,8 +96,8 @@ public async Task Get_NetworkFabricControllersGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -102,7 +105,7 @@ public async Task Get_NetworkFabricControllersGetMaximumSetGen() NetworkFabricControllerCollection collection = resourceGroupResource.GetNetworkFabricControllers(); // invoke the operation - string networkFabricControllerName = "networkFabricControllerName"; + string networkFabricControllerName = "example-networkController"; NetworkFabricControllerResource result = await collection.GetAsync(networkFabricControllerName); // the variable result is a resource, you could call other operations on this instance as well @@ -117,7 +120,7 @@ public async Task Get_NetworkFabricControllersGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkFabricControllersGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,8 +130,8 @@ public async Task Exists_NetworkFabricControllersGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -136,7 +139,7 @@ public async Task Exists_NetworkFabricControllersGetMaximumSetGen() NetworkFabricControllerCollection collection = resourceGroupResource.GetNetworkFabricControllers(); // invoke the operation - string networkFabricControllerName = "networkFabricControllerName"; + string networkFabricControllerName = "example-networkController"; bool result = await collection.ExistsAsync(networkFabricControllerName); Console.WriteLine($"Succeeded: {result}"); @@ -147,7 +150,7 @@ public async Task Exists_NetworkFabricControllersGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkFabricControllersListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,8 +160,8 @@ public async Task GetAll_NetworkFabricControllersListByResourceGroupMaximumSetGe // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerResource.cs index e63e9b18976c9..84920ca6c1a07 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricControllerResource.cs @@ -24,7 +24,7 @@ public partial class Sample_NetworkFabricControllerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricControllersGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,9 +34,9 @@ public async Task Get_NetworkFabricControllersGetMaximumSetGen() // this example assumes you already have this NetworkFabricControllerResource created on azure // for more information of creating NetworkFabricControllerResource, please refer to the document of NetworkFabricControllerResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricControllerName = "networkFabricControllerName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricControllerName = "example-networkController"; ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricControllerName); NetworkFabricControllerResource networkFabricController = client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); @@ -55,7 +55,7 @@ public async Task Get_NetworkFabricControllersGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkFabricControllersUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,18 +65,25 @@ public async Task Update_NetworkFabricControllersUpdateMaximumSetGen() // this example assumes you already have this NetworkFabricControllerResource created on azure // for more information of creating NetworkFabricControllerResource, please refer to the document of NetworkFabricControllerResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricControllerName = "networkFabricControllerName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricControllerName = "example-networkController"; ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricControllerName); NetworkFabricControllerResource networkFabricController = client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); // invoke the operation NetworkFabricControllerPatch patch = new NetworkFabricControllerPatch() { + InfrastructureExpressRouteConnections = +{ +new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) +{ +ExpressRouteAuthorizationKey = "xxxxxxx", +} +}, WorkloadExpressRouteConnections = { -new ExpressRouteConnectionInformation("/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") +new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) { ExpressRouteAuthorizationKey = "xxxxxxx", } @@ -97,7 +104,7 @@ public async Task Update_NetworkFabricControllersUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkFabricControllersDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_Delete_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,9 +114,9 @@ public async Task Delete_NetworkFabricControllersDeleteMaximumSetGen() // this example assumes you already have this NetworkFabricControllerResource created on azure // for more information of creating NetworkFabricControllerResource, please refer to the document of NetworkFabricControllerResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricControllerName = "networkFabricControllerName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricControllerName = "example-networkController"; ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricControllerName); NetworkFabricControllerResource networkFabricController = client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); @@ -124,7 +131,7 @@ public async Task Delete_NetworkFabricControllersDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkFabricControllers_NetworkFabricControllersListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricControllers_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricControllers_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +141,7 @@ public async Task GetNetworkFabricControllers_NetworkFabricControllersListBySubs // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -150,59 +157,5 @@ public async Task GetNetworkFabricControllers_NetworkFabricControllersListBySubs Console.WriteLine($"Succeeded"); } - - // NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task EnableWorkloadManagementNetwork_NetworkFabricControllersEnableWorkloadManagementNetworkMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_enableWorkloadManagementNetwork_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkFabricControllers_enableWorkloadManagementNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkFabricControllerResource created on azure - // for more information of creating NetworkFabricControllerResource, please refer to the document of NetworkFabricControllerResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricControllerName = "networkFabricControllerName"; - ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricControllerName); - NetworkFabricControllerResource networkFabricController = client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); - - // invoke the operation - await networkFabricController.EnableWorkloadManagementNetworkAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task DisableWorkloadManagementNetwork_NetworkFabricControllersDisableWorkloadManagementNetworkMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_disableWorkloadManagementNetwork_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkFabricControllers_disableWorkloadManagementNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkFabricControllerResource created on azure - // for more information of creating NetworkFabricControllerResource, please refer to the document of NetworkFabricControllerResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricControllerName = "networkFabricControllerName"; - ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricControllerName); - NetworkFabricControllerResource networkFabricController = client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); - - // invoke the operation - await networkFabricController.DisableWorkloadManagementNetworkAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs new file mode 100644 index 0000000000000..82d8cdd5bdcc5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkCollection.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricExternalNetworkCollection + { + // ExternalNetworks_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ExternalNetworksCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricExternalNetworkResource + NetworkFabricExternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricExternalNetworks(); + + // invoke the operation + string externalNetworkName = "example-externalnetwork"; + NetworkFabricExternalNetworkData data = new NetworkFabricExternalNetworkData(PeeringOption.OptionA) + { + Annotation = "annotation", + ImportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportRoutePolicy = new ImportRoutePolicy() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + ExportRoutePolicy = new ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + OptionBProperties = new L3OptionBProperties() + { + ImportRouteTargets = +{ +"65046:10039" +}, + ExportRouteTargets = +{ +"65046:10039" +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ +"65046:10039" +}, + ImportIPv6RouteTargets = +{ +"65046:10039" +}, + ExportIPv4RouteTargets = +{ +"65046:10039" +}, + ExportIPv6RouteTargets = +{ +"65046:10039" +}, + }, + }, + OptionAProperties = new ExternalNetworkOptionAProperties() + { + Mtu = 1500, + VlanId = 1001, + PeerAsn = 65047, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + PrimaryIPv4Prefix = "10.1.1.0/30", + PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", + SecondaryIPv4Prefix = "10.1.1.4/30", + SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, externalNetworkName, data); + NetworkFabricExternalNetworkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricExternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ExternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ExternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "42EEDB3B-8E17-46E3-B0B4-B1CD9842D90D"; + string resourceGroupName = "rgL3IsolationDomains"; + string l3IsolationDomainName = "yhtr"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricExternalNetworkResource + NetworkFabricExternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricExternalNetworks(); + + // invoke the operation + string externalNetworkName = "fltpszzikbalrzaqq"; + NetworkFabricExternalNetworkResource result = await collection.GetAsync(externalNetworkName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricExternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ExternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ExternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "42EEDB3B-8E17-46E3-B0B4-B1CD9842D90D"; + string resourceGroupName = "rgL3IsolationDomains"; + string l3IsolationDomainName = "yhtr"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricExternalNetworkResource + NetworkFabricExternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricExternalNetworks(); + + // invoke the operation + string externalNetworkName = "fltpszzikbalrzaqq"; + bool result = await collection.ExistsAsync(externalNetworkName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ExternalNetworksListByL3IsolationDomainMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_ListByL3IsolationDomain" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricExternalNetworkResource + NetworkFabricExternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricExternalNetworks(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricExternalNetworkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricExternalNetworkData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs new file mode 100644 index 0000000000000..d07204c365933 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricExternalNetworkResource.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricExternalNetworkResource + { + // ExternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ExternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricExternalNetworkResource created on azure + // for more information of creating NetworkFabricExternalNetworkResource, please refer to the document of NetworkFabricExternalNetworkResource + string subscriptionId = "42EEDB3B-8E17-46E3-B0B4-B1CD9842D90D"; + string resourceGroupName = "rgL3IsolationDomains"; + string l3IsolationDomainName = "yhtr"; + string externalNetworkName = "fltpszzikbalrzaqq"; + ResourceIdentifier networkFabricExternalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); + NetworkFabricExternalNetworkResource networkFabricExternalNetwork = client.GetNetworkFabricExternalNetworkResource(networkFabricExternalNetworkResourceId); + + // invoke the operation + NetworkFabricExternalNetworkResource result = await networkFabricExternalNetwork.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricExternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ExternalNetworks_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ExternalNetworksUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricExternalNetworkResource created on azure + // for more information of creating NetworkFabricExternalNetworkResource, please refer to the document of NetworkFabricExternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string externalNetworkName = "example-externalnetwork"; + ResourceIdentifier networkFabricExternalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); + NetworkFabricExternalNetworkResource networkFabricExternalNetwork = client.GetNetworkFabricExternalNetworkResource(networkFabricExternalNetworkResourceId); + + // invoke the operation + NetworkFabricExternalNetworkPatch patch = new NetworkFabricExternalNetworkPatch() + { + Annotation = "annotation1", + ImportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportRoutePolicy = new ImportRoutePolicy() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + ExportRoutePolicy = new ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + PeeringOption = PeeringOption.OptionA, + OptionBProperties = new L3OptionBProperties() + { + ImportRouteTargets = +{ +"65046:10039" +}, + ExportRouteTargets = +{ +"65046:10039" +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ +"65046:10039" +}, + ImportIPv6RouteTargets = +{ +"65046:10039" +}, + ExportIPv4RouteTargets = +{ +"65046:10039" +}, + ExportIPv6RouteTargets = +{ +"65046:10039" +}, + }, + }, + OptionAProperties = new ExternalNetworkPatchOptionAProperties() + { + Mtu = 1500, + VlanId = 1001, + PeerAsn = 65047, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + PrimaryIPv4Prefix = "10.1.1.0/30", + PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", + SecondaryIPv4Prefix = "10.1.1.4/30", + SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", + }, + }; + ArmOperation lro = await networkFabricExternalNetwork.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricExternalNetworkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricExternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ExternalNetworks_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ExternalNetworksDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricExternalNetworkResource created on azure + // for more information of creating NetworkFabricExternalNetworkResource, please refer to the document of NetworkFabricExternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string externalNetworkName = "example-externalnetwork"; + ResourceIdentifier networkFabricExternalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); + NetworkFabricExternalNetworkResource networkFabricExternalNetwork = client.GetNetworkFabricExternalNetworkResource(networkFabricExternalNetworkResourceId); + + // invoke the operation + await networkFabricExternalNetwork.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_ExternalNetworksUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricExternalNetworkResource created on azure + // for more information of creating NetworkFabricExternalNetworkResource, please refer to the document of NetworkFabricExternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string externalNetworkName = "example-externalnetwork"; + ResourceIdentifier networkFabricExternalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); + NetworkFabricExternalNetworkResource networkFabricExternalNetwork = client.GetNetworkFabricExternalNetworkResource(networkFabricExternalNetworkResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricExternalNetwork.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateStaticRouteBfdAdministrativeState_ExternalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/ExternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "ExternalNetworks_UpdateStaticRouteBfdAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricExternalNetworkResource created on azure + // for more information of creating NetworkFabricExternalNetworkResource, please refer to the document of NetworkFabricExternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string externalNetworkName = "example-externalnetwork"; + ResourceIdentifier networkFabricExternalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName); + NetworkFabricExternalNetworkResource networkFabricExternalNetwork = client.GetNetworkFabricExternalNetworkResource(networkFabricExternalNetworkResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricExternalNetwork.UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs similarity index 72% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs index 889603eeeaeb1..3a04f6959fb3a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPCommunityCollection + public partial class Sample_NetworkFabricIPCommunityCollection { // IpCommunities_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_IpCommunitiesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Create_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,39 +34,43 @@ public async Task CreateOrUpdate_IpCommunitiesCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpCommunityLists"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPCommunityResource - IPCommunityCollection collection = resourceGroupResource.GetIPCommunities(); + // get the collection of this NetworkFabricIPCommunityResource + NetworkFabricIPCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPCommunities(); // invoke the operation - string ipCommunityName = "example-ipCommunity"; - IPCommunityData data = new IPCommunityData(new AzureLocation("EastUS")) + string ipCommunityName = "example-ipcommunity"; + NetworkFabricIPCommunityData data = new NetworkFabricIPCommunityData(new AzureLocation("eastus")) { - Annotation = "annotationValue", - Action = CommunityActionType.Permit, - WellKnownCommunities = + Annotation = "annotation", + IPCommunityRules = { -WellKnownCommunity.Internet,WellKnownCommunity.LocalAS,WellKnownCommunity.NoExport,WellKnownCommunity.GShut -}, - CommunityMembers = +new IPCommunityRule(CommunityActionType.Permit,4155123341,new string[] +{ +"1:1" +}) +{ +WellKnownCommunities = { -"1234:5678" +WellKnownCommunity.Internet +}, +} }, Tags = { -["key2814"] = "", +["keyId"] = "KeyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipCommunityName, data); - IPCommunityResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipCommunityName, data); + NetworkFabricIPCommunityResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = result.Data; + NetworkFabricIPCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -76,7 +80,7 @@ public async Task CreateOrUpdate_IpCommunitiesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,21 +90,21 @@ public async Task Get_IpCommunitiesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPCommunityResource - IPCommunityCollection collection = resourceGroupResource.GetIPCommunities(); + // get the collection of this NetworkFabricIPCommunityResource + NetworkFabricIPCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPCommunities(); // invoke the operation - string ipCommunityName = "example-ipCommunity"; - IPCommunityResource result = await collection.GetAsync(ipCommunityName); + string ipCommunityName = "example-ipcommunity"; + NetworkFabricIPCommunityResource result = await collection.GetAsync(ipCommunityName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = result.Data; + NetworkFabricIPCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -110,7 +114,7 @@ public async Task Get_IpCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_IpCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,16 +124,16 @@ public async Task Exists_IpCommunitiesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPCommunityResource - IPCommunityCollection collection = resourceGroupResource.GetIPCommunities(); + // get the collection of this NetworkFabricIPCommunityResource + NetworkFabricIPCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPCommunities(); // invoke the operation - string ipCommunityName = "example-ipCommunity"; + string ipCommunityName = "example-ipcommunity"; bool result = await collection.ExistsAsync(ipCommunityName); Console.WriteLine($"Succeeded: {result}"); @@ -140,7 +144,7 @@ public async Task Exists_IpCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_IpCommunitiesListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,20 +154,20 @@ public async Task GetAll_IpCommunitiesListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPCommunityResource - IPCommunityCollection collection = resourceGroupResource.GetIPCommunities(); + // get the collection of this NetworkFabricIPCommunityResource + NetworkFabricIPCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPCommunities(); // invoke the operation and iterate over the result - await foreach (IPCommunityResource item in collection.GetAllAsync()) + await foreach (NetworkFabricIPCommunityResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = item.Data; + NetworkFabricIPCommunityData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs similarity index 59% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs index d8bede7da7483..d3d5c2840ee96 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPCommunityResource.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPCommunityResource + public partial class Sample_NetworkFabricIPCommunityResource { // IpCommunities_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,20 +32,20 @@ public async Task Get_IpCommunitiesGetMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPCommunityResource created on azure - // for more information of creating IPCommunityResource, please refer to the document of IPCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string ipCommunityName = "example-ipCommunity"; - ResourceIdentifier ipCommunityResourceId = IPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); - IPCommunityResource ipCommunity = client.GetIPCommunityResource(ipCommunityResourceId); + // this example assumes you already have this NetworkFabricIPCommunityResource created on azure + // for more information of creating NetworkFabricIPCommunityResource, please refer to the document of NetworkFabricIPCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipCommunityName = "example-ipcommunity"; + ResourceIdentifier networkFabricIPCommunityResourceId = NetworkFabricIPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); + NetworkFabricIPCommunityResource networkFabricIPCommunity = client.GetNetworkFabricIPCommunityResource(networkFabricIPCommunityResourceId); // invoke the operation - IPCommunityResource result = await ipCommunity.GetAsync(); + NetworkFabricIPCommunityResource result = await networkFabricIPCommunity.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = result.Data; + NetworkFabricIPCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +55,7 @@ public async Task Get_IpCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_IpCommunitiesUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Update_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,28 +63,37 @@ public async Task Update_IpCommunitiesUpdateMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPCommunityResource created on azure - // for more information of creating IPCommunityResource, please refer to the document of IPCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string ipCommunityName = "example-ipCommunity"; - ResourceIdentifier ipCommunityResourceId = IPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); - IPCommunityResource ipCommunity = client.GetIPCommunityResource(ipCommunityResourceId); + // this example assumes you already have this NetworkFabricIPCommunityResource created on azure + // for more information of creating NetworkFabricIPCommunityResource, please refer to the document of NetworkFabricIPCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipCommunityName = "example-ipcommunity"; + ResourceIdentifier networkFabricIPCommunityResourceId = NetworkFabricIPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); + NetworkFabricIPCommunityResource networkFabricIPCommunity = client.GetNetworkFabricIPCommunityResource(networkFabricIPCommunityResourceId); // invoke the operation - IPCommunityPatch patch = new IPCommunityPatch() + NetworkFabricIPCommunityPatch patch = new NetworkFabricIPCommunityPatch() { - Tags = + IPCommunityRules = { -["key2814"] = "", +new IPCommunityRule(CommunityActionType.Permit,4155123341,new string[] +{ +"1:1" +}) +{ +WellKnownCommunities = +{ +WellKnownCommunity.Internet +}, +} }, }; - ArmOperation lro = await ipCommunity.UpdateAsync(WaitUntil.Completed, patch); - IPCommunityResource result = lro.Value; + ArmOperation lro = await networkFabricIPCommunity.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricIPCommunityResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = result.Data; + NetworkFabricIPCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -94,7 +103,7 @@ public async Task Update_IpCommunitiesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_IpCommunitiesDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_Delete_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,16 +111,16 @@ public async Task Delete_IpCommunitiesDeleteMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPCommunityResource created on azure - // for more information of creating IPCommunityResource, please refer to the document of IPCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string ipCommunityName = "IpCommunityList1"; - ResourceIdentifier ipCommunityResourceId = IPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); - IPCommunityResource ipCommunity = client.GetIPCommunityResource(ipCommunityResourceId); + // this example assumes you already have this NetworkFabricIPCommunityResource created on azure + // for more information of creating NetworkFabricIPCommunityResource, please refer to the document of NetworkFabricIPCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipCommunityName = "example-ipcommunity"; + ResourceIdentifier networkFabricIPCommunityResourceId = NetworkFabricIPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); + NetworkFabricIPCommunityResource networkFabricIPCommunity = client.GetNetworkFabricIPCommunityResource(networkFabricIPCommunityResourceId); // invoke the operation - await ipCommunity.DeleteAsync(WaitUntil.Completed); + await networkFabricIPCommunity.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -119,9 +128,9 @@ public async Task Delete_IpCommunitiesDeleteMaximumSetGen() // IpCommunities_ListBySubscription_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIPCommunities_IpCommunitiesListBySubscriptionMaximumSetGen() + public async Task GetNetworkFabricIPCommunities_IpCommunitiesListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpCommunities_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "IpCommunities_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,16 +140,16 @@ public async Task GetIPCommunities_IpCommunitiesListBySubscriptionMaximumSetGen( // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (IPCommunityResource item in subscriptionResource.GetIPCommunitiesAsync()) + await foreach (NetworkFabricIPCommunityResource item in subscriptionResource.GetNetworkFabricIPCommunitiesAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPCommunityData resourceData = item.Data; + NetworkFabricIPCommunityData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs similarity index 71% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs index d2a4131c2ad90..11993f2868533 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPExtendedCommunityCollection + public partial class Sample_NetworkFabricIPExtendedCommunityCollection { // IpExtendedCommunities_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_IpExtendedCommunitiesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Create_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,35 +34,36 @@ public async Task CreateOrUpdate_IpExtendedCommunitiesCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPExtendedCommunityResource - IPExtendedCommunityCollection collection = resourceGroupResource.GetIPExtendedCommunities(); + // get the collection of this NetworkFabricIPExtendedCommunityResource + NetworkFabricIPExtendedCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPExtendedCommunities(); // invoke the operation - string ipExtendedCommunityName = "example_ipExtendedCommunity"; - IPExtendedCommunityData data = new IPExtendedCommunityData(new AzureLocation("EastUs")) + string ipExtendedCommunityName = "example-ipExtendedCommunity"; + NetworkFabricIPExtendedCommunityData data = new NetworkFabricIPExtendedCommunityData(new AzureLocation("eastus"), new IPExtendedCommunityRule[] { - Annotation = "annotationValue", - Action = CommunityActionType.Permit, - RouteTargets = +new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341,new string[] { -"1234:5678" -}, +"1234:2345" +}) + }) + { + Annotation = "annotation", Tags = { -["key5054"] = "key", +["keyID"] = "KeyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipExtendedCommunityName, data); - IPExtendedCommunityResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipExtendedCommunityName, data); + NetworkFabricIPExtendedCommunityResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = result.Data; + NetworkFabricIPExtendedCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -72,7 +73,7 @@ public async Task CreateOrUpdate_IpExtendedCommunitiesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,21 +83,21 @@ public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPExtendedCommunityResource - IPExtendedCommunityCollection collection = resourceGroupResource.GetIPExtendedCommunities(); + // get the collection of this NetworkFabricIPExtendedCommunityResource + NetworkFabricIPExtendedCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPExtendedCommunities(); // invoke the operation - string ipExtendedCommunityName = "example_ipExtendedCommunity"; - IPExtendedCommunityResource result = await collection.GetAsync(ipExtendedCommunityName); + string ipExtendedCommunityName = "example-ipExtendedCommunity"; + NetworkFabricIPExtendedCommunityResource result = await collection.GetAsync(ipExtendedCommunityName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = result.Data; + NetworkFabricIPExtendedCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -106,7 +107,7 @@ public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_IpExtendedCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,16 +117,16 @@ public async Task Exists_IpExtendedCommunitiesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPExtendedCommunityResource - IPExtendedCommunityCollection collection = resourceGroupResource.GetIPExtendedCommunities(); + // get the collection of this NetworkFabricIPExtendedCommunityResource + NetworkFabricIPExtendedCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPExtendedCommunities(); // invoke the operation - string ipExtendedCommunityName = "example_ipExtendedCommunity"; + string ipExtendedCommunityName = "example-ipExtendedCommunity"; bool result = await collection.ExistsAsync(ipExtendedCommunityName); Console.WriteLine($"Succeeded: {result}"); @@ -136,7 +137,7 @@ public async Task Exists_IpExtendedCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_IpExtendedCommunitiesListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,20 +147,20 @@ public async Task GetAll_IpExtendedCommunitiesListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPExtendedCommunityResource - IPExtendedCommunityCollection collection = resourceGroupResource.GetIPExtendedCommunities(); + // get the collection of this NetworkFabricIPExtendedCommunityResource + NetworkFabricIPExtendedCommunityCollection collection = resourceGroupResource.GetNetworkFabricIPExtendedCommunities(); // invoke the operation and iterate over the result - await foreach (IPExtendedCommunityResource item in collection.GetAllAsync()) + await foreach (NetworkFabricIPExtendedCommunityResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = item.Data; + NetworkFabricIPExtendedCommunityData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs similarity index 58% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs index ee5198a7cf549..bf74ebd44324d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPExtendedCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPExtendedCommunityResource.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPExtendedCommunityResource + public partial class Sample_NetworkFabricIPExtendedCommunityResource { // IpExtendedCommunities_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,20 +32,20 @@ public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPExtendedCommunityResource created on azure - // for more information of creating IPExtendedCommunityResource, please refer to the document of IPExtendedCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; - string ipExtendedCommunityName = "example_ipExtendedCommunity"; - ResourceIdentifier ipExtendedCommunityResourceId = IPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); - IPExtendedCommunityResource ipExtendedCommunity = client.GetIPExtendedCommunityResource(ipExtendedCommunityResourceId); + // this example assumes you already have this NetworkFabricIPExtendedCommunityResource created on azure + // for more information of creating NetworkFabricIPExtendedCommunityResource, please refer to the document of NetworkFabricIPExtendedCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipExtendedCommunityName = "example-ipExtendedCommunity"; + ResourceIdentifier networkFabricIPExtendedCommunityResourceId = NetworkFabricIPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); + NetworkFabricIPExtendedCommunityResource networkFabricIPExtendedCommunity = client.GetNetworkFabricIPExtendedCommunityResource(networkFabricIPExtendedCommunityResourceId); // invoke the operation - IPExtendedCommunityResource result = await ipExtendedCommunity.GetAsync(); + NetworkFabricIPExtendedCommunityResource result = await networkFabricIPExtendedCommunity.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = result.Data; + NetworkFabricIPExtendedCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +55,7 @@ public async Task Get_IpExtendedCommunitiesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_IpExtendedCommunitiesUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Update_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,28 +63,35 @@ public async Task Update_IpExtendedCommunitiesUpdateMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPExtendedCommunityResource created on azure - // for more information of creating IPExtendedCommunityResource, please refer to the document of IPExtendedCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; - string ipExtendedCommunityName = "example_ipExtendedCommunity"; - ResourceIdentifier ipExtendedCommunityResourceId = IPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); - IPExtendedCommunityResource ipExtendedCommunity = client.GetIPExtendedCommunityResource(ipExtendedCommunityResourceId); + // this example assumes you already have this NetworkFabricIPExtendedCommunityResource created on azure + // for more information of creating NetworkFabricIPExtendedCommunityResource, please refer to the document of NetworkFabricIPExtendedCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipExtendedCommunityName = "example-ipExtendedCommunity"; + ResourceIdentifier networkFabricIPExtendedCommunityResourceId = NetworkFabricIPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); + NetworkFabricIPExtendedCommunityResource networkFabricIPExtendedCommunity = client.GetNetworkFabricIPExtendedCommunityResource(networkFabricIPExtendedCommunityResourceId); // invoke the operation - IPExtendedCommunityPatch patch = new IPExtendedCommunityPatch() + NetworkFabricIPExtendedCommunityPatch patch = new NetworkFabricIPExtendedCommunityPatch() { + IPExtendedCommunityRules = +{ +new IPExtendedCommunityRule(CommunityActionType.Permit,4155123341,new string[] +{ +"1234:2345" +}) +}, Tags = { -["key5054"] = "key1", +["keyID"] = "KeyValue", }, }; - ArmOperation lro = await ipExtendedCommunity.UpdateAsync(WaitUntil.Completed, patch); - IPExtendedCommunityResource result = lro.Value; + ArmOperation lro = await networkFabricIPExtendedCommunity.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricIPExtendedCommunityResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = result.Data; + NetworkFabricIPExtendedCommunityData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -94,7 +101,7 @@ public async Task Update_IpExtendedCommunitiesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_IpExtendedCommunitiesDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_Delete_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,16 +109,16 @@ public async Task Delete_IpExtendedCommunitiesDeleteMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPExtendedCommunityResource created on azure - // for more information of creating IPExtendedCommunityResource, please refer to the document of IPExtendedCommunityResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgIpExtendedCommunityLists"; - string ipExtendedCommunityName = "example_ipExtendedCommunity"; - ResourceIdentifier ipExtendedCommunityResourceId = IPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); - IPExtendedCommunityResource ipExtendedCommunity = client.GetIPExtendedCommunityResource(ipExtendedCommunityResourceId); + // this example assumes you already have this NetworkFabricIPExtendedCommunityResource created on azure + // for more information of creating NetworkFabricIPExtendedCommunityResource, please refer to the document of NetworkFabricIPExtendedCommunityResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string ipExtendedCommunityName = "example-ipExtendedCommunity"; + ResourceIdentifier networkFabricIPExtendedCommunityResourceId = NetworkFabricIPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipExtendedCommunityName); + NetworkFabricIPExtendedCommunityResource networkFabricIPExtendedCommunity = client.GetNetworkFabricIPExtendedCommunityResource(networkFabricIPExtendedCommunityResourceId); // invoke the operation - await ipExtendedCommunity.DeleteAsync(WaitUntil.Completed); + await networkFabricIPExtendedCommunity.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -119,9 +126,9 @@ public async Task Delete_IpExtendedCommunitiesDeleteMaximumSetGen() // IpExtendedCommunities_ListBySubscription_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIPExtendedCommunities_IpExtendedCommunitiesListBySubscriptionMaximumSetGen() + public async Task GetNetworkFabricIPExtendedCommunities_IpExtendedCommunitiesListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpExtendedCommunities_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "IpExtendedCommunities_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,16 +138,16 @@ public async Task GetIPExtendedCommunities_IpExtendedCommunitiesListBySubscripti // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (IPExtendedCommunityResource item in subscriptionResource.GetIPExtendedCommunitiesAsync()) + await foreach (NetworkFabricIPExtendedCommunityResource item in subscriptionResource.GetNetworkFabricIPExtendedCommunitiesAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPExtendedCommunityData resourceData = item.Data; + NetworkFabricIPExtendedCommunityData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs similarity index 74% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs index 2b2dc402a4383..b79f04ca8c0fb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPPrefixCollection + public partial class Sample_NetworkFabricIPPrefixCollection { // IpPrefixes_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_IpPrefixesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Create_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,37 +34,38 @@ public async Task CreateOrUpdate_IpPrefixesCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourcegroupname"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPPrefixResource - IPPrefixCollection collection = resourceGroupResource.GetIPPrefixes(); + // get the collection of this NetworkFabricIPPrefixResource + NetworkFabricIPPrefixCollection collection = resourceGroupResource.GetNetworkFabricIPPrefixes(); // invoke the operation string ipPrefixName = "example-ipPrefix"; - IPPrefixData data = new IPPrefixData(new AzureLocation("EastUS"), new IPPrefixPropertiesIPPrefixRulesItem[] + NetworkFabricIPPrefixData data = new NetworkFabricIPPrefixData(new AzureLocation("eastus")) { -new IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType.Permit,12,"1.1.1.0/24") + Annotation = "annotation", + IPPrefixRules = { -Condition = Condition.EqualTo, -SubnetMaskLength = 28, +new IPPrefixRule(CommunityActionType.Permit,4155123341,"10.10.10.10/30") +{ +Condition = IPPrefixRuleCondition.GreaterThanOrEqualTo, +SubnetMaskLength = "10", } - }) - { - Annotation = "annotationValue", +}, Tags = { -["key6404"] = "", +["keyID"] = "KeyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipPrefixName, data); - IPPrefixResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipPrefixName, data); + NetworkFabricIPPrefixResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = result.Data; + NetworkFabricIPPrefixData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -74,7 +75,7 @@ public async Task CreateOrUpdate_IpPrefixesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpPrefixesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,21 +85,21 @@ public async Task Get_IpPrefixesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "xxxxxx"; - string resourceGroupName = "resourcegroupname"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPPrefixResource - IPPrefixCollection collection = resourceGroupResource.GetIPPrefixes(); + // get the collection of this NetworkFabricIPPrefixResource + NetworkFabricIPPrefixCollection collection = resourceGroupResource.GetNetworkFabricIPPrefixes(); // invoke the operation string ipPrefixName = "example-ipPrefix"; - IPPrefixResource result = await collection.GetAsync(ipPrefixName); + NetworkFabricIPPrefixResource result = await collection.GetAsync(ipPrefixName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = result.Data; + NetworkFabricIPPrefixData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -108,7 +109,7 @@ public async Task Get_IpPrefixesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_IpPrefixesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,13 +119,13 @@ public async Task Exists_IpPrefixesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "xxxxxx"; - string resourceGroupName = "resourcegroupname"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPPrefixResource - IPPrefixCollection collection = resourceGroupResource.GetIPPrefixes(); + // get the collection of this NetworkFabricIPPrefixResource + NetworkFabricIPPrefixCollection collection = resourceGroupResource.GetNetworkFabricIPPrefixes(); // invoke the operation string ipPrefixName = "example-ipPrefix"; @@ -138,7 +139,7 @@ public async Task Exists_IpPrefixesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_IpPrefixesListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,20 +149,20 @@ public async Task GetAll_IpPrefixesListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourcegroupname"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this IPPrefixResource - IPPrefixCollection collection = resourceGroupResource.GetIPPrefixes(); + // get the collection of this NetworkFabricIPPrefixResource + NetworkFabricIPPrefixCollection collection = resourceGroupResource.GetNetworkFabricIPPrefixes(); // invoke the operation and iterate over the result - await foreach (IPPrefixResource item in collection.GetAllAsync()) + await foreach (NetworkFabricIPPrefixResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = item.Data; + NetworkFabricIPPrefixData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs similarity index 61% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs index 1297d50eb758a..46f08b2c13570 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_IPPrefixResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricIPPrefixResource.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_IPPrefixResource + public partial class Sample_NetworkFabricIPPrefixResource { // IpPrefixes_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_IpPrefixesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Get_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,20 +32,20 @@ public async Task Get_IpPrefixesGetMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPPrefixResource created on azure - // for more information of creating IPPrefixResource, please refer to the document of IPPrefixResource - string subscriptionId = "xxxxxx"; - string resourceGroupName = "resourcegroupname"; + // this example assumes you already have this NetworkFabricIPPrefixResource created on azure + // for more information of creating NetworkFabricIPPrefixResource, please refer to the document of NetworkFabricIPPrefixResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; string ipPrefixName = "example-ipPrefix"; - ResourceIdentifier ipPrefixResourceId = IPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); - IPPrefixResource ipPrefix = client.GetIPPrefixResource(ipPrefixResourceId); + ResourceIdentifier networkFabricIPPrefixResourceId = NetworkFabricIPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); + NetworkFabricIPPrefixResource networkFabricIPPrefix = client.GetNetworkFabricIPPrefixResource(networkFabricIPPrefixResourceId); // invoke the operation - IPPrefixResource result = await ipPrefix.GetAsync(); + NetworkFabricIPPrefixResource result = await networkFabricIPPrefix.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = result.Data; + NetworkFabricIPPrefixData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +55,7 @@ public async Task Get_IpPrefixesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_IpPrefixesUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Update_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,28 +63,37 @@ public async Task Update_IpPrefixesUpdateMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPPrefixResource created on azure - // for more information of creating IPPrefixResource, please refer to the document of IPPrefixResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourcegroupname"; + // this example assumes you already have this NetworkFabricIPPrefixResource created on azure + // for more information of creating NetworkFabricIPPrefixResource, please refer to the document of NetworkFabricIPPrefixResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; string ipPrefixName = "example-ipPrefix"; - ResourceIdentifier ipPrefixResourceId = IPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); - IPPrefixResource ipPrefix = client.GetIPPrefixResource(ipPrefixResourceId); + ResourceIdentifier networkFabricIPPrefixResourceId = NetworkFabricIPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); + NetworkFabricIPPrefixResource networkFabricIPPrefix = client.GetNetworkFabricIPPrefixResource(networkFabricIPPrefixResourceId); // invoke the operation - IPPrefixPatch patch = new IPPrefixPatch() + NetworkFabricIPPrefixPatch patch = new NetworkFabricIPPrefixPatch() { + Annotation = "annotation", + IPPrefixRules = +{ +new IPPrefixRule(CommunityActionType.Permit,4155123341,"10.10.10.10/30") +{ +Condition = IPPrefixRuleCondition.GreaterThanOrEqualTo, +SubnetMaskLength = "10", +} +}, Tags = { -["key3127"] = "key", +["keyID"] = "KeyValue", }, }; - ArmOperation lro = await ipPrefix.UpdateAsync(WaitUntil.Completed, patch); - IPPrefixResource result = lro.Value; + ArmOperation lro = await networkFabricIPPrefix.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricIPPrefixResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = result.Data; + NetworkFabricIPPrefixData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -94,7 +103,7 @@ public async Task Update_IpPrefixesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_IpPrefixesDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_Delete_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,16 +111,16 @@ public async Task Delete_IpPrefixesDeleteMaximumSetGen() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this IPPrefixResource created on azure - // for more information of creating IPPrefixResource, please refer to the document of IPPrefixResource - string subscriptionId = "xxxxxx"; - string resourceGroupName = "rgIpPrefixLists"; + // this example assumes you already have this NetworkFabricIPPrefixResource created on azure + // for more information of creating NetworkFabricIPPrefixResource, please refer to the document of NetworkFabricIPPrefixResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; string ipPrefixName = "example-ipPrefix"; - ResourceIdentifier ipPrefixResourceId = IPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); - IPPrefixResource ipPrefix = client.GetIPPrefixResource(ipPrefixResourceId); + ResourceIdentifier networkFabricIPPrefixResourceId = NetworkFabricIPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); + NetworkFabricIPPrefixResource networkFabricIPPrefix = client.GetNetworkFabricIPPrefixResource(networkFabricIPPrefixResourceId); // invoke the operation - await ipPrefix.DeleteAsync(WaitUntil.Completed); + await networkFabricIPPrefix.DeleteAsync(WaitUntil.Completed); Console.WriteLine($"Succeeded"); } @@ -119,9 +128,9 @@ public async Task Delete_IpPrefixesDeleteMaximumSetGen() // IpPrefixes_ListBySubscription_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIPPrefixes_IpPrefixesListBySubscriptionMaximumSetGen() + public async Task GetNetworkFabricIPPrefixes_IpPrefixesListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/IpPrefixes_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "IpPrefixes_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,16 +140,16 @@ public async Task GetIPPrefixes_IpPrefixesListBySubscriptionMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (IPPrefixResource item in subscriptionResource.GetIPPrefixesAsync()) + await foreach (NetworkFabricIPPrefixResource item in subscriptionResource.GetNetworkFabricIPPrefixesAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - IPPrefixData resourceData = item.Data; + NetworkFabricIPPrefixData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs new file mode 100644 index 0000000000000..1c1ae224bfe8a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkCollection.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternalNetworkCollection + { + // InternalNetworks_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_InternalNetworksCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Create_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricInternalNetworkResource + NetworkFabricInternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricInternalNetworks(); + + // invoke the operation + string internalNetworkName = "example-internalnetwork"; + NetworkFabricInternalNetworkData data = new NetworkFabricInternalNetworkData(755) + { + Annotation = "annotation", + Mtu = 1500, + ConnectedIPv4Subnets = +{ +new ConnectedSubnet("10.0.0.0/24") +{ +Annotation = "annotation", +} +}, + ConnectedIPv6Subnets = +{ +new ConnectedSubnet("3FFE:FFFF:0:CD30::a0/29") +{ +Annotation = "annotation", +} +}, + ImportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportRoutePolicy = new ImportRoutePolicy() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + ExportRoutePolicy = new ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + IsMonitoringEnabled = IsMonitoringEnabled.True, + Extension = StaticRouteConfigurationExtension.NoExtension, + BgpConfiguration = new InternalNetworkBgpConfiguration() + { + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 5, + }, + DefaultRouteOriginate = NetworkFabricBooleanValue.True, + AllowAS = 10, + AllowASOverride = AllowASOverride.Enable, + PeerAsn = 61234, + IPv4ListenRangePrefixes = +{ +"10.1.0.0/25" +}, + IPv6ListenRangePrefixes = +{ +"2fff::/66" +}, + IPv4NeighborAddress = +{ +new NeighborAddress() +{ +Address = "10.1.0.0", +} +}, + IPv6NeighborAddress = +{ +new NeighborAddress() +{ +Address = "2fff::", +} +}, + Annotation = "annotation", + }, + StaticRouteConfiguration = new InternalNetworkStaticRouteConfiguration() + { + Extension = StaticRouteConfigurationExtension.NoExtension, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + IPv4Routes = +{ +new StaticRouteProperties("jffgck",new string[] +{ +"10.0.0.1" +}) +}, + IPv6Routes = +{ +new StaticRouteProperties("2fff::/64",new string[] +{ +"3ffe::1" +}) +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, internalNetworkName, data); + NetworkFabricInternalNetworkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricInternalNetworkResource + NetworkFabricInternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricInternalNetworks(); + + // invoke the operation + string internalNetworkName = "example-internalnetwork"; + NetworkFabricInternalNetworkResource result = await collection.GetAsync(internalNetworkName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_InternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricInternalNetworkResource + NetworkFabricInternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricInternalNetworks(); + + // invoke the operation + string internalNetworkName = "example-internalnetwork"; + bool result = await collection.ExistsAsync(internalNetworkName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_InternalNetworksListByL3IsolationDomainMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_ListByL3IsolationDomain_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_ListByL3IsolationDomain" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // get the collection of this NetworkFabricInternalNetworkResource + NetworkFabricInternalNetworkCollection collection = networkFabricL3IsolationDomain.GetNetworkFabricInternalNetworks(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternalNetworkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternalNetworkData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs new file mode 100644 index 0000000000000..8cfba4518ab20 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternalNetworkResource.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternalNetworkResource + { + // InternalNetworks_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternalNetworksGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalnetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + NetworkFabricInternalNetworkResource result = await networkFabricInternalNetwork.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternalNetworks_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_InternalNetworksUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Update_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalnetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + NetworkFabricInternalNetworkPatch patch = new NetworkFabricInternalNetworkPatch() + { + Annotation = "annotation", + Mtu = 1500, + ConnectedIPv4Subnets = +{ +new ConnectedSubnet("10.0.0.0/24") +{ +Annotation = "annotation", +} +}, + ConnectedIPv6Subnets = +{ +new ConnectedSubnet("3FFE:FFFF:0:CD30::a0/29") +{ +Annotation = "annotation", +} +}, + ImportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportRoutePolicy = new ImportRoutePolicy() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + ExportRoutePolicy = new ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + }, + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + IsMonitoringEnabled = IsMonitoringEnabled.True, + BgpConfiguration = new BgpConfiguration() + { + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 5, + }, + DefaultRouteOriginate = NetworkFabricBooleanValue.True, + AllowAS = 10, + AllowASOverride = AllowASOverride.Enable, + PeerAsn = 61234, + IPv4ListenRangePrefixes = +{ +"10.1.0.0/25" +}, + IPv6ListenRangePrefixes = +{ +"2fff::/66" +}, + IPv4NeighborAddress = +{ +new NeighborAddress() +{ +Address = "10.1.0.0", +} +}, + IPv6NeighborAddress = +{ +new NeighborAddress() +{ +Address = "2fff::", +} +}, + Annotation = "annotation", + }, + StaticRouteConfiguration = new StaticRouteConfiguration() + { + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + IPv4Routes = +{ +new StaticRouteProperties("20.20.20.20/25",new string[] +{ +"10.0.0.1" +}) +}, + IPv6Routes = +{ +new StaticRouteProperties("2fff::/64",new string[] +{ +"3ffe::1" +}) +}, + }, + }; + ArmOperation lro = await networkFabricInternalNetwork.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricInternalNetworkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternalNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternalNetworks_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_InternalNetworksDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalnetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + await networkFabricInternalNetwork.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_InternalNetworksUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalnetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricInternalNetwork.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateBgpAdministrativeState_InternalNetworksUpdateBgpAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateBgpAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_UpdateBgpAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalNetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricInternalNetwork.UpdateBgpAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateStaticRouteBfdAdministrativeState_InternalNetworksUpdateStaticRouteBfdAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternalNetworks_UpdateStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "InternalNetworks_UpdateStaticRouteBfdAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternalNetworkResource created on azure + // for more information of creating NetworkFabricInternalNetworkResource, please refer to the document of NetworkFabricInternalNetworkResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + string internalNetworkName = "example-internalNetwork"; + ResourceIdentifier networkFabricInternalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName); + NetworkFabricInternalNetworkResource networkFabricInternalNetwork = client.GetNetworkFabricInternalNetworkResource(networkFabricInternalNetworkResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricInternalNetwork.UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayCollection.cs new file mode 100644 index 0000000000000..d73047218d131 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayCollection.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternetGatewayCollection + { + // InternetGateways_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternetGatewaysGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayResource + NetworkFabricInternetGatewayCollection collection = resourceGroupResource.GetNetworkFabricInternetGateways(); + + // invoke the operation + string internetGatewayName = "example-internetGateway"; + NetworkFabricInternetGatewayResource result = await collection.GetAsync(internetGatewayName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGateways_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_InternetGatewaysGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayResource + NetworkFabricInternetGatewayCollection collection = resourceGroupResource.GetNetworkFabricInternetGateways(); + + // invoke the operation + string internetGatewayName = "example-internetGateway"; + bool result = await collection.ExistsAsync(internetGatewayName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // InternetGateways_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_InternetGatewaysListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayResource + NetworkFabricInternetGatewayCollection collection = resourceGroupResource.GetNetworkFabricInternetGateways(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternetGatewayResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayResource.cs new file mode 100644 index 0000000000000..d475b41d9f301 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayResource.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternetGatewayResource + { + // InternetGateways_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternetGatewaysGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternetGatewayResource created on azure + // for more information of creating NetworkFabricInternetGatewayResource, please refer to the document of NetworkFabricInternetGatewayResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string internetGatewayName = "example-internetGateway"; + ResourceIdentifier networkFabricInternetGatewayResourceId = NetworkFabricInternetGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, internetGatewayName); + NetworkFabricInternetGatewayResource networkFabricInternetGateway = client.GetNetworkFabricInternetGatewayResource(networkFabricInternetGatewayResourceId); + + // invoke the operation + NetworkFabricInternetGatewayResource result = await networkFabricInternetGateway.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGateways_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_InternetGatewaysUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_Update_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternetGatewayResource created on azure + // for more information of creating NetworkFabricInternetGatewayResource, please refer to the document of NetworkFabricInternetGatewayResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string internetGatewayName = "example-internetGateway"; + ResourceIdentifier networkFabricInternetGatewayResourceId = NetworkFabricInternetGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, internetGatewayName); + NetworkFabricInternetGatewayResource networkFabricInternetGateway = client.GetNetworkFabricInternetGatewayResource(networkFabricInternetGatewayResourceId); + + // invoke the operation + NetworkFabricInternetGatewayPatch patch = new NetworkFabricInternetGatewayPatch() + { + InternetGatewayRuleId = new ResourceIdentifier("/subscriptions/xxxx-xxxx-xxxx-xxxx/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules/example-internetGatewayRule"), + Tags = +{ +["key81"] = "2345", +}, + }; + ArmOperation lro = await networkFabricInternetGateway.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricInternetGatewayResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGateways_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricInternetGateways_InternetGatewaysListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGateways_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGateways_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternetGatewayResource item in subscriptionResource.GetNetworkFabricInternetGatewaysAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleCollection.cs new file mode 100644 index 0000000000000..fccc39bf339a5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternetGatewayRuleCollection + { + // InternetGatewayRules_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_InternetGatewayRulesCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Create_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayRuleResource + NetworkFabricInternetGatewayRuleCollection collection = resourceGroupResource.GetNetworkFabricInternetGatewayRules(); + + // invoke the operation + string internetGatewayRuleName = "example-internetGatewayRule"; + NetworkFabricInternetGatewayRuleData data = new NetworkFabricInternetGatewayRuleData(new AzureLocation("eastus"), new InternetGatewayRules(InternetGatewayRuleAction.Allow, new string[] + { +"10.10.10.10" + })) + { + Annotation = "annotationValue", + Tags = +{ +["keyID"] = "keyValue", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, internetGatewayRuleName, data); + NetworkFabricInternetGatewayRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGatewayRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternetGatewayRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayRuleResource + NetworkFabricInternetGatewayRuleCollection collection = resourceGroupResource.GetNetworkFabricInternetGatewayRules(); + + // invoke the operation + string internetGatewayRuleName = "example-internetGatewayRule"; + NetworkFabricInternetGatewayRuleResource result = await collection.GetAsync(internetGatewayRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGatewayRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_InternetGatewayRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayRuleResource + NetworkFabricInternetGatewayRuleCollection collection = resourceGroupResource.GetNetworkFabricInternetGatewayRules(); + + // invoke the operation + string internetGatewayRuleName = "example-internetGatewayRule"; + bool result = await collection.ExistsAsync(internetGatewayRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_InternetGatewayRulesListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-internetGatewayRule"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricInternetGatewayRuleResource + NetworkFabricInternetGatewayRuleCollection collection = resourceGroupResource.GetNetworkFabricInternetGatewayRules(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternetGatewayRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleResource.cs new file mode 100644 index 0000000000000..eef0c06115196 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricInternetGatewayRuleResource.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricInternetGatewayRuleResource + { + // InternetGatewayRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_InternetGatewayRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternetGatewayRuleResource created on azure + // for more information of creating NetworkFabricInternetGatewayRuleResource, please refer to the document of NetworkFabricInternetGatewayRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string internetGatewayRuleName = "example-internetGatewayRule"; + ResourceIdentifier networkFabricInternetGatewayRuleResourceId = NetworkFabricInternetGatewayRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, internetGatewayRuleName); + NetworkFabricInternetGatewayRuleResource networkFabricInternetGatewayRule = client.GetNetworkFabricInternetGatewayRuleResource(networkFabricInternetGatewayRuleResourceId); + + // invoke the operation + NetworkFabricInternetGatewayRuleResource result = await networkFabricInternetGatewayRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGatewayRules_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_InternetGatewayRulesUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Update_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternetGatewayRuleResource created on azure + // for more information of creating NetworkFabricInternetGatewayRuleResource, please refer to the document of NetworkFabricInternetGatewayRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string internetGatewayRuleName = "example-internetGatewayRule"; + ResourceIdentifier networkFabricInternetGatewayRuleResourceId = NetworkFabricInternetGatewayRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, internetGatewayRuleName); + NetworkFabricInternetGatewayRuleResource networkFabricInternetGatewayRule = client.GetNetworkFabricInternetGatewayRuleResource(networkFabricInternetGatewayRuleResourceId); + + // invoke the operation + NetworkFabricInternetGatewayRulePatch patch = new NetworkFabricInternetGatewayRulePatch() + { + Tags = +{ +["key3311"] = "1234", +}, + }; + ArmOperation lro = await networkFabricInternetGatewayRule.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricInternetGatewayRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // InternetGatewayRules_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_InternetGatewayRulesDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricInternetGatewayRuleResource created on azure + // for more information of creating NetworkFabricInternetGatewayRuleResource, please refer to the document of NetworkFabricInternetGatewayRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string internetGatewayRuleName = "example-internetGatewayRule"; + ResourceIdentifier networkFabricInternetGatewayRuleResourceId = NetworkFabricInternetGatewayRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, internetGatewayRuleName); + NetworkFabricInternetGatewayRuleResource networkFabricInternetGatewayRule = client.GetNetworkFabricInternetGatewayRuleResource(networkFabricInternetGatewayRuleResourceId); + + // invoke the operation + await networkFabricInternetGatewayRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // InternetGatewayRules_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricInternetGatewayRules_InternetGatewayRulesListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/InternetGatewayRules_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "InternetGatewayRules_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternetGatewayRuleResource item in subscriptionResource.GetNetworkFabricInternetGatewayRulesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricInternetGatewayRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainCollection.cs similarity index 71% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainCollection.cs index a6563ca2c225f..fc9c297f399e6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L2IsolationDomainCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainCollection.cs @@ -16,14 +16,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_L2IsolationDomainCollection + public partial class Sample_NetworkFabricL2IsolationDomainCollection { // L2IsolationDomains_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_L2IsolationDomainsCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Create_MaximumSet_Gen.json // this example is just showing the usage of "L2IsolationDomains_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,28 +33,31 @@ public async Task CreateOrUpdate_L2IsolationDomainsCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L2IsolationDomainResource - L2IsolationDomainCollection collection = resourceGroupResource.GetL2IsolationDomains(); + // get the collection of this NetworkFabricL2IsolationDomainResource + NetworkFabricL2IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL2IsolationDomains(); // invoke the operation string l2IsolationDomainName = "example-l2domain"; - L2IsolationDomainData data = new L2IsolationDomainData(new AzureLocation("eastus")) + NetworkFabricL2IsolationDomainData data = new NetworkFabricL2IsolationDomainData(new AzureLocation("eastus"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric"), 501) { - NetworkFabricId = "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", - VlanId = 501, + Annotation = "annotation", Mtu = 1500, + Tags = +{ +["keyID"] = "keyValue", +}, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l2IsolationDomainName, data); - L2IsolationDomainResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l2IsolationDomainName, data); + NetworkFabricL2IsolationDomainResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = result.Data; + NetworkFabricL2IsolationDomainData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -64,7 +67,7 @@ public async Task CreateOrUpdate_L2IsolationDomainsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_L2IsolationDomainsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json // this example is just showing the usage of "L2IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,21 +77,21 @@ public async Task Get_L2IsolationDomainsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L2IsolationDomainResource - L2IsolationDomainCollection collection = resourceGroupResource.GetL2IsolationDomains(); + // get the collection of this NetworkFabricL2IsolationDomainResource + NetworkFabricL2IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL2IsolationDomains(); // invoke the operation - string l2IsolationDomainName = "l2IsolationDomainName"; - L2IsolationDomainResource result = await collection.GetAsync(l2IsolationDomainName); + string l2IsolationDomainName = "example-l2Domain"; + NetworkFabricL2IsolationDomainResource result = await collection.GetAsync(l2IsolationDomainName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = result.Data; + NetworkFabricL2IsolationDomainData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -98,7 +101,7 @@ public async Task Get_L2IsolationDomainsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_L2IsolationDomainsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json // this example is just showing the usage of "L2IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,16 +111,16 @@ public async Task Exists_L2IsolationDomainsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L2IsolationDomainResource - L2IsolationDomainCollection collection = resourceGroupResource.GetL2IsolationDomains(); + // get the collection of this NetworkFabricL2IsolationDomainResource + NetworkFabricL2IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL2IsolationDomains(); // invoke the operation - string l2IsolationDomainName = "l2IsolationDomainName"; + string l2IsolationDomainName = "example-l2Domain"; bool result = await collection.ExistsAsync(l2IsolationDomainName); Console.WriteLine($"Succeeded: {result}"); @@ -128,7 +131,7 @@ public async Task Exists_L2IsolationDomainsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_L2IsolationDomainsListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "L2IsolationDomains_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,20 +141,20 @@ public async Task GetAll_L2IsolationDomainsListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L2IsolationDomainResource - L2IsolationDomainCollection collection = resourceGroupResource.GetL2IsolationDomains(); + // get the collection of this NetworkFabricL2IsolationDomainResource + NetworkFabricL2IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL2IsolationDomains(); // invoke the operation and iterate over the result - await foreach (L2IsolationDomainResource item in collection.GetAllAsync()) + await foreach (NetworkFabricL2IsolationDomainResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L2IsolationDomainData resourceData = item.Data; + NetworkFabricL2IsolationDomainData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainResource.cs new file mode 100644 index 0000000000000..4843b33df0e75 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL2IsolationDomainResource.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricL2IsolationDomainResource + { + // L2IsolationDomains_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_L2IsolationDomainsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Get_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2Domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + NetworkFabricL2IsolationDomainResource result = await networkFabricL2IsolationDomain.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL2IsolationDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // L2IsolationDomains_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_L2IsolationDomainsUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Update_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2Domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + NetworkFabricL2IsolationDomainPatch patch = new NetworkFabricL2IsolationDomainPatch() + { + Annotation = "annotation1", + Mtu = 6000, + Tags = +{ +["keyID"] = "keyValue", +}, + }; + ArmOperation lro = await networkFabricL2IsolationDomain.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricL2IsolationDomainResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL2IsolationDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // L2IsolationDomains_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_L2IsolationDomainsDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2Domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + await networkFabricL2IsolationDomain.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_L2IsolationDomainsUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2Domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricL2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + DeviceUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_L2IsolationDomainsValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricL2IsolationDomain.ValidateConfigurationAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // L2IsolationDomains_CommitConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CommitConfiguration_L2IsolationDomainsCommitConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_CommitConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL2IsolationDomainResource created on azure + // for more information of creating NetworkFabricL2IsolationDomainResource, please refer to the document of NetworkFabricL2IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l2IsolationDomainName = "example-l2domain"; + ResourceIdentifier networkFabricL2IsolationDomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l2IsolationDomainName); + NetworkFabricL2IsolationDomainResource networkFabricL2IsolationDomain = client.GetNetworkFabricL2IsolationDomainResource(networkFabricL2IsolationDomainResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricL2IsolationDomain.CommitConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // L2IsolationDomains_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricL2IsolationDomains_L2IsolationDomainsListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L2IsolationDomains_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "L2IsolationDomains_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricL2IsolationDomainResource item in subscriptionResource.GetNetworkFabricL2IsolationDomainsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL2IsolationDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainCollection.cs similarity index 68% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainCollection.cs index 4830a20eaf0e6..02a16d017dbcf 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_L3IsolationDomainCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_L3IsolationDomainCollection + public partial class Sample_NetworkFabricL3IsolationDomainCollection { // L3IsolationDomains_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_L3IsolationDomainsCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Create_MaximumSet_Gen.json // this example is just showing the usage of "L3IsolationDomains_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,50 +34,52 @@ public async Task CreateOrUpdate_L3IsolationDomainsCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L3IsolationDomainResource - L3IsolationDomainCollection collection = resourceGroupResource.GetL3IsolationDomains(); + // get the collection of this NetworkFabricL3IsolationDomainResource + NetworkFabricL3IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL3IsolationDomains(); // invoke the operation string l3IsolationDomainName = "example-l3domain"; - L3IsolationDomainData data = new L3IsolationDomainData(new AzureLocation("eastus")) + NetworkFabricL3IsolationDomainData data = new NetworkFabricL3IsolationDomainData(new AzureLocation("eastus"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric")) { + Annotation = "annotation", RedistributeConnectedSubnets = RedistributeConnectedSubnet.True, RedistributeStaticRoutes = RedistributeStaticRoute.False, AggregateRouteConfiguration = new AggregateRouteConfiguration() { IPv4Routes = { -new AggregateRoute() -{ -Prefix = "10.0.0.0/24", -} +new AggregateRoute("10.0.0.0/24") }, IPv6Routes = { -new AggregateRoute() -{ -Prefix = "10.0.0.1", -} +new AggregateRoute("3FFE:FFFF:0:CD30::a0/29") }, }, - Description = "creating L3 isolation domain", - ConnectedSubnetRoutePolicy = new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() + ConnectedSubnetRoutePolicy = new ConnectedSubnetRoutePolicy() { - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicy = new L3ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), + }, }, - NetworkFabricId = "/subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/networkFabrics/FabricName", + Tags = +{ +["keyID"] = "KeyValue", +}, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l3IsolationDomainName, data); - L3IsolationDomainResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l3IsolationDomainName, data); + NetworkFabricL3IsolationDomainResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = result.Data; + NetworkFabricL3IsolationDomainData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -87,7 +89,7 @@ public async Task CreateOrUpdate_L3IsolationDomainsCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_L3IsolationDomainsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json // this example is just showing the usage of "L3IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,21 +99,21 @@ public async Task Get_L3IsolationDomainsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L3IsolationDomainResource - L3IsolationDomainCollection collection = resourceGroupResource.GetL3IsolationDomains(); + // get the collection of this NetworkFabricL3IsolationDomainResource + NetworkFabricL3IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL3IsolationDomains(); // invoke the operation string l3IsolationDomainName = "example-l3domain"; - L3IsolationDomainResource result = await collection.GetAsync(l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource result = await collection.GetAsync(l3IsolationDomainName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = result.Data; + NetworkFabricL3IsolationDomainData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -121,7 +123,7 @@ public async Task Get_L3IsolationDomainsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_L3IsolationDomainsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json // this example is just showing the usage of "L3IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,13 +133,13 @@ public async Task Exists_L3IsolationDomainsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L3IsolationDomainResource - L3IsolationDomainCollection collection = resourceGroupResource.GetL3IsolationDomains(); + // get the collection of this NetworkFabricL3IsolationDomainResource + NetworkFabricL3IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL3IsolationDomains(); // invoke the operation string l3IsolationDomainName = "example-l3domain"; @@ -151,7 +153,7 @@ public async Task Exists_L3IsolationDomainsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_L3IsolationDomainsListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "L3IsolationDomains_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,20 +163,20 @@ public async Task GetAll_L3IsolationDomainsListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this L3IsolationDomainResource - L3IsolationDomainCollection collection = resourceGroupResource.GetL3IsolationDomains(); + // get the collection of this NetworkFabricL3IsolationDomainResource + NetworkFabricL3IsolationDomainCollection collection = resourceGroupResource.GetNetworkFabricL3IsolationDomains(); // invoke the operation and iterate over the result - await foreach (L3IsolationDomainResource item in collection.GetAllAsync()) + await foreach (NetworkFabricL3IsolationDomainResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - L3IsolationDomainData resourceData = item.Data; + NetworkFabricL3IsolationDomainData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainResource.cs new file mode 100644 index 0000000000000..cccaca9cf9b6b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricL3IsolationDomainResource.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricL3IsolationDomainResource + { + // L3IsolationDomains_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_L3IsolationDomainsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Get_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + NetworkFabricL3IsolationDomainResource result = await networkFabricL3IsolationDomain.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL3IsolationDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // L3IsolationDomains_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_L3IsolationDomainsUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Update_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + NetworkFabricL3IsolationDomainPatch patch = new NetworkFabricL3IsolationDomainPatch() + { + Annotation = "annotation1", + RedistributeConnectedSubnets = RedistributeConnectedSubnet.True, + RedistributeStaticRoutes = RedistributeStaticRoute.False, + AggregateRouteConfiguration = new AggregateRouteConfiguration() + { + IPv4Routes = +{ +new AggregateRoute("10.0.0.0/24") +}, + IPv6Routes = +{ +new AggregateRoute("3FFE:FFFF:0:CD30::a0/29") +}, + }, + ConnectedSubnetRoutePolicy = new ConnectedSubnetRoutePolicy() + { + ExportRoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName"), + ExportRoutePolicy = new L3ExportRoutePolicy() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + }, + }, + Tags = +{ +["key4953"] = "1234", +}, + }; + ArmOperation lro = await networkFabricL3IsolationDomain.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricL3IsolationDomainResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL3IsolationDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // L3IsolationDomains_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_L3IsolationDomainsDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + await networkFabricL3IsolationDomain.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // L3IsolationDomains_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricL3IsolationDomains_L3IsolationDomainsListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricL3IsolationDomainResource item in subscriptionResource.GetNetworkFabricL3IsolationDomainsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricL3IsolationDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_L3IsolationDomainsUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_updateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricL3IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + DeviceUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_L3IsolationDomainsValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricL3IsolationDomain.ValidateConfigurationAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // L3IsolationDomains_CommitConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CommitConfiguration_L3IsolationDomainsCommitConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/L3IsolationDomains_CommitConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "L3IsolationDomains_CommitConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricL3IsolationDomainResource created on azure + // for more information of creating NetworkFabricL3IsolationDomainResource, please refer to the document of NetworkFabricL3IsolationDomainResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string l3IsolationDomainName = "example-l3domain"; + ResourceIdentifier networkFabricL3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + NetworkFabricL3IsolationDomainResource networkFabricL3IsolationDomain = client.GetNetworkFabricL3IsolationDomainResource(networkFabricL3IsolationDomainResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricL3IsolationDomain.CommitConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupCollection.cs new file mode 100644 index 0000000000000..61eca599d2230 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupCollection.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Net; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricNeighborGroupCollection + { + // NeighborGroups_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_NeighborGroupsCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Create_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricNeighborGroupResource + NetworkFabricNeighborGroupCollection collection = resourceGroupResource.GetNetworkFabricNeighborGroups(); + + // invoke the operation + string neighborGroupName = "example-neighborGroup"; + NetworkFabricNeighborGroupData data = new NetworkFabricNeighborGroupData(new AzureLocation("eastus")) + { + Annotation = "annotation", + Destination = new NeighborGroupDestination() + { + IPv4Addresses = +{ +IPAddress.Parse("10.10.10.10"),IPAddress.Parse("20.10.10.10"),IPAddress.Parse("30.10.10.10"),IPAddress.Parse("40.10.10.10"),IPAddress.Parse("50.10.10.10"),IPAddress.Parse("60.10.10.10"),IPAddress.Parse("70.10.10.10"),IPAddress.Parse("80.10.10.10"),IPAddress.Parse("90.10.10.10") +}, + IPv6Addresses = +{ +"2F::/100" +}, + }, + Tags = +{ +["key8107"] = "1234", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, neighborGroupName, data); + NetworkFabricNeighborGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NeighborGroups_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NeighborGroupsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricNeighborGroupResource + NetworkFabricNeighborGroupCollection collection = resourceGroupResource.GetNetworkFabricNeighborGroups(); + + // invoke the operation + string neighborGroupName = "example-neighborGroup"; + NetworkFabricNeighborGroupResource result = await collection.GetAsync(neighborGroupName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NeighborGroups_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_NeighborGroupsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricNeighborGroupResource + NetworkFabricNeighborGroupCollection collection = resourceGroupResource.GetNetworkFabricNeighborGroups(); + + // invoke the operation + string neighborGroupName = "example-neighborGroup"; + bool result = await collection.ExistsAsync(neighborGroupName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // NeighborGroups_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_NeighborGroupsListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkFabricNeighborGroupResource + NetworkFabricNeighborGroupCollection collection = resourceGroupResource.GetNetworkFabricNeighborGroups(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricNeighborGroupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupResource.cs new file mode 100644 index 0000000000000..d86fa2ec635a4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricNeighborGroupResource.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Net; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricNeighborGroupResource + { + // NeighborGroups_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NeighborGroupsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricNeighborGroupResource created on azure + // for more information of creating NetworkFabricNeighborGroupResource, please refer to the document of NetworkFabricNeighborGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string neighborGroupName = "example-neighborGroup"; + ResourceIdentifier networkFabricNeighborGroupResourceId = NetworkFabricNeighborGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, neighborGroupName); + NetworkFabricNeighborGroupResource networkFabricNeighborGroup = client.GetNetworkFabricNeighborGroupResource(networkFabricNeighborGroupResourceId); + + // invoke the operation + NetworkFabricNeighborGroupResource result = await networkFabricNeighborGroup.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NeighborGroups_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_NeighborGroupsUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricNeighborGroupResource created on azure + // for more information of creating NetworkFabricNeighborGroupResource, please refer to the document of NetworkFabricNeighborGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string neighborGroupName = "example-neighborGroup"; + ResourceIdentifier networkFabricNeighborGroupResourceId = NetworkFabricNeighborGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, neighborGroupName); + NetworkFabricNeighborGroupResource networkFabricNeighborGroup = client.GetNetworkFabricNeighborGroupResource(networkFabricNeighborGroupResourceId); + + // invoke the operation + NetworkFabricNeighborGroupPatch patch = new NetworkFabricNeighborGroupPatch() + { + Annotation = "Updating", + Destination = new NeighborGroupDestination() + { + IPv4Addresses = +{ +IPAddress.Parse("10.10.10.10"),IPAddress.Parse("20.10.10.10"),IPAddress.Parse("30.10.10.10"),IPAddress.Parse("40.10.10.10"),IPAddress.Parse("50.10.10.10"),IPAddress.Parse("60.10.10.10"),IPAddress.Parse("70.10.10.10"),IPAddress.Parse("80.10.10.10"),IPAddress.Parse("90.10.10.10") +}, + IPv6Addresses = +{ +"2F::/100" +}, + }, + Tags = +{ +["key8107"] = "2345", +}, + }; + ArmOperation lro = await networkFabricNeighborGroup.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricNeighborGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NeighborGroups_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_NeighborGroupsDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricNeighborGroupResource created on azure + // for more information of creating NetworkFabricNeighborGroupResource, please refer to the document of NetworkFabricNeighborGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string neighborGroupName = "example-neighborGroup"; + ResourceIdentifier networkFabricNeighborGroupResourceId = NetworkFabricNeighborGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, neighborGroupName); + NetworkFabricNeighborGroupResource networkFabricNeighborGroup = client.GetNetworkFabricNeighborGroupResource(networkFabricNeighborGroupResourceId); + + // invoke the operation + await networkFabricNeighborGroup.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // NeighborGroups_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricNeighborGroups_NeighborGroupsListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NeighborGroups_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "NeighborGroups_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricNeighborGroupResource item in subscriptionResource.GetNetworkFabricNeighborGroupsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricNeighborGroupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs index a6c5c96760662..368af82e7e625 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricResource.cs @@ -24,7 +24,7 @@ public partial class Sample_NetworkFabricResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,9 +34,9 @@ public async Task Get_NetworkFabricsGetMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); @@ -55,7 +55,7 @@ public async Task Get_NetworkFabricsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkFabricsUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Update_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,26 +65,138 @@ public async Task Update_NetworkFabricsUpdateMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); // invoke the operation NetworkFabricPatch patch = new NetworkFabricPatch() { - Tags = + Annotation = "annotation1", + RackCount = 6, + ServerCountPerRack = 10, + IPv4Prefix = "10.18.0.0/17", + IPv6Prefix = "3FFE:FFFF:0:CD40::/60", + FabricAsn = 12345, + TerminalServerConfiguration = new NetworkFabricPatchablePropertiesTerminalServerConfiguration() + { + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "40.0.0.14/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + Username = "username1", + Password = "xxxxxxxx", + SerialNumber = "1234567", + }, + ManagementNetworkConfiguration = new ManagementNetworkConfigurationPatchableProperties() + { + InfrastructureVpnConfiguration = new VpnConfigurationPatchableProperties() + { + NetworkToNetworkInterconnectId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni"), + PeeringOption = PeeringOption.OptionB, + OptionBProperties = new OptionBProperties() + { + ImportRouteTargets = { -["key1758"] = "", +"65046:10050" }, - Annotation = "annotationValue", - TerminalServerConfiguration = new TerminalServerPatchableProperties() - { - Username = "username", - Password = "xxxxxxx", - SerialNumber = "234567", + ExportRouteTargets = +{ +"65046:10050" +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ +"65046:10050" +}, + ImportIPv6RouteTargets = +{ +"65046:10050" +}, + ExportIPv4RouteTargets = +{ +"65046:10050" +}, + ExportIPv6RouteTargets = +{ +"65046:10050" +}, + }, + }, + OptionAProperties = new VpnConfigurationPatchableOptionAProperties() + { + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.13/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + Mtu = 1501, + VlanId = 3001, + PeerAsn = 1235, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 10, + }, + }, + }, + WorkloadVpnConfiguration = new VpnConfigurationPatchableProperties() + { + NetworkToNetworkInterconnectId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric/networkToNetworkInterconnects/example-nni"), + PeeringOption = PeeringOption.OptionA, + OptionBProperties = new OptionBProperties() + { + ImportRouteTargets = +{ +"65046:10050" +}, + ExportRouteTargets = +{ +"65046:10050" +}, + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = +{ +"65046:10050" +}, + ImportIPv6RouteTargets = +{ +"65046:10050" +}, + ExportIPv4RouteTargets = +{ +"65046:10050" +}, + ExportIPv6RouteTargets = +{ +"65046:10050" +}, + }, + }, + OptionAProperties = new VpnConfigurationPatchableOptionAProperties() + { + PrimaryIPv4Prefix = "10.0.0.14/30", + PrimaryIPv6Prefix = "2FFE:FFFF:0:CD30::a7/126", + SecondaryIPv4Prefix = "10.0.0.15/30", + SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/126", + Mtu = 1500, + VlanId = 3000, + PeerAsn = 61234, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 5, + }, + }, + }, }, + Tags = +{ +["keyID"] = "KeyValue", +}, }; ArmOperation lro = await networkFabric.UpdateAsync(WaitUntil.Completed, patch); NetworkFabricResource result = lro.Value; @@ -101,7 +213,7 @@ public async Task Update_NetworkFabricsUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkFabricsDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_Delete_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,9 +223,9 @@ public async Task Delete_NetworkFabricsDeleteMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "70A68989-24C0-4FA7-B1B2-8A2BB6D10CA8"; - string resourceGroupName = "rgNetworkFabrics"; - string networkFabricName = "lrhjxlxlhgvufessdcuetcwnto"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); @@ -128,7 +240,7 @@ public async Task Delete_NetworkFabricsDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkFabrics_NetworkFabricsListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +250,7 @@ public async Task GetNetworkFabrics_NetworkFabricsListBySubscriptionMaximumSetGe // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -160,7 +272,7 @@ public async Task GetNetworkFabrics_NetworkFabricsListBySubscriptionMaximumSetGe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Provision_NetworkFabricsProvisionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_provision_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_provision_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_provision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,16 +282,17 @@ public async Task Provision_NetworkFabricsProvisionMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); // invoke the operation - await networkFabric.ProvisionAsync(WaitUntil.Completed); + ArmOperation lro = await networkFabric.ProvisionAsync(WaitUntil.Completed); + DeviceUpdateCommonPostActionResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // NetworkFabrics_deprovision_MaximumSet_Gen @@ -187,7 +300,7 @@ public async Task Provision_NetworkFabricsProvisionMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Deprovision_NetworkFabricsDeprovisionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_deprovision_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabrics_deprovision" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,16 +310,237 @@ public async Task Deprovision_NetworkFabricsDeprovisionMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); // invoke the operation - await networkFabric.DeprovisionAsync(WaitUntil.Completed); + ArmOperation lro = await networkFabric.DeprovisionAsync(WaitUntil.Completed); + DeviceUpdateCommonPostActionResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_upgrade_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Upgrade_NetworkFabricsUpgradeMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_upgrade_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_upgrade" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + NetworkFabricUpdateVersionContent content = new NetworkFabricUpdateVersionContent() + { + Version = "version1", + }; + ArmOperation lro = await networkFabric.UpgradeAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_refreshConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RefreshConfiguration_NetworkFabricsRefreshConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_refreshConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_refreshConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + ArmOperation lro = await networkFabric.RefreshConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateWorkloadManagementBfdConfiguration_NetworkFabricsUpdateWorkloadManagementBfdConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateWorkloadManagementBfdConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_UpdateWorkloadManagementBfdConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabric.UpdateWorkloadManagementBfdConfigurationAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateInfraManagementBfdConfiguration_NetworkFabricsUpdateInfraManagementBfdConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_UpdateInfraManagementBfdConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_UpdateInfraManagementBfdConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabric.UpdateInfraManagementBfdConfigurationAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_NetworkFabricsValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + ValidateConfigurationContent content = new ValidateConfigurationContent() + { + ValidateAction = NetworkFabricValidateAction.Cabling, + }; + ArmOperation lro = await networkFabric.ValidateConfigurationAsync(WaitUntil.Completed, content); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_GetTopology_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetTopology_NetworkFabricsGetTopologyMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_GetTopology_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_GetTopology" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + ArmOperation lro = await networkFabric.GetTopologyAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkFabrics_CommitConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CommitConfiguration_NetworkFabricsCommitConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabrics_CommitConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkFabrics_CommitConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricResource created on azure + // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); + NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); + + // invoke the operation + ArmOperation lro = await networkFabric.CommitConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs similarity index 62% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs index 4b5cf5984f177..0398a9c3e9b94 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyCollection.cs @@ -17,14 +17,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { - public partial class Sample_RoutePolicyCollection + public partial class Sample_NetworkFabricRoutePolicyCollection { // RoutePolicies_Create_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RoutePoliciesCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Create_MaximumSet_Gen.json // this example is just showing the usage of "RoutePolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,80 +34,83 @@ public async Task CreateOrUpdate_RoutePoliciesCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this RoutePolicyResource - RoutePolicyCollection collection = resourceGroupResource.GetRoutePolicies(); + // get the collection of this NetworkFabricRoutePolicyResource + NetworkFabricRoutePolicyCollection collection = resourceGroupResource.GetNetworkFabricRoutePolicies(); // invoke the operation - string routePolicyName = "routePolicyName"; - RoutePolicyData data = new RoutePolicyData(new AzureLocation("EastUS"), new RoutePolicyStatementProperties[] + string routePolicyName = "example-routePolicy"; + NetworkFabricRoutePolicyData data = new NetworkFabricRoutePolicyData(new AzureLocation("eastus"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric")) { + Annotation = "annotation", + Statements = +{ new RoutePolicyStatementProperties(7,new StatementConditionProperties() { -IPPrefixId = "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix", +RoutePolicyConditionType = RoutePolicyConditionType.Or, +IPPrefixId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix"), IPExtendedCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") }, IPCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") }, -},new StatementActionProperties(CommunityActionType.Permit) +},new StatementActionProperties(RoutePolicyActionType.Permit) { LocalPreference = 20, IPCommunityProperties = new ActionIPCommunityProperties() { DeleteIPCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") }, SetIPCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") }, AddIPCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") }, }, IPExtendedCommunityProperties = new ActionIPExtendedCommunityProperties() { DeleteIPExtendedCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") }, SetIPExtendedCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") }, AddIPExtendedCommunityIds = { -"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName" +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") }, }, }) { -Annotation = "annotationValue", +Annotation = "annotation", } - }) - { - Annotation = "annotationValue", +}, + AddressFamilyType = AddressFamilyType.IPv4, Tags = { -["key8254"] = "", +["keyID"] = "keyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, routePolicyName, data); - RoutePolicyResource result = lro.Value; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, routePolicyName, data); + NetworkFabricRoutePolicyResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = result.Data; + NetworkFabricRoutePolicyData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -117,7 +120,7 @@ public async Task CreateOrUpdate_RoutePoliciesCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RoutePoliciesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json // this example is just showing the usage of "RoutePolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,21 +130,21 @@ public async Task Get_RoutePoliciesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this RoutePolicyResource - RoutePolicyCollection collection = resourceGroupResource.GetRoutePolicies(); + // get the collection of this NetworkFabricRoutePolicyResource + NetworkFabricRoutePolicyCollection collection = resourceGroupResource.GetNetworkFabricRoutePolicies(); // invoke the operation - string routePolicyName = "routePolicyName"; - RoutePolicyResource result = await collection.GetAsync(routePolicyName); + string routePolicyName = "example-routePolicy"; + NetworkFabricRoutePolicyResource result = await collection.GetAsync(routePolicyName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = result.Data; + NetworkFabricRoutePolicyData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -151,7 +154,7 @@ public async Task Get_RoutePoliciesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RoutePoliciesGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json // this example is just showing the usage of "RoutePolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,16 +164,16 @@ public async Task Exists_RoutePoliciesGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this RoutePolicyResource - RoutePolicyCollection collection = resourceGroupResource.GetRoutePolicies(); + // get the collection of this NetworkFabricRoutePolicyResource + NetworkFabricRoutePolicyCollection collection = resourceGroupResource.GetNetworkFabricRoutePolicies(); // invoke the operation - string routePolicyName = "routePolicyName"; + string routePolicyName = "example-routePolicy"; bool result = await collection.ExistsAsync(routePolicyName); Console.WriteLine($"Succeeded: {result}"); @@ -181,7 +184,7 @@ public async Task Exists_RoutePoliciesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RoutePoliciesListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "RoutePolicies_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,20 +194,20 @@ public async Task GetAll_RoutePoliciesListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - // get the collection of this RoutePolicyResource - RoutePolicyCollection collection = resourceGroupResource.GetRoutePolicies(); + // get the collection of this NetworkFabricRoutePolicyResource + NetworkFabricRoutePolicyCollection collection = resourceGroupResource.GetNetworkFabricRoutePolicies(); // invoke the operation and iterate over the result - await foreach (RoutePolicyResource item in collection.GetAllAsync()) + await foreach (NetworkFabricRoutePolicyResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = item.Data; + NetworkFabricRoutePolicyData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs new file mode 100644 index 0000000000000..71a2b513d903f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricRoutePolicyResource.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkFabricRoutePolicyResource + { + // RoutePolicies_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_RoutePoliciesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + NetworkFabricRoutePolicyResource result = await networkFabricRoutePolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricRoutePolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // RoutePolicies_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_RoutePoliciesUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Update_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + NetworkFabricRoutePolicyPatch patch = new NetworkFabricRoutePolicyPatch() + { + Statements = +{ +new RoutePolicyStatementProperties(7,new StatementConditionProperties() +{ +RoutePolicyConditionType = RoutePolicyConditionType.Or, +IPPrefixId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix"), +IPExtendedCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") +}, +IPCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") +}, +},new StatementActionProperties(RoutePolicyActionType.Permit) +{ +LocalPreference = 20, +IPCommunityProperties = new ActionIPCommunityProperties() +{ +DeleteIPCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") +}, +SetIPCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") +}, +AddIPCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipCommunities/example-ipCommunity") +}, +}, +IPExtendedCommunityProperties = new ActionIPExtendedCommunityProperties() +{ +DeleteIPExtendedCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") +}, +SetIPExtendedCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") +}, +AddIPExtendedCommunityIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/example-ipExtendedCommunity") +}, +}, +}) +{ +Annotation = "annotation", +} +}, + Tags = +{ +["keyID"] = "keyValue", +}, + }; + ArmOperation lro = await networkFabricRoutePolicy.UpdateAsync(WaitUntil.Completed, patch); + NetworkFabricRoutePolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricRoutePolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // RoutePolicies_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_RoutePoliciesDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + await networkFabricRoutePolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // RoutePolicies_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkFabricRoutePolicies_RoutePoliciesListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricRoutePolicyResource item in subscriptionResource.GetNetworkFabricRoutePoliciesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkFabricRoutePolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_RoutePoliciesUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkFabricRoutePolicy.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + DeviceUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // RoutePolicies_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_RoutePoliciesValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricRoutePolicy.ValidateConfigurationAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // RoutePolicies_CommitConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CommitConfiguration_RoutePoliciesCommitConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/RoutePolicies_CommitConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "RoutePolicies_CommitConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkFabricRoutePolicyResource created on azure + // for more information of creating NetworkFabricRoutePolicyResource, please refer to the document of NetworkFabricRoutePolicyResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string routePolicyName = "example-routePolicy"; + ResourceIdentifier networkFabricRoutePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + NetworkFabricRoutePolicyResource networkFabricRoutePolicy = client.GetNetworkFabricRoutePolicyResource(networkFabricRoutePolicyResourceId); + + // invoke the operation + ArmOperation lro = await networkFabricRoutePolicy.CommitConfigurationAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuCollection.cs index db9388bf934dd..c53fe42d3983a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NetworkFabricSkuCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +32,7 @@ public async Task Get_NetworkFabricSkusGetMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -40,7 +40,7 @@ public async Task Get_NetworkFabricSkusGetMaximumSetGen() NetworkFabricSkuCollection collection = subscriptionResource.GetNetworkFabricSkus(); // invoke the operation - string networkFabricSkuName = "networkFabricSkuName"; + string networkFabricSkuName = "example-fabricsku"; NetworkFabricSkuResource result = await collection.GetAsync(networkFabricSkuName); // the variable result is a resource, you could call other operations on this instance as well @@ -55,7 +55,7 @@ public async Task Get_NetworkFabricSkusGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkFabricSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Exists_NetworkFabricSkusGetMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -73,7 +73,7 @@ public async Task Exists_NetworkFabricSkusGetMaximumSetGen() NetworkFabricSkuCollection collection = subscriptionResource.GetNetworkFabricSkus(); // invoke the operation - string networkFabricSkuName = "networkFabricSkuName"; + string networkFabricSkuName = "example-fabricsku"; bool result = await collection.ExistsAsync(networkFabricSkuName); Console.WriteLine($"Succeeded: {result}"); @@ -84,7 +84,7 @@ public async Task Exists_NetworkFabricSkusGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkFabricSkusListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricSkus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task GetAll_NetworkFabricSkusListBySubscriptionMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuResource.cs index cef99236cd15f..b973d96339a77 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkFabricSkuResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkFabricSkuResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkFabricSkusGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkFabricSkus_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkFabricSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,8 +31,8 @@ public async Task Get_NetworkFabricSkusGetMaximumSetGen() // this example assumes you already have this NetworkFabricSkuResource created on azure // for more information of creating NetworkFabricSkuResource, please refer to the document of NetworkFabricSkuResource - string subscriptionId = "subscriptionId"; - string networkFabricSkuName = "networkFabricSkuName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string networkFabricSkuName = "example-fabricsku"; ResourceIdentifier networkFabricSkuResourceId = NetworkFabricSkuResource.CreateResourceIdentifier(subscriptionId, networkFabricSkuName); NetworkFabricSkuResource networkFabricSku = client.GetNetworkFabricSkuResource(networkFabricSkuResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs deleted file mode 100644 index 1afbf934bb965..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_NetworkInterfaceResource - { - // NetworkInterfaces_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_NetworkInterfacesGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Get_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkInterfaceResource created on azure - // for more information of creating NetworkInterfaceResource, please refer to the document of NetworkInterfaceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - string networkInterfaceName = "networkInterfaceName"; - ResourceIdentifier networkInterfaceResourceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - NetworkInterfaceResource networkInterface = client.GetNetworkInterfaceResource(networkInterfaceResourceId); - - // invoke the operation - NetworkInterfaceResource result = await networkInterface.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NetworkInterfaceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // NetworkInterfaces_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_NetworkInterfacesUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Update_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkInterfaceResource created on azure - // for more information of creating NetworkInterfaceResource, please refer to the document of NetworkInterfaceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - string networkInterfaceName = "networkInterfaceName"; - ResourceIdentifier networkInterfaceResourceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - NetworkInterfaceResource networkInterface = client.GetNetworkInterfaceResource(networkInterfaceResourceId); - - // invoke the operation - NetworkInterfacePatch patch = new NetworkInterfacePatch() - { - Annotation = "null", - }; - ArmOperation lro = await networkInterface.UpdateAsync(WaitUntil.Completed, patch); - NetworkInterfaceResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NetworkInterfaceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // NetworkInterfaces_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_NetworkInterfacesDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkInterfaceResource created on azure - // for more information of creating NetworkInterfaceResource, please refer to the document of NetworkInterfaceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - string networkInterfaceName = "networkInterfaceName"; - ResourceIdentifier networkInterfaceResourceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - NetworkInterfaceResource networkInterface = client.GetNetworkInterfaceResource(networkInterfaceResourceId); - - // invoke the operation - await networkInterface.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // NetworkInterfaces_getStatus_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetStatus_NetworkInterfacesGetStatusMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_getStatus_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_getStatus" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkInterfaceResource created on azure - // for more information of creating NetworkInterfaceResource, please refer to the document of NetworkInterfaceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - string networkInterfaceName = "networkInterfaceName"; - ResourceIdentifier networkInterfaceResourceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - NetworkInterfaceResource networkInterface = client.GetNetworkInterfaceResource(networkInterfaceResourceId); - - // invoke the operation - ArmOperation lro = await networkInterface.GetStatusAsync(WaitUntil.Completed); - InterfaceStatus result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - - // NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateAdministrativeState_NetworkInterfacesUpdateAdministrativeStateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkInterfaces_updateAdministrativeState_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkInterfaces_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkInterfaceResource created on azure - // for more information of creating NetworkInterfaceResource, please refer to the document of NetworkInterfaceResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkDeviceName = "networkDeviceName"; - string networkInterfaceName = "networkInterfaceName"; - ResourceIdentifier networkInterfaceResourceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName); - NetworkInterfaceResource networkInterface = client.GetNetworkInterfaceResource(networkInterfaceResourceId); - - // invoke the operation - UpdateAdministrativeState body = new UpdateAdministrativeState() - { - State = AdministrativeState.Enable, - }; - await networkInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerCollection.cs new file mode 100644 index 0000000000000..e0953fd634ef4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkPacketBrokerCollection + { + // NetworkPacketBrokers_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_NetworkPacketBrokersCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Create_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkPacketBrokerResource + NetworkPacketBrokerCollection collection = resourceGroupResource.GetNetworkPacketBrokers(); + + // invoke the operation + string networkPacketBrokerName = "example-networkPacketBroker"; + NetworkPacketBrokerData data = new NetworkPacketBrokerData(new AzureLocation("eastuseuap"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) + { + Tags = +{ +["key2806"] = "key", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkPacketBrokerName, data); + NetworkPacketBrokerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkPacketBrokers_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkPacketBrokersGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkPacketBrokerResource + NetworkPacketBrokerCollection collection = resourceGroupResource.GetNetworkPacketBrokers(); + + // invoke the operation + string networkPacketBrokerName = "example-networkPacketBroker"; + NetworkPacketBrokerResource result = await collection.GetAsync(networkPacketBrokerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkPacketBrokers_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_NetworkPacketBrokersGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkPacketBrokerResource + NetworkPacketBrokerCollection collection = resourceGroupResource.GetNetworkPacketBrokers(); + + // invoke the operation + string networkPacketBrokerName = "example-networkPacketBroker"; + bool result = await collection.ExistsAsync(networkPacketBrokerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_NetworkPacketBrokersListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkPacketBrokerResource + NetworkPacketBrokerCollection collection = resourceGroupResource.GetNetworkPacketBrokers(); + + // invoke the operation and iterate over the result + await foreach (NetworkPacketBrokerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerResource.cs new file mode 100644 index 0000000000000..40979bd08f194 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkPacketBrokerResource.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkPacketBrokerResource + { + // NetworkPacketBrokers_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkPacketBrokersGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkPacketBrokerResource created on azure + // for more information of creating NetworkPacketBrokerResource, please refer to the document of NetworkPacketBrokerResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkPacketBrokerName = "example-networkPacketBroker"; + ResourceIdentifier networkPacketBrokerResourceId = NetworkPacketBrokerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkPacketBrokerName); + NetworkPacketBrokerResource networkPacketBroker = client.GetNetworkPacketBrokerResource(networkPacketBrokerResourceId); + + // invoke the operation + NetworkPacketBrokerResource result = await networkPacketBroker.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkPacketBrokers_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_NetworkPacketBrokersUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkPacketBrokerResource created on azure + // for more information of creating NetworkPacketBrokerResource, please refer to the document of NetworkPacketBrokerResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkPacketBrokerName = "example-networkPacketBroker"; + ResourceIdentifier networkPacketBrokerResourceId = NetworkPacketBrokerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkPacketBrokerName); + NetworkPacketBrokerResource networkPacketBroker = client.GetNetworkPacketBrokerResource(networkPacketBrokerResourceId); + + // invoke the operation + NetworkPacketBrokerPatch patch = new NetworkPacketBrokerPatch() + { + Tags = +{ +["key8772"] = "1234", +}, + }; + ArmOperation lro = await networkPacketBroker.UpdateAsync(WaitUntil.Completed, patch); + NetworkPacketBrokerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkPacketBrokers_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_NetworkPacketBrokersDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkPacketBrokerResource created on azure + // for more information of creating NetworkPacketBrokerResource, please refer to the document of NetworkPacketBrokerResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkPacketBrokerName = "example-networkPacketBroker"; + ResourceIdentifier networkPacketBrokerResourceId = NetworkPacketBrokerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkPacketBrokerName); + NetworkPacketBrokerResource networkPacketBroker = client.GetNetworkPacketBrokerResource(networkPacketBrokerResourceId); + + // invoke the operation + await networkPacketBroker.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkPacketBrokers_NetworkPacketBrokersListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkPacketBrokers_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkPacketBrokers_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkPacketBrokerResource item in subscriptionResource.GetNetworkPacketBrokersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkPacketBrokerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackCollection.cs index ade22b22a0633..61fcb26629102 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackCollection.cs @@ -12,6 +12,7 @@ using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.ManagedNetworkFabric.Samples @@ -23,7 +24,7 @@ public partial class Sample_NetworkRackCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkRacksCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,8 +34,8 @@ public async Task CreateOrUpdate_NetworkRacksCreateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -42,10 +43,11 @@ public async Task CreateOrUpdate_NetworkRacksCreateMaximumSetGen() NetworkRackCollection collection = resourceGroupResource.GetNetworkRacks(); // invoke the operation - string networkRackName = "networkRackName"; - NetworkRackData data = new NetworkRackData(new AzureLocation("eastus"), "RackSKU", "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/networkFabrics/networkFabricName") + string networkRackName = "example-rack"; + NetworkRackData data = new NetworkRackData(new AzureLocation("eastuseuap"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-networkFabric")) { - Annotation = "null", + Annotation = "annotation", + NetworkRackType = NetworkRackType.Aggregate, Tags = { ["keyID"] = "keyValue", @@ -66,7 +68,7 @@ public async Task CreateOrUpdate_NetworkRacksCreateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkRacksGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,8 +78,8 @@ public async Task Get_NetworkRacksGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -85,7 +87,7 @@ public async Task Get_NetworkRacksGetMaximumSetGen() NetworkRackCollection collection = resourceGroupResource.GetNetworkRacks(); // invoke the operation - string networkRackName = "networkRackName"; + string networkRackName = "example-rack"; NetworkRackResource result = await collection.GetAsync(networkRackName); // the variable result is a resource, you could call other operations on this instance as well @@ -100,7 +102,7 @@ public async Task Get_NetworkRacksGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkRacksGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,8 +112,8 @@ public async Task Exists_NetworkRacksGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -119,7 +121,7 @@ public async Task Exists_NetworkRacksGetMaximumSetGen() NetworkRackCollection collection = resourceGroupResource.GetNetworkRacks(); // invoke the operation - string networkRackName = "networkRackName"; + string networkRackName = "example-rack"; bool result = await collection.ExistsAsync(networkRackName); Console.WriteLine($"Succeeded: {result}"); @@ -130,7 +132,7 @@ public async Task Exists_NetworkRacksGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkRacksListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,8 +142,8 @@ public async Task GetAll_NetworkRacksListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackResource.cs index 2be7e3726d54a..5a6f033031541 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Threading.Tasks; using Azure; using Azure.Core; @@ -25,7 +24,7 @@ public partial class Sample_NetworkRackResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkRacksGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -35,9 +34,9 @@ public async Task Get_NetworkRacksGetMaximumSetGen() // this example assumes you already have this NetworkRackResource created on azure // for more information of creating NetworkRackResource, please refer to the document of NetworkRackResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkRackName = "networkRackName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkRackName = "example-rack"; ResourceIdentifier networkRackResourceId = NetworkRackResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkRackName); NetworkRackResource networkRack = client.GetNetworkRackResource(networkRackResourceId); @@ -56,7 +55,7 @@ public async Task Get_NetworkRacksGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkRacksUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Update_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Update_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -66,18 +65,15 @@ public async Task Update_NetworkRacksUpdateMaximumSetGen() // this example assumes you already have this NetworkRackResource created on azure // for more information of creating NetworkRackResource, please refer to the document of NetworkRackResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkRackName = "networkRackName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkRackName = "example-rack"; ResourceIdentifier networkRackResourceId = NetworkRackResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkRackName); NetworkRackResource networkRack = client.GetNetworkRackResource(networkRackResourceId); // invoke the operation NetworkRackPatch patch = new NetworkRackPatch() { - Properties = BinaryData.FromObjectAsJson(new Dictionary() - { - }), Tags = { ["keyID"] = "keyValue", @@ -98,7 +94,7 @@ public async Task Update_NetworkRacksUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkRacksDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_Delete_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,9 +104,9 @@ public async Task Delete_NetworkRacksDeleteMaximumSetGen() // this example assumes you already have this NetworkRackResource created on azure // for more information of creating NetworkRackResource, please refer to the document of NetworkRackResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkRackName = "networkRackName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkRackName = "example-rack"; ResourceIdentifier networkRackResourceId = NetworkRackResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkRackName); NetworkRackResource networkRack = client.GetNetworkRackResource(networkRackResourceId); @@ -125,7 +121,7 @@ public async Task Delete_NetworkRacksDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkRacks_NetworkRacksListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkRacks_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "NetworkRacks_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +131,7 @@ public async Task GetNetworkRacks_NetworkRacksListBySubscriptionMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuCollection.cs deleted file mode 100644 index e2c9b3df7b2f4..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuCollection.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_NetworkRackSkuCollection - { - // NetworkRackSkus_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_NetworkRackSkusGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkRackSkus_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this NetworkRackSkuResource - NetworkRackSkuCollection collection = subscriptionResource.GetNetworkRackSkus(); - - // invoke the operation - string networkRackSkuName = "networkRackSkuName"; - NetworkRackSkuResource result = await collection.GetAsync(networkRackSkuName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NetworkRackSkuData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // NetworkRackSkus_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_NetworkRackSkusGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkRackSkus_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this NetworkRackSkuResource - NetworkRackSkuCollection collection = subscriptionResource.GetNetworkRackSkus(); - - // invoke the operation - string networkRackSkuName = "networkRackSkuName"; - bool result = await collection.ExistsAsync(networkRackSkuName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // NetworkRackSkus_ListBySubscription_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_NetworkRackSkusListBySubscriptionMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_ListBySubscription_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkRackSkus_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // get the collection of this NetworkRackSkuResource - NetworkRackSkuCollection collection = subscriptionResource.GetNetworkRackSkus(); - - // invoke the operation and iterate over the result - await foreach (NetworkRackSkuResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NetworkRackSkuData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuResource.cs deleted file mode 100644 index 06b3fb9742c20..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkRackSkuResource.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_NetworkRackSkuResource - { - // NetworkRackSkus_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_NetworkRackSkusGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkRackSkus_Get_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkRackSkus_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkRackSkuResource created on azure - // for more information of creating NetworkRackSkuResource, please refer to the document of NetworkRackSkuResource - string subscriptionId = "subscriptionId"; - string networkRackSkuName = "networkRackSkuName"; - ResourceIdentifier networkRackSkuResourceId = NetworkRackSkuResource.CreateResourceIdentifier(subscriptionId, networkRackSkuName); - NetworkRackSkuResource networkRackSku = client.GetNetworkRackSkuResource(networkRackSkuResourceId); - - // invoke the operation - NetworkRackSkuResource result = await networkRackSku.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - NetworkRackSkuData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapCollection.cs new file mode 100644 index 0000000000000..db0cabbf6f279 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapCollection.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkTapCollection + { + // NetworkTaps_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_NetworkTapsCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Create_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapResource + NetworkTapCollection collection = resourceGroupResource.GetNetworkTaps(); + + // invoke the operation + string networkTapName = "example-networkTap"; + NetworkTapData data = new NetworkTapData(new AzureLocation("eastuseuap"), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/example-networkPacketBroker"), new NetworkTapPropertiesDestinationsItem[] + { +new NetworkTapPropertiesDestinationsItem() +{ +Name = "example-destinaionName", +DestinationType = NetworkTapDestinationType.IsolationDomain, +DestinationId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork"), +IsolationDomainProperties = new IsolationDomainProperties() +{ +Encapsulation = IsolationDomainEncapsulationType.None, +NeighborGroupIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") +}, +}, +DestinationTapRuleId = new ResourceIdentifier("/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"), +} + }) + { + Annotation = "annotation", + PollingType = NetworkTapPollingType.Pull, + Tags = +{ +["key6024"] = "1234", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkTapName, data); + NetworkTapResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTaps_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkTapsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapResource + NetworkTapCollection collection = resourceGroupResource.GetNetworkTaps(); + + // invoke the operation + string networkTapName = "example-networkTap"; + NetworkTapResource result = await collection.GetAsync(networkTapName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTaps_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_NetworkTapsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapResource + NetworkTapCollection collection = resourceGroupResource.GetNetworkTaps(); + + // invoke the operation + string networkTapName = "example-networkTap"; + bool result = await collection.ExistsAsync(networkTapName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkTaps_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_NetworkTapsListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapResource + NetworkTapCollection collection = resourceGroupResource.GetNetworkTaps(); + + // invoke the operation and iterate over the result + await foreach (NetworkTapResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapResource.cs new file mode 100644 index 0000000000000..2d1d08fc4f0ad --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapResource.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkTapResource + { + // NetworkTaps_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkTapsGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapResource created on azure + // for more information of creating NetworkTapResource, please refer to the document of NetworkTapResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapName = "example-networkTap"; + ResourceIdentifier networkTapResourceId = NetworkTapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapName); + NetworkTapResource networkTap = client.GetNetworkTapResource(networkTapResourceId); + + // invoke the operation + NetworkTapResource result = await networkTap.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTaps_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_NetworkTapsUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapResource created on azure + // for more information of creating NetworkTapResource, please refer to the document of NetworkTapResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapName = "example-networkTap"; + ResourceIdentifier networkTapResourceId = NetworkTapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapName); + NetworkTapResource networkTap = client.GetNetworkTapResource(networkTapResourceId); + + // invoke the operation + NetworkTapPatch patch = new NetworkTapPatch() + { + Annotation = "annotation1", + PollingType = NetworkTapPollingType.Pull, + Destinations = +{ +new NetworkTapPatchableParametersDestinationsItem() +{ +Name = "example-destinaionName", +DestinationType = NetworkTapDestinationType.IsolationDomain, +DestinationId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/l3IsloationDomains/example-l3Domain/internalNetworks/example-internalNetwork"), +IsolationDomainProperties = new IsolationDomainProperties() +{ +Encapsulation = IsolationDomainEncapsulationType.None, +NeighborGroupIds = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup") +}, +}, +DestinationTapRuleId = new ResourceIdentifier("/subscriptions/xxxx-xxxx-xxxx-xxxx/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkTapRules/example-destinationTapRule"), +} +}, + Tags = +{ +["key6024"] = "1234", +}, + }; + ArmOperation lro = await networkTap.UpdateAsync(WaitUntil.Completed, patch); + NetworkTapResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTaps_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_NetworkTapsDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapResource created on azure + // for more information of creating NetworkTapResource, please refer to the document of NetworkTapResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapName = "example-networkTap"; + ResourceIdentifier networkTapResourceId = NetworkTapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapName); + NetworkTapResource networkTap = client.GetNetworkTapResource(networkTapResourceId); + + // invoke the operation + await networkTap.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // NetworkTaps_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkTaps_NetworkTapsListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkTapResource item in subscriptionResource.GetNetworkTapsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_NetworkTapsUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapResource created on azure + // for more information of creating NetworkTapResource, please refer to the document of NetworkTapResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapName = "example-networkTap"; + ResourceIdentifier networkTapResourceId = NetworkTapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapName); + NetworkTapResource networkTap = client.GetNetworkTapResource(networkTapResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkTap.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + DeviceUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkTaps_Resync_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resync_NetworkTapsResyncMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTaps_Resync_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTaps_Resync" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapResource created on azure + // for more information of creating NetworkTapResource, please refer to the document of NetworkTapResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapName = "example-networkTap"; + ResourceIdentifier networkTapResourceId = NetworkTapResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapName); + NetworkTapResource networkTap = client.GetNetworkTapResource(networkTapResourceId); + + // invoke the operation + ArmOperation lro = await networkTap.ResyncAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs new file mode 100644 index 0000000000000..db4a83ae92ea1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleCollection.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkTapRuleCollection + { + // NetworkTapRules_Create_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_NetworkTapRulesCreateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Create_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapRuleResource + NetworkTapRuleCollection collection = resourceGroupResource.GetNetworkTapRules(); + + // invoke the operation + string networkTapRuleName = "example-tapRule"; + NetworkTapRuleData data = new NetworkTapRuleData(new AzureLocation("eastus")) + { + Annotation = "annotation", + ConfigurationType = NetworkFabricConfigurationType.File, + TapRulesUri = new Uri("https://microsoft.com/a"), + MatchConfigurations = +{ +new NetworkTapRuleMatchConfiguration() +{ +MatchConfigurationName = "config1", +SequenceNumber = 10, +IPAddressType = NetworkFabricIPAddressType.IPv4, +MatchConditions = +{ +new NetworkTapRuleMatchCondition() +{ +EncapsulationType = NetworkTapEncapsulationType.None, +PortCondition = new NetworkFabricPortCondition(Layer4Protocol.Tcp) +{ +PortType = NetworkFabricPortType.SourcePort, +Ports = +{ +"100" +}, +PortGroupNames = +{ +"example-portGroup1" +}, +}, +ProtocolTypes = +{ +"TCP" +}, +VlanMatchCondition = new VlanMatchCondition() +{ +Vlans = +{ +"10" +}, +InnerVlans = +{ +"11-20" +}, +VlanGroupNames = +{ +"exmaple-vlanGroup" +}, +}, +IPCondition = new IPMatchCondition() +{ +SourceDestinationType = SourceDestinationType.SourceIP, +PrefixType = IPMatchConditionPrefixType.Prefix, +IPPrefixValues = +{ +"10.10.10.10/20" +}, +IPGroupNames = +{ +"example-ipGroup" +}, +}, +} +}, +Actions = +{ +new NetworkTapRuleAction() +{ +TapRuleActionType = TapRuleActionType.Drop, +Truncate = "100", +IsTimestampEnabled = NetworkFabricBooleanValue.True, +DestinationId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"), +MatchConfigurationName = "match1", +} +}, +} +}, + DynamicMatchConfigurations = +{ +new CommonDynamicMatchConfiguration() +{ +IPGroups = +{ +new MatchConfigurationIPGroupProperties() +{ +Name = "example-ipGroup1", +IPAddressType = NetworkFabricIPAddressType.IPv4, +IPPrefixes = +{ +"10.10.10.10/30" +}, +} +}, +VlanGroups = +{ +new VlanGroupProperties() +{ +Name = "exmaple-vlanGroup", +Vlans = +{ +"10","100-200" +}, +} +}, +PortGroups = +{ +new PortGroupProperties() +{ +Name = "example-portGroup1", +Ports = +{ +"100-200" +}, +},new PortGroupProperties() +{ +Name = "example-portGroup2", +Ports = +{ +"900","1000-2000" +}, +} +}, +} +}, + PollingIntervalInSeconds = PollingIntervalInSecond.Thirty, + Tags = +{ +["keyID"] = "keyValue", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkTapRuleName, data); + NetworkTapRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTapRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkTapRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapRuleResource + NetworkTapRuleCollection collection = resourceGroupResource.GetNetworkTapRules(); + + // invoke the operation + string networkTapRuleName = "example-tapRule"; + NetworkTapRuleResource result = await collection.GetAsync(networkTapRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTapRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_NetworkTapRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapRuleResource + NetworkTapRuleCollection collection = resourceGroupResource.GetNetworkTapRules(); + + // invoke the operation + string networkTapRuleName = "example-tapRule"; + bool result = await collection.ExistsAsync(networkTapRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkTapRules_ListByResourceGroup_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_NetworkTapRulesListByResourceGroupMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this NetworkTapRuleResource + NetworkTapRuleCollection collection = resourceGroupResource.GetNetworkTapRules(); + + // invoke the operation and iterate over the result + await foreach (NetworkTapRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs new file mode 100644 index 0000000000000..526611a026748 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkTapRuleResource.cs @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.ManagedNetworkFabric; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Samples +{ + public partial class Sample_NetworkTapRuleResource + { + // NetworkTapRules_Get_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_NetworkTapRulesGetMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + NetworkTapRuleResource result = await networkTapRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTapRules_Update_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_NetworkTapRulesUpdateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + NetworkTapRulePatch patch = new NetworkTapRulePatch() + { + Annotation = "annotation", + ConfigurationType = NetworkFabricConfigurationType.File, + TapRulesUri = new Uri("https://microsoft.com/amdsdx"), + MatchConfigurations = +{ +new NetworkTapRuleMatchConfiguration() +{ +MatchConfigurationName = "config1", +SequenceNumber = 10, +IPAddressType = NetworkFabricIPAddressType.IPv4, +MatchConditions = +{ +new NetworkTapRuleMatchCondition() +{ +EncapsulationType = NetworkTapEncapsulationType.None, +PortCondition = new NetworkFabricPortCondition(Layer4Protocol.Tcp) +{ +PortType = NetworkFabricPortType.SourcePort, +Ports = +{ +"100" +}, +PortGroupNames = +{ +"example-portGroup1" +}, +}, +ProtocolTypes = +{ +"TCP" +}, +VlanMatchCondition = new VlanMatchCondition() +{ +Vlans = +{ +"10" +}, +InnerVlans = +{ +"11-20" +}, +VlanGroupNames = +{ +"exmaple-vlanGroup" +}, +}, +IPCondition = new IPMatchCondition() +{ +SourceDestinationType = SourceDestinationType.SourceIP, +PrefixType = IPMatchConditionPrefixType.Prefix, +IPPrefixValues = +{ +"10.10.10.10/20" +}, +IPGroupNames = +{ +"example-ipGroup" +}, +}, +} +}, +Actions = +{ +new NetworkTapRuleAction() +{ +TapRuleActionType = TapRuleActionType.Goto, +Truncate = "100", +IsTimestampEnabled = NetworkFabricBooleanValue.True, +DestinationId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourcegroups/example-rg/providers/Microsoft.ManagedNetworkFabric/neighborGroups/example-neighborGroup"), +MatchConfigurationName = "match1", +} +}, +} +}, + DynamicMatchConfigurations = +{ +new CommonDynamicMatchConfiguration() +{ +IPGroups = +{ +new MatchConfigurationIPGroupProperties() +{ +Name = "example-ipGroup1", +IPAddressType = NetworkFabricIPAddressType.IPv4, +IPPrefixes = +{ +"10.10.10.10/30" +}, +} +}, +VlanGroups = +{ +new VlanGroupProperties() +{ +Name = "exmaple-vlanGroup", +Vlans = +{ +"10","100-200" +}, +} +}, +PortGroups = +{ +new PortGroupProperties() +{ +Name = "example-portGroup1", +Ports = +{ +"100-200" +}, +} +}, +} +}, + Tags = +{ +["keyID"] = "keyValue", +}, + }; + ArmOperation lro = await networkTapRule.UpdateAsync(WaitUntil.Completed, patch); + NetworkTapRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // NetworkTapRules_Delete_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_NetworkTapRulesDeleteMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + await networkTapRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // NetworkTapRules_ListBySubscription_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetNetworkTapRules_NetworkTapRulesListBySubscriptionMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (NetworkTapRuleResource item in subscriptionResource.GetNetworkTapRulesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkTapRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_NetworkTapRulesUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_UpdateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_UpdateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkTapRule.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkTapRules_Resync_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resync_NetworkTapRulesResyncMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_Resync_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_Resync" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + ArmOperation lro = await networkTapRule.ResyncAsync(WaitUntil.Completed); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkTapRules_ValidateConfiguration_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateConfiguration_NetworkTapRulesValidateConfigurationMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkTapRules_ValidateConfiguration_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkTapRules_ValidateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkTapRuleResource created on azure + // for more information of creating NetworkTapRuleResource, please refer to the document of NetworkTapRuleResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkTapRuleName = "example-tapRule"; + ResourceIdentifier networkTapRuleResourceId = NetworkTapRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkTapRuleName); + NetworkTapRuleResource networkTapRule = client.GetNetworkTapRuleResource(networkTapRuleResourceId); + + // invoke the operation + ArmOperation lro = await networkTapRule.ValidateConfigurationAsync(WaitUntil.Completed); + ValidateConfigurationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs index 69895bec97e8f..9ea0cf90dfe32 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_NetworkToNetworkInterconnectCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkToNetworkInterconnectsCreateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json // this example is just showing the usage of "NetworkToNetworkInterconnects_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,9 +33,9 @@ public async Task CreateOrUpdate_NetworkToNetworkInterconnectsCreateMaximumSetGe // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); @@ -43,27 +43,62 @@ public async Task CreateOrUpdate_NetworkToNetworkInterconnectsCreateMaximumSetGe NetworkToNetworkInterconnectCollection collection = networkFabric.GetNetworkToNetworkInterconnects(); // invoke the operation - string networkToNetworkInterconnectName = "DefaultNNI"; - NetworkToNetworkInterconnectData data = new NetworkToNetworkInterconnectData() + string networkToNetworkInterconnectName = "example-nni"; + NetworkToNetworkInterconnectData data = new NetworkToNetworkInterconnectData(NetworkFabricBooleanValue.True) { NniType = NniType.CE, - IsManagementType = BooleanEnumProperty.True, - UseOptionB = BooleanEnumProperty.False, - Layer2Configuration = new Layer2Configuration(1500) + IsManagementType = IsManagementType.True, + Layer2Configuration = new Layer2Configuration() { - PortCount = 10, + Mtu = 1500, + Interfaces = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface") +}, + }, + OptionBLayer3Configuration = new NetworkToNetworkInterconnectOptionBLayer3Configuration() + { + PeerAsn = 61234, + VlanId = 1234, + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "40.0.0.14/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + }, + NpbStaticRouteConfiguration = new NpbStaticRouteConfiguration() + { + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 25, + }, + IPv4Routes = +{ +new StaticRouteProperties("20.0.0.12/30",new string[] +{ +"21.20.20.20" +}) +}, + IPv6Routes = +{ +new StaticRouteProperties("3FFE:FFFF:0:CD30::ac/127",new string[] +{ +"4FFE:FFFF:0:CD30::ac" +}) +}, + }, + ImportRoutePolicy = new ImportRoutePolicyInformation() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), }, - Layer3Configuration = new Layer3Configuration() + ExportRoutePolicy = new ExportRoutePolicyInformation() { - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", - PeerASN = 50272, - VlanId = 2064, - PrimaryIPv4Prefix = "172.31.0.0/31", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", - SecondaryIPv4Prefix = "172.31.0.20/31", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy"), }, + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkToNetworkInterconnectName, data); NetworkToNetworkInterconnectResource result = lro.Value; @@ -80,7 +115,7 @@ public async Task CreateOrUpdate_NetworkToNetworkInterconnectsCreateMaximumSetGe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkToNetworkInterconnects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,9 +125,9 @@ public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); @@ -100,7 +135,7 @@ public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() NetworkToNetworkInterconnectCollection collection = networkFabric.GetNetworkToNetworkInterconnects(); // invoke the operation - string networkToNetworkInterconnectName = "DefaultNNI"; + string networkToNetworkInterconnectName = "example-nni"; NetworkToNetworkInterconnectResource result = await collection.GetAsync(networkToNetworkInterconnectName); // the variable result is a resource, you could call other operations on this instance as well @@ -115,7 +150,7 @@ public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkToNetworkInterconnectsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json // this example is just showing the usage of "NetworkToNetworkInterconnects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,9 +160,9 @@ public async Task Exists_NetworkToNetworkInterconnectsGetMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); @@ -135,19 +170,19 @@ public async Task Exists_NetworkToNetworkInterconnectsGetMaximumSetGen() NetworkToNetworkInterconnectCollection collection = networkFabric.GetNetworkToNetworkInterconnects(); // invoke the operation - string networkToNetworkInterconnectName = "DefaultNNI"; + string networkToNetworkInterconnectName = "example-nni"; bool result = await collection.ExistsAsync(networkToNetworkInterconnectName); Console.WriteLine($"Succeeded: {result}"); } - // NetworkToNetworkInterconnects_List_MaximumSet_Gen + // NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_NetworkToNetworkInterconnectsListMaximumSetGen() + public async Task GetAll_NetworkToNetworkInterconnectsListByNetworkFabricMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_List_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkToNetworkInterconnects_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_ListByNetworkFabric_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkToNetworkInterconnects_ListByNetworkFabric" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -156,9 +191,9 @@ public async Task GetAll_NetworkToNetworkInterconnectsListMaximumSetGen() // this example assumes you already have this NetworkFabricResource created on azure // for more information of creating NetworkFabricResource, please refer to the document of NetworkFabricResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); NetworkFabricResource networkFabric = client.GetNetworkFabricResource(networkFabricResourceId); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs index 34057dc973715..38116ddf023a7 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_NetworkToNetworkInterconnectResource.cs @@ -18,13 +18,13 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Samples { public partial class Sample_NetworkToNetworkInterconnectResource { - // NetworkToNetworkInterconnects_Create_MaximumSet_Gen + // NetworkToNetworkInterconnects_Get_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_NetworkToNetworkInterconnectsCreateMaximumSetGen() + public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Create_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkToNetworkInterconnects_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkToNetworkInterconnects_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -33,37 +33,15 @@ public async Task Update_NetworkToNetworkInterconnectsCreateMaximumSetGen() // this example assumes you already have this NetworkToNetworkInterconnectResource created on azure // for more information of creating NetworkToNetworkInterconnectResource, please refer to the document of NetworkToNetworkInterconnectResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; - string networkToNetworkInterconnectName = "DefaultNNI"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + string networkToNetworkInterconnectName = "example-nni"; ResourceIdentifier networkToNetworkInterconnectResourceId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName); NetworkToNetworkInterconnectResource networkToNetworkInterconnect = client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectResourceId); // invoke the operation - NetworkToNetworkInterconnectData data = new NetworkToNetworkInterconnectData() - { - NniType = NniType.CE, - IsManagementType = BooleanEnumProperty.True, - UseOptionB = BooleanEnumProperty.False, - Layer2Configuration = new Layer2Configuration(1500) - { - PortCount = 10, - }, - Layer3Configuration = new Layer3Configuration() - { - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", - PeerASN = 50272, - VlanId = 2064, - PrimaryIPv4Prefix = "172.31.0.0/31", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", - SecondaryIPv4Prefix = "172.31.0.20/31", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", - }, - }; - ArmOperation lro = await networkToNetworkInterconnect.UpdateAsync(WaitUntil.Completed, data); - NetworkToNetworkInterconnectResource result = lro.Value; + NetworkToNetworkInterconnectResource result = await networkToNetworkInterconnect.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -72,13 +50,13 @@ public async Task Update_NetworkToNetworkInterconnectsCreateMaximumSetGen() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // NetworkToNetworkInterconnects_Get_MaximumSet_Gen + // NetworkToNetworkInterconnects_Update_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() + public async Task Update_NetworkToNetworkInterconnectsUpdateMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Get_MaximumSet_Gen.json - // this example is just showing the usage of "NetworkToNetworkInterconnects_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Update_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkToNetworkInterconnects_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -87,15 +65,70 @@ public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() // this example assumes you already have this NetworkToNetworkInterconnectResource created on azure // for more information of creating NetworkToNetworkInterconnectResource, please refer to the document of NetworkToNetworkInterconnectResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; - string networkToNetworkInterconnectName = "DefaultNNI"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + string networkToNetworkInterconnectName = "example-nni"; ResourceIdentifier networkToNetworkInterconnectResourceId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName); NetworkToNetworkInterconnectResource networkToNetworkInterconnect = client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectResourceId); // invoke the operation - NetworkToNetworkInterconnectResource result = await networkToNetworkInterconnect.GetAsync(); + NetworkToNetworkInterconnectPatch patch = new NetworkToNetworkInterconnectPatch() + { + Layer2Configuration = new Layer2Configuration() + { + Mtu = 1500, + Interfaces = +{ +new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkDevices/example-networkDevice/networkInterfaces/example-networkInterface") +}, + }, + OptionBLayer3Configuration = new OptionBLayer3Configuration() + { + PeerAsn = 2345, + VlanId = 1235, + PrimaryIPv4Prefix = "20.0.0.12/29", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.14/29", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + }, + NpbStaticRouteConfiguration = new NpbStaticRouteConfiguration() + { + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 310, + Multiplier = 15, + }, + IPv4Routes = +{ +new StaticRouteProperties("20.0.0.11/30",new string[] +{ +"21.20.20.10" +}) +}, + IPv6Routes = +{ +new StaticRouteProperties("4FFE:FFFF:0:CD30::ac/127",new string[] +{ +"5FFE:FFFF:0:CD30::ac" +}) +}, + }, + ImportRoutePolicy = new ImportRoutePolicyInformation() + { + ImportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + ImportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + }, + ExportRoutePolicy = new ExportRoutePolicyInformation() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + ExportIPv6RoutePolicyId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/routePolicies/example-routePolicy1"), + }, + EgressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + IngressAclId = new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/accessControlLists/example-acl"), + }; + ArmOperation lro = await networkToNetworkInterconnect.UpdateAsync(WaitUntil.Completed, patch); + NetworkToNetworkInterconnectResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -109,7 +142,7 @@ public async Task Get_NetworkToNetworkInterconnectsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkToNetworkInterconnectsDeleteMaximumSetGen() { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_Delete_MaximumSet_Gen.json // this example is just showing the usage of "NetworkToNetworkInterconnects_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,10 +152,10 @@ public async Task Delete_NetworkToNetworkInterconnectsDeleteMaximumSetGen() // this example assumes you already have this NetworkToNetworkInterconnectResource created on azure // for more information of creating NetworkToNetworkInterconnectResource, please refer to the document of NetworkToNetworkInterconnectResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "resourceGroupName"; - string networkFabricName = "FabricName"; - string networkToNetworkInterconnectName = "DefaultNNI"; + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + string networkToNetworkInterconnectName = "example-nni"; ResourceIdentifier networkToNetworkInterconnectResourceId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName); NetworkToNetworkInterconnectResource networkToNetworkInterconnect = client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectResourceId); @@ -131,5 +164,79 @@ public async Task Delete_NetworkToNetworkInterconnectsDeleteMaximumSetGen() Console.WriteLine($"Succeeded"); } + + // NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateNpbStaticRouteBfdAdministrativeState_NetworkToNetworkInterconnectsUpdateNpbStaticRouteBfdAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkToNetworkInterconnects_updateNpbStaticRouteBfdAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkToNetworkInterconnectResource created on azure + // for more information of creating NetworkToNetworkInterconnectResource, please refer to the document of NetworkToNetworkInterconnectResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + string networkToNetworkInterconnectName = "example-nni"; + ResourceIdentifier networkToNetworkInterconnectResourceId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + NetworkToNetworkInterconnectResource networkToNetworkInterconnect = client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkToNetworkInterconnect.UpdateNpbStaticRouteBfdAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAdministrativeState_NetworkToNetworkInterconnectsUpdateAdministrativeStateMaximumSetGen() + { + // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/stable/2023-06-15/examples/NetworkToNetworkInterconnects_updateAdministrativeState_MaximumSet_Gen.json + // this example is just showing the usage of "NetworkToNetworkInterconnects_updateAdministrativeState" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkToNetworkInterconnectResource created on azure + // for more information of creating NetworkToNetworkInterconnectResource, please refer to the document of NetworkToNetworkInterconnectResource + string subscriptionId = "1234ABCD-0A1B-1234-5678-123456ABCDEF"; + string resourceGroupName = "example-rg"; + string networkFabricName = "example-fabric"; + string networkToNetworkInterconnectName = "example-nni"; + ResourceIdentifier networkToNetworkInterconnectResourceId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName); + NetworkToNetworkInterconnectResource networkToNetworkInterconnect = client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectResourceId); + + // invoke the operation + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() + { + State = AdministrativeEnableState.Enable, + ResourceIds = +{ +new ResourceIdentifier("") +}, + }; + ArmOperation lro = await networkToNetworkInterconnect.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); + StateUpdateCommonPostActionResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyResource.cs deleted file mode 100644 index a91e03dff3e87..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/samples/Generated/Samples/Sample_RoutePolicyResource.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ManagedNetworkFabric.Samples -{ - public partial class Sample_RoutePolicyResource - { - // RoutePolicies_Get_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_RoutePoliciesGetMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Get_MaximumSet_Gen.json - // this example is just showing the usage of "RoutePolicies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RoutePolicyResource created on azure - // for more information of creating RoutePolicyResource, please refer to the document of RoutePolicyResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; - string routePolicyName = "routePolicyName"; - ResourceIdentifier routePolicyResourceId = RoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); - RoutePolicyResource routePolicy = client.GetRoutePolicyResource(routePolicyResourceId); - - // invoke the operation - RoutePolicyResource result = await routePolicy.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // RoutePolicies_Update_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_RoutePoliciesUpdateMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Update_MaximumSet_Gen.json - // this example is just showing the usage of "RoutePolicies_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RoutePolicyResource created on azure - // for more information of creating RoutePolicyResource, please refer to the document of RoutePolicyResource - string subscriptionId = "97D66995-95BA-464A-A250-FB6E25E499A8"; - string resourceGroupName = "resourceGroupName"; - string routePolicyName = "routePolicyName"; - ResourceIdentifier routePolicyResourceId = RoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); - RoutePolicyResource routePolicy = client.GetRoutePolicyResource(routePolicyResourceId); - - // invoke the operation - RoutePolicyPatch patch = new RoutePolicyPatch() - { - Tags = -{ -["key8254"] = "", -}, - }; - ArmOperation lro = await routePolicy.UpdateAsync(WaitUntil.Completed, patch); - RoutePolicyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // RoutePolicies_Delete_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_RoutePoliciesDeleteMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_Delete_MaximumSet_Gen.json - // this example is just showing the usage of "RoutePolicies_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RoutePolicyResource created on azure - // for more information of creating RoutePolicyResource, please refer to the document of RoutePolicyResource - string subscriptionId = "subscriptionId"; - string resourceGroupName = "rgRoutePolicies"; - string routePolicyName = "routePolicyName"; - ResourceIdentifier routePolicyResourceId = RoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); - RoutePolicyResource routePolicy = client.GetRoutePolicyResource(routePolicyResourceId); - - // invoke the operation - await routePolicy.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // RoutePolicies_ListBySubscription_MaximumSet_Gen - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetRoutePolicies_RoutePoliciesListBySubscriptionMaximumSetGen() - { - // Generated from example definition: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/RoutePolicies_ListBySubscription_MaximumSet_Gen.json - // this example is just showing the usage of "RoutePolicies_ListBySubscription" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "subscriptionId"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (RoutePolicyResource item in subscriptionResource.GetRoutePoliciesAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - RoutePolicyData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Azure.ResourceManager.ManagedNetworkFabric.csproj b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Azure.ResourceManager.ManagedNetworkFabric.csproj index d2bee5a10332a..926016d4dbb7d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Azure.ResourceManager.ManagedNetworkFabric.csproj +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Azure.ResourceManager.ManagedNetworkFabric.csproj @@ -1,6 +1,6 @@ - 1.0.0-beta.2 + 1.0.0 Azure.ResourceManager.ManagedNetworkFabric Azure Resource Manager client SDK for Azure resource provider Azure.ResourceManager.ManagedNetworkFabric. azure;management;arm;resource manager;azure.resourcemanager.managednetworkfabric diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs deleted file mode 100644 index 4eb50b19cf010..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListData.cs +++ /dev/null @@ -1,64 +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; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing the AccessControlList data model. - /// The AccessControlList 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) - { - Argument.AssertNotNull(conditions, nameof(conditions)); - - AddressFamily = addressFamily; - Conditions = conditions.ToList(); - } - - /// Initializes a new instance of AccessControlListData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// 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) - { - Annotation = annotation; - AddressFamily = addressFamily; - Conditions = conditions; - ProvisioningState = provisioningState; - } - - /// 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. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs index b41722a893d6c..40e54b4337909 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ArmManagedNetworkFabricModelFactory.cs @@ -8,6 +8,8 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; +using Azure; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric; using Azure.ResourceManager.Models; @@ -17,7 +19,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models /// Model factory for models. public static partial class ArmManagedNetworkFabricModelFactory { - /// Initializes a new instance of AccessControlListData. + /// Initializes a new instance of NetworkFabricAccessControlListData. /// The id. /// The name. /// The resourceType. @@ -25,19 +27,52 @@ 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. - /// 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) + /// Input method to configure Access Control List. + /// Access Control List file URL. + /// 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 NetworkFabricAccessControlListData NetworkFabricAccessControlListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, NetworkFabricConfigurationType? configurationType = null, Uri aclsUri = null, IEnumerable matchConfigurations = null, IEnumerable dynamicMatchConfigurations = null, DateTimeOffset? lastSyncedOn = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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 NetworkFabricAccessControlListData(id, name, resourceType, systemData, tags, location, annotation, configurationType, aclsUri, matchConfigurations?.ToList(), dynamicMatchConfigurations?.ToList(), lastSyncedOn, configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of IPCommunityData. + /// Initializes a new instance of NetworkFabricErrorResult. + /// The error object. + /// A new instance for mocking. + public static NetworkFabricErrorResult NetworkFabricErrorResult(ResponseError error = null) + { + return new NetworkFabricErrorResult(error); + } + + /// Initializes a new instance of StateUpdateCommonPostActionResult. + /// The error object. + /// Gets the configuration state. + /// A new instance for mocking. + public static StateUpdateCommonPostActionResult StateUpdateCommonPostActionResult(ResponseError error = null, NetworkFabricConfigurationState? configurationState = null) + { + return new StateUpdateCommonPostActionResult(error, configurationState); + } + + /// Initializes a new instance of ValidateConfigurationResult. + /// The error object. + /// Gets the configuration state. + /// URL for the details of the response. + /// A new instance for mocking. + public static ValidateConfigurationResult ValidateConfigurationResult(ResponseError error = null, NetworkFabricConfigurationState? configurationState = null, Uri uri = null) + { + return new ValidateConfigurationResult(error, configurationState, uri); + } + + /// Initializes a new instance of NetworkFabricInternetGatewayData. /// The id. /// The name. /// The resourceType. @@ -45,21 +80,21 @@ 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. - /// 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) + /// 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 NetworkFabricInternetGatewayData NetworkFabricInternetGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, ResourceIdentifier internetGatewayRuleId = null, IPAddress ipv4Address = null, int? port = null, InternetGatewayType typePropertiesType = default, ResourceIdentifier networkFabricControllerId = null, NetworkFabricProvisioningState? provisioningState = null) { tags ??= new Dictionary(); - wellKnownCommunities ??= new List(); - communityMembers ??= new List(); - return new IPCommunityData(id, name, resourceType, systemData, tags, location, annotation, action, wellKnownCommunities?.ToList(), communityMembers?.ToList(), provisioningState); + return new NetworkFabricInternetGatewayData(id, name, resourceType, systemData, tags, location, annotation, internetGatewayRuleId, ipv4Address, port, typePropertiesType, networkFabricControllerId, provisioningState); } - /// Initializes a new instance of IPExtendedCommunityData. + /// Initializes a new instance of NetworkFabricInternetGatewayRuleData. /// The id. /// The name. /// The resourceType. @@ -67,19 +102,19 @@ 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. - /// 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) + /// Rules for the InternetGateways. + /// Provisioning state of the resource. + /// List of Internet Gateway resource Id. + /// A new instance for mocking. + public static NetworkFabricInternetGatewayRuleData NetworkFabricInternetGatewayRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, InternetGatewayRules ruleProperties = null, NetworkFabricProvisioningState? provisioningState = null, IEnumerable internetGatewayIds = null) { tags ??= new Dictionary(); - routeTargets ??= new List(); + internetGatewayIds ??= new List(); - return new IPExtendedCommunityData(id, name, resourceType, systemData, tags, location, annotation, action, routeTargets?.ToList(), provisioningState); + return new NetworkFabricInternetGatewayRuleData(id, name, resourceType, systemData, tags, location, annotation, ruleProperties, provisioningState, internetGatewayIds?.ToList()); } - /// Initializes a new instance of IPPrefixData. + /// Initializes a new instance of NetworkFabricIPCommunityData. /// The id. /// The name. /// The resourceType. @@ -87,18 +122,20 @@ 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. - /// 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) + /// 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 NetworkFabricIPCommunityData NetworkFabricIPCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipCommunityRules = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - ipPrefixRules ??= new List(); + ipCommunityRules ??= new List(); - return new IPPrefixData(id, name, resourceType, systemData, tags, location, annotation, ipPrefixRules?.ToList(), provisioningState); + return new NetworkFabricIPCommunityData(id, name, resourceType, systemData, tags, location, annotation, ipCommunityRules?.ToList(), configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of L2IsolationDomainData. + /// Initializes a new instance of NetworkFabricIPExtendedCommunityData. /// The id. /// The name. /// The resourceType. @@ -106,34 +143,41 @@ 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. - /// 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) + /// 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 NetworkFabricIPExtendedCommunityData NetworkFabricIPExtendedCommunityData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipExtendedCommunityRules = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { tags ??= new Dictionary(); - disabledOnResources ??= new List(); + ipExtendedCommunityRules ??= new List(); - return new L2IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, networkFabricId, vlanId, mtu, disabledOnResources?.ToList(), administrativeState, provisioningState); + return new NetworkFabricIPExtendedCommunityData(id, name, resourceType, systemData, tags, location, annotation, ipExtendedCommunityRules?.ToList(), 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 NetworkFabricIPPrefixData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// 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 NetworkFabricIPPrefixData NetworkFabricIPPrefixData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable ipPrefixRules = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { - return new ARPProperties(address, age, macAddress, @interface, state); + tags ??= new Dictionary(); + ipPrefixRules ??= new List(); + + return new NetworkFabricIPPrefixData(id, name, resourceType, systemData, tags, location, annotation, ipPrefixRules?.ToList(), configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of L3IsolationDomainData. + /// Initializes a new instance of NetworkFabricL2IsolationDomainData. /// The id. /// The name. /// The resourceType. @@ -141,76 +185,111 @@ public static ARPProperties ARPProperties(string address = null, string age = nu /// The tags. /// The 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. - /// 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. - /// 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) + /// 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 NetworkFabricL2IsolationDomainData NetworkFabricL2IsolationDomainData(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, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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); + return new NetworkFabricL2IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, networkFabricId, vlanId, mtu, configurationState, provisioningState, administrativeState); } - /// 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) + /// Initializes a new instance of DeviceUpdateCommonPostActionResult. + /// 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 DeviceUpdateCommonPostActionResult DeviceUpdateCommonPostActionResult(ResponseError error = null, NetworkFabricConfigurationState? configurationState = null, IEnumerable successfulDevices = null, IEnumerable failedDevices = null) + { + successfulDevices ??= new List(); + failedDevices ??= new List(); + + return new DeviceUpdateCommonPostActionResult(error, configurationState, successfulDevices?.ToList(), failedDevices?.ToList()); + } + + /// Initializes a new instance of NetworkFabricL3IsolationDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Advertise Connected Subnets. Ex: "True" | "False". + /// Advertise Static Routes. Ex: "True" | "False". + /// Aggregate route configurations. + /// Connected Subnet RoutePolicy. + /// 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 NetworkFabricL3IsolationDomainData NetworkFabricL3IsolationDomainData(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, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { - return new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy(exportRoutePolicyId, administrativeState); + tags ??= new Dictionary(); + + return new NetworkFabricL3IsolationDomainData(id, name, resourceType, systemData, tags, location, annotation, redistributeConnectedSubnets, redistributeStaticRoutes, aggregateRouteConfiguration, connectedSubnetRoutePolicy, networkFabricId, configurationState, provisioningState, administrativeState); } - /// Initializes a new instance of InternalNetworkData. + /// Initializes a new instance of NetworkFabricInternalNetworkData. /// The id. /// The name. /// The resourceType. /// 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. - /// 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) + /// 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 NetworkFabricInternalNetworkData NetworkFabricInternalNetworkData(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, StaticRouteConfigurationExtension? extension = null, int vlanId = default, InternalNetworkBgpConfiguration bgpConfiguration = null, InternalNetworkStaticRouteConfiguration staticRouteConfiguration = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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 NetworkFabricInternalNetworkData(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 InternalNetworkBgpConfiguration. + /// 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 InternalNetworkBgpConfiguration InternalNetworkBgpConfiguration(string annotation = null, BfdConfiguration bfdConfiguration = null, NetworkFabricBooleanValue? 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 InternalNetworkBgpConfiguration(annotation, bfdConfiguration, defaultRouteOriginate, allowAS, allowASOverride, fabricAsn, peerAsn, ipv4ListenRangePrefixes?.ToList(), ipv6ListenRangePrefixes?.ToList(), ipv4NeighborAddress?.ToList(), ipv6NeighborAddress?.ToList()); } /// Initializes a new instance of BgpConfiguration. @@ -219,85 +298,121 @@ public static BfdConfiguration BfdConfiguration(EnabledDisabledState? administra /// 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. - /// BGP Ipv4 ListenRange. - /// BGP Ipv6 ListenRange. - /// List with stringified ipv4NeighborAddresses. + /// 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 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, NetworkFabricBooleanValue? 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(); ipv4NeighborAddress ??= new List(); ipv6NeighborAddress ??= new List(); - return new BgpConfiguration(annotation, bfdConfiguration, defaultRouteOriginate, allowAS, allowASOverride, fabricASN, peerASN, ipv4ListenRangePrefixes?.ToList(), ipv6ListenRangePrefixes?.ToList(), ipv4NeighborAddress?.ToList(), ipv6NeighborAddress?.ToList()); + 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, NetworkFabricConfigurationState? configurationState = null) { - return new NeighborAddress(address, operationalState); + return new NeighborAddress(address, configurationState); } - /// Initializes a new instance of ExternalNetworkData. + /// Initializes a new instance of NetworkFabricExternalNetworkData. /// The id. /// The name. /// 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. - /// 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) + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + /// A new instance for mocking. + public static NetworkFabricExternalNetworkData NetworkFabricExternalNetworkData(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, ResourceIdentifier networkToNetworkInterconnectId = null, PeeringOption peeringOption = default, L3OptionBProperties optionBProperties = null, ExternalNetworkOptionAProperties optionAProperties = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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 NetworkFabricExternalNetworkData(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. + /// Initializes a new instance of ExternalNetworkOptionAProperties. + /// 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. + /// Fabric ASN number. Example 65001. + /// Peer ASN number.Example : 28. /// BFD configuration properties. - /// 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) + /// 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 ExternalNetworkOptionAProperties ExternalNetworkOptionAProperties(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 ExternalNetworkOptionAProperties(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 ExternalNetworkPatchOptionAProperties. + /// 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. + /// 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 ExternalNetworkPatchOptionAProperties ExternalNetworkPatchOptionAProperties(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 ExternalNetworkPatchOptionAProperties(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, mtu, vlanId, fabricAsn, peerAsn, bfdConfiguration, ingressAclId, egressAclId); + } + + /// Initializes a new instance of NetworkFabricNeighborGroupData. + /// 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 NetworkFabricNeighborGroupData NetworkFabricNeighborGroupData(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, NetworkFabricProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + networkTapIds ??= new List(); + networkTapRuleIds ??= new List(); + + return new NetworkFabricNeighborGroupData(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, NetworkFabricProvisioningState? provisioningState = null) { supportedVersions ??= new List(); supportedRoleTypes ??= new List(); - interfaces ??= 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,80 +444,42 @@ 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, ResourceIdentifier networkRackId = null, IPAddress managementIPv4Address = null, string managementIPv6Address = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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. + /// Initializes a new instance of NetworkDeviceInterfaceData. /// The id. /// The name. /// 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. - /// 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) - { - 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) + /// 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 NetworkDeviceInterfaceData NetworkDeviceInterfaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string annotation = null, string physicalIdentifier = null, string connectedTo = null, NetworkDeviceInterfaceType? interfaceType = null, IPAddress ipv4Address = null, string ipv6Address = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { - return new InterfaceStatus(administrativeState, operationalStatus, phyStatus, transceiverStatus, connectedTo); + return new NetworkDeviceInterfaceData(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, NetworkFabricControllerServices infrastructureServices = null, NetworkFabricControllerServices workloadServices = null, ManagedResourceGroupConfiguration managedResourceGroupConfiguration = null, IEnumerable networkFabricIds = null, bool? isWorkloadManagementNetwork = null, IsWorkloadManagementNetworkEnabled? isWorkloadManagementNetworkEnabled = null, IEnumerable tenantInternetGatewayIds = null, string ipv4AddressSpace = null, string ipv6AddressSpace = null, NetworkFabricControllerSKU? nfcSku = null, NetworkFabricProvisioningState? 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(), isWorkloadManagementNetwork, isWorkloadManagementNetworkEnabled, tenantInternetGatewayIds?.ToList(), ipv4AddressSpace, ipv6AddressSpace, nfcSku, provisioningState); } - /// Initializes a new instance of InfrastructureServices. + /// Initializes a new instance of NetworkFabricControllerServices. /// 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) - { - 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) + /// A new instance for mocking. + public static NetworkFabricControllerServices NetworkFabricControllerServices(IEnumerable ipv4AddressSpaces = null, IEnumerable ipv6AddressSpaces = null) { ipv4AddressSpaces ??= new List(); ipv6AddressSpaces ??= new List(); - return new WorkloadServices(ipv4AddressSpaces?.ToList(), ipv6AddressSpaces?.ToList()); + return new NetworkFabricControllerServices(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, NetworkFabricSkuType? typePropertiesType = null, int? maxComputeRacks = null, int? maximumServerCount = null, IEnumerable supportedVersions = null, string details = null, NetworkFabricProvisioningState? 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. + /// 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. - /// 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, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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, ResourceIdentifier 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) + public static VpnConfigurationProperties VpnConfigurationProperties(ResourceIdentifier networkToNetworkInterconnectId = null, NetworkFabricAdministrativeState? administrativeState = null, PeeringOption peeringOption = default, OptionBProperties optionBProperties = null, VpnConfigurationOptionAProperties 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) - { - 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, NetworkFabricBooleanValue useOptionB = default, Layer2Configuration layer2Configuration = null, NetworkToNetworkInterconnectOptionBLayer3Configuration optionBLayer3Configuration = null, NpbStaticRouteConfiguration npbStaticRouteConfiguration = null, ImportRoutePolicyInformation importRoutePolicy = null, ExportRoutePolicyInformation exportRoutePolicy = null, ResourceIdentifier egressAclId = null, ResourceIdentifier ingressAclId = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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 NetworkToNetworkInterconnectOptionBLayer3Configuration. + /// 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 NetworkToNetworkInterconnectOptionBLayer3Configuration NetworkToNetworkInterconnectOptionBLayer3Configuration(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 NetworkToNetworkInterconnectOptionBLayer3Configuration(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. - /// ASN of PE devices for CE/PE connectivity.Example : 28. + /// 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) + /// ASN of CE devices for CE/PE connectivity. + /// 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 Layer3Configuration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, importRoutePolicyId, exportRoutePolicyId, peerASN, vlanId, fabricASN); + return new OptionBLayer3Configuration(primaryIPv4Prefix, primaryIPv6Prefix, secondaryIPv4Prefix, secondaryIPv6Prefix, peerAsn, vlanId, fabricAsn); } - /// Initializes a new instance of NetworkRackSkuData. + /// Initializes a new instance of NetworkToNetworkInterconnectPatch. /// 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) + /// 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 NetworkToNetworkInterconnectPatch(id, name, resourceType, systemData, layer2Configuration, optionBLayer3Configuration, npbStaticRouteConfiguration, importRoutePolicy, exportRoutePolicy, egressAclId, ingressAclId); + } + + /// 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. + /// 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, NetworkFabricProvisioningState? 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,20 +713,72 @@ 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, NetworkFabricProvisioningState? 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, NetworkFabricConfigurationType? configurationType = null, Uri tapRulesUri = null, IEnumerable matchConfigurations = null, IEnumerable dynamicMatchConfigurations = null, ResourceIdentifier networkTapId = null, PollingIntervalInSecond? pollingIntervalInSeconds = null, DateTimeOffset? lastSyncedOn = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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, NetworkTapPollingType? pollingType = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? 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. + /// Initializes a new instance of NetworkFabricRoutePolicyData. /// The id. /// The name. /// The resourceType. @@ -642,14 +787,18 @@ public static NetworkRackData NetworkRackData(ResourceIdentifier id = null, stri /// The location. /// Switch configuration description. /// Route Policy statements. - /// Gets the provisioning 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) + /// 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 NetworkFabricRoutePolicyData NetworkFabricRoutePolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string annotation = null, IEnumerable statements = null, ResourceIdentifier networkFabricId = null, AddressFamilyType? addressFamilyType = null, NetworkFabricConfigurationState? configurationState = null, NetworkFabricProvisioningState? provisioningState = null, NetworkFabricAdministrativeState? administrativeState = null) { tags ??= new Dictionary(); statements ??= new List(); - return new RoutePolicyData(id, name, resourceType, systemData, tags, location, annotation, statements?.ToList(), provisioningState); + return new NetworkFabricRoutePolicyData(id, name, resourceType, systemData, tags, location, annotation, 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..6cab632a853a0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ManagedNetworkFabricExtensions.cs @@ -49,153 +49,210 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region AccessControlListResource + #region NetworkFabricAccessControlListResource /// - /// 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. + /// 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 AccessControlListResource GetAccessControlListResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricAccessControlListResource GetNetworkFabricAccessControlListResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AccessControlListResource.ValidateResourceId(id); - return new AccessControlListResource(client, id); + NetworkFabricAccessControlListResource.ValidateResourceId(id); + return new NetworkFabricAccessControlListResource(client, id); } ); } #endregion - #region IPCommunityResource + #region NetworkFabricInternetGatewayResource /// - /// 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. + /// 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 IPCommunityResource GetIPCommunityResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricInternetGatewayResource GetNetworkFabricInternetGatewayResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - IPCommunityResource.ValidateResourceId(id); - return new IPCommunityResource(client, id); + NetworkFabricInternetGatewayResource.ValidateResourceId(id); + return new NetworkFabricInternetGatewayResource(client, id); } ); } #endregion - #region IPExtendedCommunityResource + #region NetworkFabricInternetGatewayRuleResource /// - /// 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. + /// 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 IPExtendedCommunityResource GetIPExtendedCommunityResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricInternetGatewayRuleResource GetNetworkFabricInternetGatewayRuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - IPExtendedCommunityResource.ValidateResourceId(id); - return new IPExtendedCommunityResource(client, id); + NetworkFabricInternetGatewayRuleResource.ValidateResourceId(id); + return new NetworkFabricInternetGatewayRuleResource(client, id); } ); } #endregion - #region IPPrefixResource + #region NetworkFabricIPCommunityResource /// - /// 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. + /// 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 IPPrefixResource GetIPPrefixResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricIPCommunityResource GetNetworkFabricIPCommunityResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - IPPrefixResource.ValidateResourceId(id); - return new IPPrefixResource(client, id); + NetworkFabricIPCommunityResource.ValidateResourceId(id); + return new NetworkFabricIPCommunityResource(client, id); } ); } #endregion - #region L2IsolationDomainResource + #region NetworkFabricIPExtendedCommunityResource /// - /// 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 L2IsolationDomainResource GetL2IsolationDomainResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricIPExtendedCommunityResource GetNetworkFabricIPExtendedCommunityResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - L2IsolationDomainResource.ValidateResourceId(id); - return new L2IsolationDomainResource(client, id); + NetworkFabricIPExtendedCommunityResource.ValidateResourceId(id); + return new NetworkFabricIPExtendedCommunityResource(client, id); } ); } #endregion - #region L3IsolationDomainResource + #region NetworkFabricIPPrefixResource /// - /// 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 L3IsolationDomainResource GetL3IsolationDomainResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricIPPrefixResource GetNetworkFabricIPPrefixResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - L3IsolationDomainResource.ValidateResourceId(id); - return new L3IsolationDomainResource(client, id); + NetworkFabricIPPrefixResource.ValidateResourceId(id); + return new NetworkFabricIPPrefixResource(client, id); } ); } #endregion - #region InternalNetworkResource + #region NetworkFabricL2IsolationDomainResource /// - /// 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. + /// 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 InternalNetworkResource GetInternalNetworkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricL2IsolationDomainResource GetNetworkFabricL2IsolationDomainResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - InternalNetworkResource.ValidateResourceId(id); - return new InternalNetworkResource(client, id); + NetworkFabricL2IsolationDomainResource.ValidateResourceId(id); + return new NetworkFabricL2IsolationDomainResource(client, id); } ); } #endregion - #region ExternalNetworkResource + #region NetworkFabricL3IsolationDomainResource /// - /// 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. + /// 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 ExternalNetworkResource GetExternalNetworkResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkFabricL3IsolationDomainResource GetNetworkFabricL3IsolationDomainResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ExternalNetworkResource.ValidateResourceId(id); - return new ExternalNetworkResource(client, id); + NetworkFabricL3IsolationDomainResource.ValidateResourceId(id); + return new NetworkFabricL3IsolationDomainResource(client, id); + } + ); + } + #endregion + + #region NetworkFabricInternalNetworkResource + /// + /// 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 NetworkFabricInternalNetworkResource GetNetworkFabricInternalNetworkResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkFabricInternalNetworkResource.ValidateResourceId(id); + return new NetworkFabricInternalNetworkResource(client, id); + } + ); + } + #endregion + + #region NetworkFabricExternalNetworkResource + /// + /// 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 NetworkFabricExternalNetworkResource GetNetworkFabricExternalNetworkResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkFabricExternalNetworkResource.ValidateResourceId(id); + return new NetworkFabricExternalNetworkResource(client, id); + } + ); + } + #endregion + + #region NetworkFabricNeighborGroupResource + /// + /// 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 NetworkFabricNeighborGroupResource GetNetworkFabricNeighborGroupResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkFabricNeighborGroupResource.ValidateResourceId(id); + return new NetworkFabricNeighborGroupResource(client, id); } ); } @@ -239,20 +296,20 @@ public static NetworkDeviceResource GetNetworkDeviceResource(this ArmClient clie } #endregion - #region NetworkInterfaceResource + #region NetworkDeviceInterfaceResource /// - /// 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 NetworkInterfaceResource GetNetworkInterfaceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkDeviceInterfaceResource GetNetworkDeviceInterfaceResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - NetworkInterfaceResource.ValidateResourceId(id); - return new NetworkInterfaceResource(client, id); + NetworkDeviceInterfaceResource.ValidateResourceId(id); + return new NetworkDeviceInterfaceResource(client, id); } ); } @@ -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,31 +429,69 @@ public static NetworkRackResource GetNetworkRackResource(this ArmClient client, } #endregion - #region RoutePolicyResource + #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. + /// 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 RoutePolicyResource GetRoutePolicyResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static NetworkTapRuleResource GetNetworkTapRuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - RoutePolicyResource.ValidateResourceId(id); - return new RoutePolicyResource(client, id); + NetworkTapRuleResource.ValidateResourceId(id); + return new NetworkTapRuleResource(client, id); } ); } #endregion - /// Gets a collection of AccessControlListResources in the ResourceGroupResource. + #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 NetworkFabricRoutePolicyResource + /// + /// 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 NetworkFabricRoutePolicyResource GetNetworkFabricRoutePolicyResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + NetworkFabricRoutePolicyResource.ValidateResourceId(id); + return new NetworkFabricRoutePolicyResource(client, id); + } + ); + } + #endregion + + /// Gets a collection of NetworkFabricAccessControlListResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of AccessControlListResources and their operations over a AccessControlListResource. - public static AccessControlListCollection GetAccessControlLists(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricAccessControlListResources and their operations over a NetworkFabricAccessControlListResource. + public static NetworkFabricAccessControlListCollection GetNetworkFabricAccessControlLists(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetAccessControlLists(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricAccessControlLists(); } /// @@ -418,9 +513,9 @@ public static AccessControlListCollection GetAccessControlLists(this ResourceGro /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetAccessControlListAsync(this ResourceGroupResource resourceGroupResource, string accessControlListName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricAccessControlListAsync(this ResourceGroupResource resourceGroupResource, string accessControlListName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetAccessControlLists().GetAsync(accessControlListName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricAccessControlLists().GetAsync(accessControlListName, cancellationToken).ConfigureAwait(false); } /// @@ -442,17 +537,129 @@ public static async Task> GetAccessControlLi /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetAccessControlList(this ResourceGroupResource resourceGroupResource, string accessControlListName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricAccessControlList(this ResourceGroupResource resourceGroupResource, string accessControlListName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkFabricAccessControlLists().Get(accessControlListName, cancellationToken); + } + + /// Gets a collection of NetworkFabricInternetGatewayResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkFabricInternetGatewayResources and their operations over a NetworkFabricInternetGatewayResource. + public static NetworkFabricInternetGatewayCollection GetNetworkFabricInternetGateways(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricInternetGateways(); + } + + /// + /// 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> GetNetworkFabricInternetGatewayAsync(this ResourceGroupResource resourceGroupResource, string internetGatewayName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkFabricInternetGateways().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 GetNetworkFabricInternetGateway(this ResourceGroupResource resourceGroupResource, string internetGatewayName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkFabricInternetGateways().Get(internetGatewayName, cancellationToken); + } + + /// Gets a collection of NetworkFabricInternetGatewayRuleResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkFabricInternetGatewayRuleResources and their operations over a NetworkFabricInternetGatewayRuleResource. + public static NetworkFabricInternetGatewayRuleCollection GetNetworkFabricInternetGatewayRules(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricInternetGatewayRules(); + } + + /// + /// 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> GetNetworkFabricInternetGatewayRuleAsync(this ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkFabricInternetGatewayRules().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 GetNetworkFabricInternetGatewayRule(this ResourceGroupResource resourceGroupResource, string internetGatewayRuleName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetAccessControlLists().Get(accessControlListName, cancellationToken); + return resourceGroupResource.GetNetworkFabricInternetGatewayRules().Get(internetGatewayRuleName, cancellationToken); } - /// Gets a collection of IPCommunityResources in the ResourceGroupResource. + /// Gets a collection of NetworkFabricIPCommunityResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of IPCommunityResources and their operations over a IPCommunityResource. - public static IPCommunityCollection GetIPCommunities(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricIPCommunityResources and their operations over a NetworkFabricIPCommunityResource. + public static NetworkFabricIPCommunityCollection GetNetworkFabricIPCommunities(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetIPCommunities(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricIPCommunities(); } /// @@ -474,9 +681,9 @@ public static IPCommunityCollection GetIPCommunities(this ResourceGroupResource /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetIPCommunityAsync(this ResourceGroupResource resourceGroupResource, string ipCommunityName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricIPCommunityAsync(this ResourceGroupResource resourceGroupResource, string ipCommunityName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetIPCommunities().GetAsync(ipCommunityName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricIPCommunities().GetAsync(ipCommunityName, cancellationToken).ConfigureAwait(false); } /// @@ -498,17 +705,17 @@ public static async Task> GetIPCommunityAsync(this /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetIPCommunity(this ResourceGroupResource resourceGroupResource, string ipCommunityName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricIPCommunity(this ResourceGroupResource resourceGroupResource, string ipCommunityName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetIPCommunities().Get(ipCommunityName, cancellationToken); + return resourceGroupResource.GetNetworkFabricIPCommunities().Get(ipCommunityName, cancellationToken); } - /// Gets a collection of IPExtendedCommunityResources in the ResourceGroupResource. + /// Gets a collection of NetworkFabricIPExtendedCommunityResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of IPExtendedCommunityResources and their operations over a IPExtendedCommunityResource. - public static IPExtendedCommunityCollection GetIPExtendedCommunities(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricIPExtendedCommunityResources and their operations over a NetworkFabricIPExtendedCommunityResource. + public static NetworkFabricIPExtendedCommunityCollection GetNetworkFabricIPExtendedCommunities(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetIPExtendedCommunities(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricIPExtendedCommunities(); } /// @@ -530,9 +737,9 @@ public static IPExtendedCommunityCollection GetIPExtendedCommunities(this Resour /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetIPExtendedCommunityAsync(this ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricIPExtendedCommunityAsync(this ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetIPExtendedCommunities().GetAsync(ipExtendedCommunityName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricIPExtendedCommunities().GetAsync(ipExtendedCommunityName, cancellationToken).ConfigureAwait(false); } /// @@ -554,17 +761,17 @@ public static async Task> GetIPExtendedCom /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetIPExtendedCommunity(this ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricIPExtendedCommunity(this ResourceGroupResource resourceGroupResource, string ipExtendedCommunityName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetIPExtendedCommunities().Get(ipExtendedCommunityName, cancellationToken); + return resourceGroupResource.GetNetworkFabricIPExtendedCommunities().Get(ipExtendedCommunityName, cancellationToken); } - /// Gets a collection of IPPrefixResources in the ResourceGroupResource. + /// Gets a collection of NetworkFabricIPPrefixResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of IPPrefixResources and their operations over a IPPrefixResource. - public static IPPrefixCollection GetIPPrefixes(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricIPPrefixResources and their operations over a NetworkFabricIPPrefixResource. + public static NetworkFabricIPPrefixCollection GetNetworkFabricIPPrefixes(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetIPPrefixes(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricIPPrefixes(); } /// @@ -586,9 +793,9 @@ public static IPPrefixCollection GetIPPrefixes(this ResourceGroupResource resour /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetIPPrefixAsync(this ResourceGroupResource resourceGroupResource, string ipPrefixName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricIPPrefixAsync(this ResourceGroupResource resourceGroupResource, string ipPrefixName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetIPPrefixes().GetAsync(ipPrefixName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricIPPrefixes().GetAsync(ipPrefixName, cancellationToken).ConfigureAwait(false); } /// @@ -610,17 +817,17 @@ public static async Task> GetIPPrefixAsync(this Resou /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetIPPrefix(this ResourceGroupResource resourceGroupResource, string ipPrefixName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricIPPrefix(this ResourceGroupResource resourceGroupResource, string ipPrefixName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetIPPrefixes().Get(ipPrefixName, cancellationToken); + return resourceGroupResource.GetNetworkFabricIPPrefixes().Get(ipPrefixName, cancellationToken); } - /// Gets a collection of L2IsolationDomainResources in the ResourceGroupResource. + /// Gets a collection of NetworkFabricL2IsolationDomainResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of L2IsolationDomainResources and their operations over a L2IsolationDomainResource. - public static L2IsolationDomainCollection GetL2IsolationDomains(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricL2IsolationDomainResources and their operations over a NetworkFabricL2IsolationDomainResource. + public static NetworkFabricL2IsolationDomainCollection GetNetworkFabricL2IsolationDomains(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetL2IsolationDomains(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricL2IsolationDomains(); } /// @@ -642,9 +849,9 @@ public static L2IsolationDomainCollection GetL2IsolationDomains(this ResourceGro /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetL2IsolationDomainAsync(this ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricL2IsolationDomainAsync(this ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetL2IsolationDomains().GetAsync(l2IsolationDomainName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricL2IsolationDomains().GetAsync(l2IsolationDomainName, cancellationToken).ConfigureAwait(false); } /// @@ -666,17 +873,17 @@ public static async Task> GetL2IsolationDoma /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetL2IsolationDomain(this ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricL2IsolationDomain(this ResourceGroupResource resourceGroupResource, string l2IsolationDomainName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetL2IsolationDomains().Get(l2IsolationDomainName, cancellationToken); + return resourceGroupResource.GetNetworkFabricL2IsolationDomains().Get(l2IsolationDomainName, cancellationToken); } - /// Gets a collection of L3IsolationDomainResources in the ResourceGroupResource. + /// Gets a collection of NetworkFabricL3IsolationDomainResources in the ResourceGroupResource. /// The instance the method will execute against. - /// An object representing collection of L3IsolationDomainResources and their operations over a L3IsolationDomainResource. - public static L3IsolationDomainCollection GetL3IsolationDomains(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkFabricL3IsolationDomainResources and their operations over a NetworkFabricL3IsolationDomainResource. + public static NetworkFabricL3IsolationDomainCollection GetNetworkFabricL3IsolationDomains(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetL3IsolationDomains(); + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricL3IsolationDomains(); } /// @@ -698,9 +905,9 @@ public static L3IsolationDomainCollection GetL3IsolationDomains(this ResourceGro /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetL3IsolationDomainAsync(this ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricL3IsolationDomainAsync(this ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetL3IsolationDomains().GetAsync(l3IsolationDomainName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricL3IsolationDomains().GetAsync(l3IsolationDomainName, cancellationToken).ConfigureAwait(false); } /// @@ -722,9 +929,65 @@ public static async Task> GetL3IsolationDoma /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetL3IsolationDomain(this ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricL3IsolationDomain(this ResourceGroupResource resourceGroupResource, string l3IsolationDomainName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetL3IsolationDomains().Get(l3IsolationDomainName, cancellationToken); + return resourceGroupResource.GetNetworkFabricL3IsolationDomains().Get(l3IsolationDomainName, cancellationToken); + } + + /// Gets a collection of NetworkFabricNeighborGroupResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkFabricNeighborGroupResources and their operations over a NetworkFabricNeighborGroupResource. + public static NetworkFabricNeighborGroupCollection GetNetworkFabricNeighborGroups(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricNeighborGroups(); + } + + /// + /// 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> GetNetworkFabricNeighborGroupAsync(this ResourceGroupResource resourceGroupResource, string neighborGroupName, CancellationToken cancellationToken = default) + { + return await resourceGroupResource.GetNetworkFabricNeighborGroups().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 GetNetworkFabricNeighborGroup(this ResourceGroupResource resourceGroupResource, string neighborGroupName, CancellationToken cancellationToken = default) + { + return resourceGroupResource.GetNetworkFabricNeighborGroups().Get(neighborGroupName, cancellationToken); } /// Gets a collection of NetworkDeviceResources in the ResourceGroupResource. @@ -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,12 +1270,124 @@ public static Response GetNetworkRack(this ResourceGroupRes return resourceGroupResource.GetNetworkRacks().Get(networkRackName, cancellationToken); } - /// Gets a collection of RoutePolicyResources in the ResourceGroupResource. + /// 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 RoutePolicyResources and their operations over a RoutePolicyResource. - public static RoutePolicyCollection GetRoutePolicies(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of NetworkTapResources and their operations over a NetworkTapResource. + public static NetworkTapCollection GetNetworkTaps(this ResourceGroupResource resourceGroupResource) { - return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetRoutePolicies(); + 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 NetworkFabricRoutePolicyResources in the ResourceGroupResource. + /// The instance the method will execute against. + /// An object representing collection of NetworkFabricRoutePolicyResources and their operations over a NetworkFabricRoutePolicyResource. + public static NetworkFabricRoutePolicyCollection GetNetworkFabricRoutePolicies(this ResourceGroupResource resourceGroupResource) + { + return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNetworkFabricRoutePolicies(); } /// @@ -978,9 +1409,9 @@ public static RoutePolicyCollection GetRoutePolicies(this ResourceGroupResource /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static async Task> GetRoutePolicyAsync(this ResourceGroupResource resourceGroupResource, string routePolicyName, CancellationToken cancellationToken = default) + public static async Task> GetNetworkFabricRoutePolicyAsync(this ResourceGroupResource resourceGroupResource, string routePolicyName, CancellationToken cancellationToken = default) { - return await resourceGroupResource.GetRoutePolicies().GetAsync(routePolicyName, cancellationToken).ConfigureAwait(false); + return await resourceGroupResource.GetNetworkFabricRoutePolicies().GetAsync(routePolicyName, cancellationToken).ConfigureAwait(false); } /// @@ -1002,9 +1433,9 @@ public static async Task> GetRoutePolicyAsync(this /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public static Response GetRoutePolicy(this ResourceGroupResource resourceGroupResource, string routePolicyName, CancellationToken cancellationToken = default) + public static Response GetNetworkFabricRoutePolicy(this ResourceGroupResource resourceGroupResource, string routePolicyName, CancellationToken cancellationToken = default) { - return resourceGroupResource.GetRoutePolicies().Get(routePolicyName, cancellationToken); + return resourceGroupResource.GetNetworkFabricRoutePolicies().Get(routePolicyName, cancellationToken); } /// Gets a collection of NetworkDeviceSkuResources in the SubscriptionResource. @@ -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. - /// An object representing collection of NetworkRackSkuResources and their operations over a NetworkRackSkuResource. - public static NetworkRackSkuCollection GetNetworkRackSkus(this SubscriptionResource subscriptionResource) + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricAccessControlListsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkRackSkus(); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricAccessControlListsAsync(cancellationToken); } /// - /// Get Network Rack SKU resource. + /// Implements AccessControlLists list by subscription GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/networkRackSkus/{networkRackSkuName} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists /// /// /// Operation Id - /// NetworkRackSkus_Get + /// AccessControlLists_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) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricAccessControlLists(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return await subscriptionResource.GetNetworkRackSkus().GetAsync(networkRackSkuName, cancellationToken).ConfigureAwait(false); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricAccessControlLists(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) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricInternetGatewaysAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return subscriptionResource.GetNetworkRackSkus().Get(networkRackSkuName, cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricInternetGatewaysAsync(cancellationToken); } /// - /// Implements AccessControlLists list by subscription GET method. + /// Displays Internet Gateways list by subscription GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/accessControlLists + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGateways /// /// /// Operation Id - /// AccessControlLists_ListBySubscription + /// InternetGateways_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) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricInternetGateways(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlListsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricInternetGateways(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) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricInternetGatewayRulesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAccessControlLists(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricInternetGatewayRulesAsync(cancellationToken); } /// - /// Implements IpCommunities list by subscription GET method. + /// List all Internet Gateway rules in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ManagedNetworkFabric/internetGatewayRules + /// + /// + /// Operation Id + /// 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 GetNetworkFabricInternetGatewayRules(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricInternetGatewayRules(cancellationToken); + } + + /// + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -1232,14 +1691,14 @@ public static Pageable GetAccessControlLists(this Sub /// /// 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 GetIPCommunitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricIPCommunitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPCommunitiesAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPCommunitiesAsync(cancellationToken); } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -1253,10 +1712,10 @@ public static AsyncPageable GetIPCommunitiesAsync(this Subs /// /// 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 GetIPCommunities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricIPCommunities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPCommunities(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPCommunities(cancellationToken); } /// @@ -1274,10 +1733,10 @@ public static Pageable GetIPCommunities(this SubscriptionRe /// /// 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 GetIPExtendedCommunitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricIPExtendedCommunitiesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPExtendedCommunitiesAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPExtendedCommunitiesAsync(cancellationToken); } /// @@ -1295,10 +1754,10 @@ public static AsyncPageable GetIPExtendedCommunitie /// /// 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 GetIPExtendedCommunities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricIPExtendedCommunities(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPExtendedCommunities(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPExtendedCommunities(cancellationToken); } /// @@ -1316,10 +1775,10 @@ public static Pageable GetIPExtendedCommunities(thi /// /// 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 GetIPPrefixesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricIPPrefixesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPPrefixesAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPPrefixesAsync(cancellationToken); } /// @@ -1337,10 +1796,10 @@ public static AsyncPageable GetIPPrefixesAsync(this Subscripti /// /// 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 GetIPPrefixes(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricIPPrefixes(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetIPPrefixes(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricIPPrefixes(cancellationToken); } /// @@ -1358,10 +1817,10 @@ public static Pageable GetIPPrefixes(this SubscriptionResource /// /// 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 GetL2IsolationDomainsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricL2IsolationDomainsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetL2IsolationDomainsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricL2IsolationDomainsAsync(cancellationToken); } /// @@ -1379,10 +1838,10 @@ public static AsyncPageable GetL2IsolationDomainsAsyn /// /// 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 GetL2IsolationDomains(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricL2IsolationDomains(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetL2IsolationDomains(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricL2IsolationDomains(cancellationToken); } /// @@ -1400,10 +1859,10 @@ public static Pageable GetL2IsolationDomains(this Sub /// /// 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 GetL3IsolationDomainsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricL3IsolationDomainsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetL3IsolationDomainsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricL3IsolationDomainsAsync(cancellationToken); } /// @@ -1421,10 +1880,52 @@ public static AsyncPageable GetL3IsolationDomainsAsyn /// /// 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 GetL3IsolationDomains(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricL3IsolationDomains(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricL3IsolationDomains(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 GetNetworkFabricNeighborGroupsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricNeighborGroupsAsync(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 GetNetworkFabricNeighborGroups(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetL3IsolationDomains(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricNeighborGroups(cancellationToken); } /// @@ -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. /// @@ -1610,10 +2237,10 @@ public static Pageable GetNetworkRacks(this SubscriptionRes /// /// 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 GetRoutePoliciesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetNetworkFabricRoutePoliciesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRoutePoliciesAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricRoutePoliciesAsync(cancellationToken); } /// @@ -1631,10 +2258,10 @@ public static AsyncPageable GetRoutePoliciesAsync(this Subs /// /// 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 GetRoutePolicies(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetNetworkFabricRoutePolicies(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRoutePolicies(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNetworkFabricRoutePolicies(cancellationToken); } } } 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..30435260e317a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,46 +31,67 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of AccessControlListResources in the ResourceGroupResource. - /// An object representing collection of AccessControlListResources and their operations over a AccessControlListResource. - public virtual AccessControlListCollection GetAccessControlLists() + /// Gets a collection of NetworkFabricAccessControlListResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricAccessControlListResources and their operations over a NetworkFabricAccessControlListResource. + public virtual NetworkFabricAccessControlListCollection GetNetworkFabricAccessControlLists() { - return GetCachedClient(Client => new AccessControlListCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricAccessControlListCollection(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() + /// Gets a collection of NetworkFabricInternetGatewayResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricInternetGatewayResources and their operations over a NetworkFabricInternetGatewayResource. + public virtual NetworkFabricInternetGatewayCollection GetNetworkFabricInternetGateways() { - return GetCachedClient(Client => new IPCommunityCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricInternetGatewayCollection(Client, Id)); } - /// Gets a collection of IPExtendedCommunityResources in the ResourceGroupResource. - /// An object representing collection of IPExtendedCommunityResources and their operations over a IPExtendedCommunityResource. - public virtual IPExtendedCommunityCollection GetIPExtendedCommunities() + /// Gets a collection of NetworkFabricInternetGatewayRuleResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricInternetGatewayRuleResources and their operations over a NetworkFabricInternetGatewayRuleResource. + public virtual NetworkFabricInternetGatewayRuleCollection GetNetworkFabricInternetGatewayRules() { - return GetCachedClient(Client => new IPExtendedCommunityCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricInternetGatewayRuleCollection(Client, Id)); } - /// Gets a collection of IPPrefixResources in the ResourceGroupResource. - /// An object representing collection of IPPrefixResources and their operations over a IPPrefixResource. - public virtual IPPrefixCollection GetIPPrefixes() + /// Gets a collection of NetworkFabricIPCommunityResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricIPCommunityResources and their operations over a NetworkFabricIPCommunityResource. + public virtual NetworkFabricIPCommunityCollection GetNetworkFabricIPCommunities() { - return GetCachedClient(Client => new IPPrefixCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricIPCommunityCollection(Client, Id)); } - /// Gets a collection of L2IsolationDomainResources in the ResourceGroupResource. - /// An object representing collection of L2IsolationDomainResources and their operations over a L2IsolationDomainResource. - public virtual L2IsolationDomainCollection GetL2IsolationDomains() + /// Gets a collection of NetworkFabricIPExtendedCommunityResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricIPExtendedCommunityResources and their operations over a NetworkFabricIPExtendedCommunityResource. + public virtual NetworkFabricIPExtendedCommunityCollection GetNetworkFabricIPExtendedCommunities() { - return GetCachedClient(Client => new L2IsolationDomainCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricIPExtendedCommunityCollection(Client, Id)); } - /// Gets a collection of L3IsolationDomainResources in the ResourceGroupResource. - /// An object representing collection of L3IsolationDomainResources and their operations over a L3IsolationDomainResource. - public virtual L3IsolationDomainCollection GetL3IsolationDomains() + /// Gets a collection of NetworkFabricIPPrefixResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricIPPrefixResources and their operations over a NetworkFabricIPPrefixResource. + public virtual NetworkFabricIPPrefixCollection GetNetworkFabricIPPrefixes() { - return GetCachedClient(Client => new L3IsolationDomainCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricIPPrefixCollection(Client, Id)); + } + + /// Gets a collection of NetworkFabricL2IsolationDomainResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricL2IsolationDomainResources and their operations over a NetworkFabricL2IsolationDomainResource. + public virtual NetworkFabricL2IsolationDomainCollection GetNetworkFabricL2IsolationDomains() + { + return GetCachedClient(Client => new NetworkFabricL2IsolationDomainCollection(Client, Id)); + } + + /// Gets a collection of NetworkFabricL3IsolationDomainResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricL3IsolationDomainResources and their operations over a NetworkFabricL3IsolationDomainResource. + public virtual NetworkFabricL3IsolationDomainCollection GetNetworkFabricL3IsolationDomains() + { + return GetCachedClient(Client => new NetworkFabricL3IsolationDomainCollection(Client, Id)); + } + + /// Gets a collection of NetworkFabricNeighborGroupResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricNeighborGroupResources and their operations over a NetworkFabricNeighborGroupResource. + public virtual NetworkFabricNeighborGroupCollection GetNetworkFabricNeighborGroups() + { + return GetCachedClient(Client => new NetworkFabricNeighborGroupCollection(Client, Id)); } /// Gets a collection of NetworkDeviceResources in the ResourceGroupResource. @@ -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,11 +129,25 @@ public virtual NetworkRackCollection GetNetworkRacks() return GetCachedClient(Client => new NetworkRackCollection(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() + /// 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 NetworkFabricRoutePolicyResources in the ResourceGroupResource. + /// An object representing collection of NetworkFabricRoutePolicyResources and their operations over a NetworkFabricRoutePolicyResource. + public virtual NetworkFabricRoutePolicyCollection GetNetworkFabricRoutePolicies() { - return GetCachedClient(Client => new RoutePolicyCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricRoutePolicyCollection(Client, Id)); } } } 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..277b7562d7e9a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -16,28 +16,40 @@ namespace Azure.ResourceManager.ManagedNetworkFabric /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _accessControlListClientDiagnostics; - private AccessControlListsRestOperations _accessControlListRestClient; - private ClientDiagnostics _ipCommunityIPCommunitiesClientDiagnostics; - private IpCommunitiesRestOperations _ipCommunityIPCommunitiesRestClient; - private ClientDiagnostics _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics; - private IpExtendedCommunitiesRestOperations _ipExtendedCommunityIPExtendedCommunitiesRestClient; - private ClientDiagnostics _ipPrefixIPPrefixesClientDiagnostics; - private IpPrefixesRestOperations _ipPrefixIPPrefixesRestClient; - private ClientDiagnostics _l2IsolationDomainClientDiagnostics; - private L2IsolationDomainsRestOperations _l2IsolationDomainRestClient; - private ClientDiagnostics _l3IsolationDomainClientDiagnostics; - private L3IsolationDomainsRestOperations _l3IsolationDomainRestClient; + private ClientDiagnostics _networkFabricAccessControlListAccessControlListsClientDiagnostics; + private AccessControlListsRestOperations _networkFabricAccessControlListAccessControlListsRestClient; + private ClientDiagnostics _networkFabricInternetGatewayInternetGatewaysClientDiagnostics; + private InternetGatewaysRestOperations _networkFabricInternetGatewayInternetGatewaysRestClient; + private ClientDiagnostics _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics; + private InternetGatewayRulesRestOperations _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient; + private ClientDiagnostics _networkFabricIPCommunityIPCommunitiesClientDiagnostics; + private IpCommunitiesRestOperations _networkFabricIPCommunityIPCommunitiesRestClient; + private ClientDiagnostics _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics; + private IpExtendedCommunitiesRestOperations _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient; + private ClientDiagnostics _networkFabricIPPrefixIPPrefixesClientDiagnostics; + private IpPrefixesRestOperations _networkFabricIPPrefixIPPrefixesRestClient; + private ClientDiagnostics _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics; + private L2IsolationDomainsRestOperations _networkFabricL2IsolationDomainL2IsolationDomainsRestClient; + private ClientDiagnostics _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics; + private L3IsolationDomainsRestOperations _networkFabricL3IsolationDomainL3IsolationDomainsRestClient; + private ClientDiagnostics _networkFabricNeighborGroupNeighborGroupsClientDiagnostics; + private NeighborGroupsRestOperations _networkFabricNeighborGroupNeighborGroupsRestClient; 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 _routePolicyClientDiagnostics; - private RoutePoliciesRestOperations _routePolicyRestClient; + private ClientDiagnostics _networkTapRuleClientDiagnostics; + private NetworkTapRulesRestOperations _networkTapRuleRestClient; + private ClientDiagnostics _networkTapClientDiagnostics; + private NetworkTapsRestOperations _networkTapRestClient; + private ClientDiagnostics _networkFabricRoutePolicyRoutePoliciesClientDiagnostics; + private RoutePoliciesRestOperations _networkFabricRoutePolicyRoutePoliciesRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -51,28 +63,40 @@ 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 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); - private IpExtendedCommunitiesRestOperations IPExtendedCommunityIpExtendedCommunitiesRestClient => _ipExtendedCommunityIPExtendedCommunitiesRestClient ??= new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(IPExtendedCommunityResource.ResourceType)); - private ClientDiagnostics IPPrefixIpPrefixesClientDiagnostics => _ipPrefixIPPrefixesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPPrefixResource.ResourceType.Namespace, Diagnostics); - private IpPrefixesRestOperations IPPrefixIpPrefixesRestClient => _ipPrefixIPPrefixesRestClient ??= new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(IPPrefixResource.ResourceType)); - private ClientDiagnostics L2IsolationDomainClientDiagnostics => _l2IsolationDomainClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", L2IsolationDomainResource.ResourceType.Namespace, Diagnostics); - 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 NetworkFabricAccessControlListAccessControlListsClientDiagnostics => _networkFabricAccessControlListAccessControlListsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricAccessControlListResource.ResourceType.Namespace, Diagnostics); + private AccessControlListsRestOperations NetworkFabricAccessControlListAccessControlListsRestClient => _networkFabricAccessControlListAccessControlListsRestClient ??= new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricAccessControlListResource.ResourceType)); + private ClientDiagnostics NetworkFabricInternetGatewayInternetGatewaysClientDiagnostics => _networkFabricInternetGatewayInternetGatewaysClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricInternetGatewayResource.ResourceType.Namespace, Diagnostics); + private InternetGatewaysRestOperations NetworkFabricInternetGatewayInternetGatewaysRestClient => _networkFabricInternetGatewayInternetGatewaysRestClient ??= new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricInternetGatewayResource.ResourceType)); + private ClientDiagnostics NetworkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics => _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricInternetGatewayRuleResource.ResourceType.Namespace, Diagnostics); + private InternetGatewayRulesRestOperations NetworkFabricInternetGatewayRuleInternetGatewayRulesRestClient => _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient ??= new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricInternetGatewayRuleResource.ResourceType)); + private ClientDiagnostics NetworkFabricIPCommunityIpCommunitiesClientDiagnostics => _networkFabricIPCommunityIPCommunitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPCommunityResource.ResourceType.Namespace, Diagnostics); + private IpCommunitiesRestOperations NetworkFabricIPCommunityIpCommunitiesRestClient => _networkFabricIPCommunityIPCommunitiesRestClient ??= new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricIPCommunityResource.ResourceType)); + private ClientDiagnostics NetworkFabricIPExtendedCommunityIpExtendedCommunitiesClientDiagnostics => _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPExtendedCommunityResource.ResourceType.Namespace, Diagnostics); + private IpExtendedCommunitiesRestOperations NetworkFabricIPExtendedCommunityIpExtendedCommunitiesRestClient => _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient ??= new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricIPExtendedCommunityResource.ResourceType)); + private ClientDiagnostics NetworkFabricIPPrefixIpPrefixesClientDiagnostics => _networkFabricIPPrefixIPPrefixesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPPrefixResource.ResourceType.Namespace, Diagnostics); + private IpPrefixesRestOperations NetworkFabricIPPrefixIpPrefixesRestClient => _networkFabricIPPrefixIPPrefixesRestClient ??= new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricIPPrefixResource.ResourceType)); + private ClientDiagnostics NetworkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics => _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricL2IsolationDomainResource.ResourceType.Namespace, Diagnostics); + private L2IsolationDomainsRestOperations NetworkFabricL2IsolationDomainL2IsolationDomainsRestClient => _networkFabricL2IsolationDomainL2IsolationDomainsRestClient ??= new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricL2IsolationDomainResource.ResourceType)); + private ClientDiagnostics NetworkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics => _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricL3IsolationDomainResource.ResourceType.Namespace, Diagnostics); + private L3IsolationDomainsRestOperations NetworkFabricL3IsolationDomainL3IsolationDomainsRestClient => _networkFabricL3IsolationDomainL3IsolationDomainsRestClient ??= new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricL3IsolationDomainResource.ResourceType)); + private ClientDiagnostics NetworkFabricNeighborGroupNeighborGroupsClientDiagnostics => _networkFabricNeighborGroupNeighborGroupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricNeighborGroupResource.ResourceType.Namespace, Diagnostics); + private NeighborGroupsRestOperations NetworkFabricNeighborGroupNeighborGroupsRestClient => _networkFabricNeighborGroupNeighborGroupsRestClient ??= new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricNeighborGroupResource.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 RoutePolicyClientDiagnostics => _routePolicyClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", RoutePolicyResource.ResourceType.Namespace, Diagnostics); - private RoutePoliciesRestOperations RoutePolicyRestClient => _routePolicyRestClient ??= new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(RoutePolicyResource.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 NetworkFabricRoutePolicyRoutePoliciesClientDiagnostics => _networkFabricRoutePolicyRoutePoliciesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricRoutePolicyResource.ResourceType.Namespace, Diagnostics); + private RoutePoliciesRestOperations NetworkFabricRoutePolicyRoutePoliciesRestClient => _networkFabricRoutePolicyRoutePoliciesRestClient ??= new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetworkFabricRoutePolicyResource.ResourceType)); private string GetApiVersionOrNull(ResourceType 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. /// @@ -115,12 +132,12 @@ public virtual NetworkRackSkuCollection GetNetworkRackSkus() /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAccessControlListsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricAccessControlListsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AccessControlListRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AccessControlListRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AccessControlListResource(Client, AccessControlListData.DeserializeAccessControlListData(e)), AccessControlListClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAccessControlLists", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricAccessControlListAccessControlListsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricAccessControlListAccessControlListsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricAccessControlListResource(Client, NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(e)), NetworkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricAccessControlLists", "value", "nextLink", cancellationToken); } /// @@ -137,16 +154,104 @@ public virtual AsyncPageable GetAccessControlListsAsy /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAccessControlLists(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricAccessControlLists(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricAccessControlListAccessControlListsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricAccessControlListAccessControlListsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricAccessControlListResource(Client, NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(e)), NetworkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricAccessControlLists", "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. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricInternetGatewaysAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricInternetGatewayInternetGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricInternetGatewayInternetGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayResource(Client, NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(e)), NetworkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricInternetGateways", "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 GetNetworkFabricInternetGateways(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricInternetGatewayInternetGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricInternetGatewayInternetGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayResource(Client, NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(e)), NetworkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricInternetGateways", "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 GetNetworkFabricInternetGatewayRulesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayRuleResource(Client, NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(e)), NetworkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricInternetGatewayRules", "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 GetNetworkFabricInternetGatewayRules(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AccessControlListRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AccessControlListRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AccessControlListResource(Client, AccessControlListData.DeserializeAccessControlListData(e)), AccessControlListClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAccessControlLists", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayRuleResource(Client, NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(e)), NetworkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricInternetGatewayRules", "value", "nextLink", cancellationToken); } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -159,16 +264,16 @@ public virtual Pageable GetAccessControlLists(Cancell /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetIPCommunitiesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricIPCommunitiesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPCommunityIpCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPCommunityIpCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPCommunityResource(Client, IPCommunityData.DeserializeIPCommunityData(e)), IPCommunityIpCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPCommunities", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPCommunityIpCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPCommunityIpCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPCommunityResource(Client, NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(e)), NetworkFabricIPCommunityIpCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPCommunities", "value", "nextLink", cancellationToken); } /// - /// Implements IpCommunities list by subscription GET method. + /// Implements IP Communities list by subscription GET method. /// /// /// Request Path @@ -181,12 +286,12 @@ public virtual AsyncPageable GetIPCommunitiesAsync(Cancella /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetIPCommunities(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricIPCommunities(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPCommunityIpCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPCommunityIpCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPCommunityResource(Client, IPCommunityData.DeserializeIPCommunityData(e)), IPCommunityIpCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPCommunities", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPCommunityIpCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPCommunityIpCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPCommunityResource(Client, NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(e)), NetworkFabricIPCommunityIpCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPCommunities", "value", "nextLink", cancellationToken); } /// @@ -203,12 +308,12 @@ public virtual Pageable GetIPCommunities(CancellationToken /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetIPExtendedCommunitiesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricIPExtendedCommunitiesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPExtendedCommunityResource(Client, IPExtendedCommunityData.DeserializeIPExtendedCommunityData(e)), IPExtendedCommunityIpExtendedCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPExtendedCommunities", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPExtendedCommunityResource(Client, NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(e)), NetworkFabricIPExtendedCommunityIpExtendedCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPExtendedCommunities", "value", "nextLink", cancellationToken); } /// @@ -225,12 +330,12 @@ public virtual AsyncPageable GetIPExtendedCommuniti /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetIPExtendedCommunities(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricIPExtendedCommunities(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPExtendedCommunityResource(Client, IPExtendedCommunityData.DeserializeIPExtendedCommunityData(e)), IPExtendedCommunityIpExtendedCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPExtendedCommunities", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPExtendedCommunityIpExtendedCommunitiesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPExtendedCommunityResource(Client, NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(e)), NetworkFabricIPExtendedCommunityIpExtendedCommunitiesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPExtendedCommunities", "value", "nextLink", cancellationToken); } /// @@ -247,12 +352,12 @@ public virtual Pageable GetIPExtendedCommunities(Ca /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetIPPrefixesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricIPPrefixesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPPrefixIpPrefixesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPPrefixIpPrefixesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPPrefixResource(Client, IPPrefixData.DeserializeIPPrefixData(e)), IPPrefixIpPrefixesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPPrefixes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPPrefixIpPrefixesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPPrefixIpPrefixesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPPrefixResource(Client, NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(e)), NetworkFabricIPPrefixIpPrefixesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPPrefixes", "value", "nextLink", cancellationToken); } /// @@ -269,12 +374,12 @@ public virtual AsyncPageable GetIPPrefixesAsync(CancellationTo /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetIPPrefixes(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricIPPrefixes(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => IPPrefixIpPrefixesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => IPPrefixIpPrefixesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPPrefixResource(Client, IPPrefixData.DeserializeIPPrefixData(e)), IPPrefixIpPrefixesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetIPPrefixes", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricIPPrefixIpPrefixesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricIPPrefixIpPrefixesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPPrefixResource(Client, NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(e)), NetworkFabricIPPrefixIpPrefixesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricIPPrefixes", "value", "nextLink", cancellationToken); } /// @@ -291,12 +396,12 @@ public virtual Pageable GetIPPrefixes(CancellationToken cancel /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetL2IsolationDomainsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricL2IsolationDomainsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => L2IsolationDomainRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => L2IsolationDomainRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new L2IsolationDomainResource(Client, L2IsolationDomainData.DeserializeL2IsolationDomainData(e)), L2IsolationDomainClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetL2IsolationDomains", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL2IsolationDomainResource(Client, NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(e)), NetworkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricL2IsolationDomains", "value", "nextLink", cancellationToken); } /// @@ -313,12 +418,12 @@ public virtual AsyncPageable GetL2IsolationDomainsAsy /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetL2IsolationDomains(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricL2IsolationDomains(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => L2IsolationDomainRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => L2IsolationDomainRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new L2IsolationDomainResource(Client, L2IsolationDomainData.DeserializeL2IsolationDomainData(e)), L2IsolationDomainClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetL2IsolationDomains", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL2IsolationDomainResource(Client, NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(e)), NetworkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricL2IsolationDomains", "value", "nextLink", cancellationToken); } /// @@ -335,12 +440,12 @@ public virtual Pageable GetL2IsolationDomains(Cancell /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetL3IsolationDomainsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricL3IsolationDomainsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => L3IsolationDomainRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => L3IsolationDomainRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new L3IsolationDomainResource(Client, L3IsolationDomainData.DeserializeL3IsolationDomainData(e)), L3IsolationDomainClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetL3IsolationDomains", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL3IsolationDomainResource(Client, NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(e)), NetworkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricL3IsolationDomains", "value", "nextLink", cancellationToken); } /// @@ -357,12 +462,56 @@ public virtual AsyncPageable GetL3IsolationDomainsAsy /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetL3IsolationDomains(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricL3IsolationDomains(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => L3IsolationDomainRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => L3IsolationDomainRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new L3IsolationDomainResource(Client, L3IsolationDomainData.DeserializeL3IsolationDomainData(e)), L3IsolationDomainClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetL3IsolationDomains", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL3IsolationDomainResource(Client, NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(e)), NetworkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricL3IsolationDomains", "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 GetNetworkFabricNeighborGroupsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricNeighborGroupNeighborGroupsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricNeighborGroupNeighborGroupsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricNeighborGroupResource(Client, NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(e)), NetworkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricNeighborGroups", "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 GetNetworkFabricNeighborGroups(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricNeighborGroupNeighborGroupsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricNeighborGroupNeighborGroupsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricNeighborGroupResource(Client, NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(e)), NetworkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricNeighborGroups", "value", "nextLink", cancellationToken); } /// @@ -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. /// @@ -555,12 +836,12 @@ public virtual Pageable GetNetworkRacks(CancellationToken c /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetRoutePoliciesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetNetworkFabricRoutePoliciesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => RoutePolicyRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => RoutePolicyRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RoutePolicyResource(Client, RoutePolicyData.DeserializeRoutePolicyData(e)), RoutePolicyClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetRoutePolicies", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricRoutePolicyRoutePoliciesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricRoutePolicyRoutePoliciesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricRoutePolicyResource(Client, NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(e)), NetworkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricRoutePolicies", "value", "nextLink", cancellationToken); } /// @@ -577,12 +858,12 @@ public virtual AsyncPageable GetRoutePoliciesAsync(Cancella /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetRoutePolicies(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetNetworkFabricRoutePolicies(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => RoutePolicyRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => RoutePolicyRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RoutePolicyResource(Client, RoutePolicyData.DeserializeRoutePolicyData(e)), RoutePolicyClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetRoutePolicies", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => NetworkFabricRoutePolicyRoutePoliciesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NetworkFabricRoutePolicyRoutePoliciesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricRoutePolicyResource(Client, NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(e)), NetworkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNetworkFabricRoutePolicies", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs deleted file mode 100644 index 0506a479f13fe..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkData.cs +++ /dev/null @@ -1,79 +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 ExternalNetwork data model. - /// Defines the ExternalNetwork item. - /// - public partial class ExternalNetworkData : ResourceData - { - /// Initializes a new instance of ExternalNetworkData. - /// Peering option list. - public ExternalNetworkData(PeeringOption peeringOption) - { - DisabledOnResources = new ChangeTrackingList(); - PeeringOption = peeringOption; - } - - /// Initializes a new instance of ExternalNetworkData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Switch configuration description. - /// 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) - { - Annotation = annotation; - NetworkToNetworkInterconnectId = networkToNetworkInterconnectId; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - ProvisioningState = provisioningState; - PeeringOption = peeringOption; - OptionBProperties = optionBProperties; - OptionAProperties = optionAProperties; - ImportRoutePolicyId = importRoutePolicyId; - ExportRoutePolicyId = exportRoutePolicyId; - } - - /// Switch configuration description. - public string Annotation { 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; } - /// 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; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs deleted file mode 100644 index a6733076e0aca..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkResource.cs +++ /dev/null @@ -1,678 +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.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A Class representing an ExternalNetwork 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 GetExternalNetworkResource method. - /// Otherwise you can get one from its parent resource using the GetExternalNetwork method. - /// - public partial class ExternalNetworkResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _externalNetworkClientDiagnostics; - private readonly ExternalNetworksRestOperations _externalNetworkRestClient; - private readonly ExternalNetworkData _data; - - /// Initializes a new instance of the class for mocking. - protected ExternalNetworkResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ExternalNetworkResource(ArmClient client, ExternalNetworkData 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 ExternalNetworkResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _externalNetworkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string externalNetworkApiVersion); - _externalNetworkRestClient = new ExternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, externalNetworkApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/l3IsolationDomains/externalNetworks"; - - /// 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 ExternalNetworkData 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 ExternalNetworks GET method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Get"); - scope.Start(); - try - { - var response = await _externalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ExternalNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Implements ExternalNetworks GET method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Get"); - scope.Start(); - try - { - var response = _externalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ExternalNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Implements ExternalNetworks DELETE method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _externalNetworkRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 ExternalNetworks DELETE method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Delete"); - scope.Start(); - try - { - var response = _externalNetworkRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 ExternalNetworks resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_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. - /// ExternalNetwork properties to update. Only annotations are supported. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExternalNetworkPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Update"); - scope.Start(); - 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); - 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 ExternalNetworks resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} - /// - /// - /// Operation Id - /// ExternalNetworks_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. - /// ExternalNetwork properties to update. Only annotations are supported. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ExternalNetworkPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.Update"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Executes update operation to enable or disable administrative State for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateAdministrativeState"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Executes update operation to enable or disable administrative State for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.UpdateAdministrativeState"); - scope.Start(); - 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); - 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); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearArpEntries for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearArpEntries"); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// clearArpEntries for externalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/clearArpEntries - /// - /// - /// Operation Id - /// ExternalNetworks_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 = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkResource.ClearArpEntries"); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs deleted file mode 100644 index 32e23e29be684..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityData.cs +++ /dev/null @@ -1,61 +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 IPCommunity data model. - /// The IpCommunity resource definition. - /// - public partial class IPCommunityData : TrackedResourceData - { - /// Initializes a new instance of IPCommunityData. - /// The location. - public IPCommunityData(AzureLocation location) : base(location) - { - WellKnownCommunities = new ChangeTrackingList(); - CommunityMembers = new ChangeTrackingList(); - } - - /// Initializes a new instance of IPCommunityData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// 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) - { - Annotation = annotation; - Action = action; - WellKnownCommunities = wellKnownCommunities; - CommunityMembers = communityMembers; - ProvisioningState = provisioningState; - } - - /// 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. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs deleted file mode 100644 index b0a3d1fbef069..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityData.cs +++ /dev/null @@ -1,56 +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 IPExtendedCommunity data model. - /// The IpExtendedCommunity resource definition. - /// - public partial class IPExtendedCommunityData : TrackedResourceData - { - /// Initializes a new instance of IPExtendedCommunityData. - /// The location. - public IPExtendedCommunityData(AzureLocation location) : base(location) - { - RouteTargets = new ChangeTrackingList(); - } - - /// Initializes a new instance of IPExtendedCommunityData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// 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) - { - Annotation = annotation; - Action = action; - RouteTargets = routeTargets; - ProvisioningState = provisioningState; - } - - /// 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. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs deleted file mode 100644 index 7d3a87b42e27e..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixData.cs +++ /dev/null @@ -1,58 +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; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing the IPPrefix data model. - /// The IPPrefix 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) - { - Argument.AssertNotNull(ipPrefixRules, nameof(ipPrefixRules)); - - IPPrefixRules = ipPrefixRules.ToList(); - } - - /// Initializes a new instance of IPPrefixData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// 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) - { - Annotation = annotation; - IPPrefixRules = ipPrefixRules; - ProvisioningState = provisioningState; - } - - /// 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. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs deleted file mode 100644 index dc085a52a928c..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkData.cs +++ /dev/null @@ -1,104 +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 InternalNetwork data model. - /// Defines the InternalNetwork item. - /// - public partial class InternalNetworkData : ResourceData - { - /// Initializes a new instance of InternalNetworkData. - /// Vlan identifier. Example: 1001. - public InternalNetworkData(int vlanId) - { - ConnectedIPv4Subnets = new ChangeTrackingList(); - ConnectedIPv6Subnets = new ChangeTrackingList(); - DisabledOnResources = new ChangeTrackingList(); - BgpDisabledOnResources = new ChangeTrackingList(); - BfdDisabledOnResources = new ChangeTrackingList(); - BfdForStaticRoutesDisabledOnResources = new ChangeTrackingList(); - VlanId = vlanId; - } - - /// Initializes a new instance of InternalNetworkData. - /// The id. - /// The name. - /// The resourceType. - /// 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. - /// 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) - { - 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; - VlanId = vlanId; - } - - /// 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. - public IList ConnectedIPv4Subnets { get; } - /// List with object 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; } - /// Vlan identifier. Example: 1001. - public int VlanId { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs deleted file mode 100644 index e23cc0668e869..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkResource.cs +++ /dev/null @@ -1,754 +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.ManagedNetworkFabric.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A Class representing an InternalNetwork 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 GetInternalNetworkResource method. - /// Otherwise you can get one from its parent resource using the GetInternalNetwork method. - /// - public partial class InternalNetworkResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _internalNetworkClientDiagnostics; - private readonly InternalNetworksRestOperations _internalNetworkRestClient; - private readonly InternalNetworkData _data; - - /// Initializes a new instance of the class for mocking. - protected InternalNetworkResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal InternalNetworkResource(ArmClient client, InternalNetworkData 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 InternalNetworkResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _internalNetworkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string internalNetworkApiVersion); - _internalNetworkRestClient = new InternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internalNetworkApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/l3IsolationDomains/internalNetworks"; - - /// 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 InternalNetworkData 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 a InternalNetworks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Get"); - scope.Start(); - try - { - var response = await _internalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new InternalNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a InternalNetworks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Get"); - scope.Start(); - try - { - var response = _internalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new InternalNetworkResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Implements InternalNetworks DELETE method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Delete"); - scope.Start(); - try - { - var response = await _internalNetworkRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 InternalNetworks DELETE method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Delete"); - scope.Start(); - try - { - var response = _internalNetworkRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a InternalNetworks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_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. - /// InternalNetwork properties to update. Only annotations are supported. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, InternalNetworkPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Update"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a InternalNetworks. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} - /// - /// - /// Operation Id - /// InternalNetworks_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. - /// InternalNetwork properties to update. Only annotations are supported. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, InternalNetworkPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.Update"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Administrative state of InternalNetworks on resources referred by their resource ids. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateAdministrativeState"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Administrative state of InternalNetworks on resources referred by their resource ids. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateAdministrativeState"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BGP state for internalNetwork. Allowed only on edge devices. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBgpAdministrativeState"); - scope.Start(); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BGP state for internalNetwork. Allowed only on edge devices. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_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 = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBgpAdministrativeState"); - scope.Start(); - 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); - 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); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForStaticRoutes for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_updateBfdForStaticRouteAdministrativeState - /// - /// - /// - /// 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 UpdateBfdForStaticRouteAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForStaticRouteAdministrativeState"); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update BfdForStaticRoutes for internalNetwork. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBfdForStaticRouteAdministrativeState - /// - /// - /// Operation Id - /// InternalNetworks_updateBfdForStaticRouteAdministrativeState - /// - /// - /// - /// 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 UpdateBfdForStaticRouteAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkResource.UpdateBfdForStaticRouteAdministrativeState"); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - 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 deleted file mode 100644 index d16eecf3ede81..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainData.cs +++ /dev/null @@ -1,68 +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 L2IsolationDomain data model. - /// The L2IsolationDomain resource definition. - /// - public partial class L2IsolationDomainData : TrackedResourceData - { - /// Initializes a new instance of L2IsolationDomainData. - /// The location. - public L2IsolationDomainData(AzureLocation location) : base(location) - { - DisabledOnResources = new ChangeTrackingList(); - } - - /// Initializes a new instance of L2IsolationDomainData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// 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) - { - Annotation = annotation; - NetworkFabricId = networkFabricId; - VlanId = vlanId; - Mtu = mtu; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - ProvisioningState = provisioningState; - } - - /// 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. - 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. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs deleted file mode 100644 index f55b67f296424..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainData.cs +++ /dev/null @@ -1,85 +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 L3IsolationDomain data model. - /// The L3IsolationDomain resource definition. - /// - public partial class L3IsolationDomainData : TrackedResourceData - { - /// Initializes a new instance of L3IsolationDomainData. - /// The location. - public L3IsolationDomainData(AzureLocation location) : base(location) - { - DisabledOnResources = new ChangeTrackingList(); - OptionBDisabledOnResources = new ChangeTrackingList(); - } - - /// Initializes a new instance of L3IsolationDomainData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The 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. - /// 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) - { - Annotation = annotation; - RedistributeConnectedSubnets = redistributeConnectedSubnets; - RedistributeStaticRoutes = redistributeStaticRoutes; - AggregateRouteConfiguration = aggregateRouteConfiguration; - Description = description; - ConnectedSubnetRoutePolicy = connectedSubnetRoutePolicy; - NetworkFabricId = networkFabricId; - DisabledOnResources = disabledOnResources; - AdministrativeState = administrativeState; - OptionBDisabledOnResources = optionBDisabledOnResources; - ProvisioningState = provisioningState; - } - - /// 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. - 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 ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/DeviceUpdateCommonPostActionResultOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/DeviceUpdateCommonPostActionResultOperationSource.cs new file mode 100644 index 0000000000000..846c4d78dfb70 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/DeviceUpdateCommonPostActionResultOperationSource.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 DeviceUpdateCommonPostActionResultOperationSource : IOperationSource + { + DeviceUpdateCommonPostActionResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return DeviceUpdateCommonPostActionResult.DeserializeDeviceUpdateCommonPostActionResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return DeviceUpdateCommonPostActionResult.DeserializeDeviceUpdateCommonPostActionResult(document.RootElement); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ExternalNetworkOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ExternalNetworkOperationSource.cs deleted file mode 100644 index 0093839134d92..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ExternalNetworkOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class ExternalNetworkOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ExternalNetworkOperationSource(ArmClient client) - { - _client = client; - } - - ExternalNetworkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ExternalNetworkData.DeserializeExternalNetworkData(document.RootElement); - return new ExternalNetworkResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ExternalNetworkData.DeserializeExternalNetworkData(document.RootElement); - return new ExternalNetworkResource(_client, data); - } - } -} 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/IPCommunityOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPCommunityOperationSource.cs deleted file mode 100644 index cea6fb38f12f8..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPCommunityOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class IPCommunityOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal IPCommunityOperationSource(ArmClient client) - { - _client = client; - } - - IPCommunityResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = IPCommunityData.DeserializeIPCommunityData(document.RootElement); - return new IPCommunityResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = IPCommunityData.DeserializeIPCommunityData(document.RootElement); - return new IPCommunityResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPPrefixOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPPrefixOperationSource.cs deleted file mode 100644 index 5ffe403b98c88..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPPrefixOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class IPPrefixOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal IPPrefixOperationSource(ArmClient client) - { - _client = client; - } - - IPPrefixResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = IPPrefixData.DeserializeIPPrefixData(document.RootElement); - return new IPPrefixResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = IPPrefixData.DeserializeIPPrefixData(document.RootElement); - return new IPPrefixResource(_client, data); - } - } -} 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/InternalNetworkOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternalNetworkOperationSource.cs deleted file mode 100644 index 655d70278e539..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/InternalNetworkOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class InternalNetworkOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal InternalNetworkOperationSource(ArmClient client) - { - _client = client; - } - - InternalNetworkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = InternalNetworkData.DeserializeInternalNetworkData(document.RootElement); - return new InternalNetworkResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = InternalNetworkData.DeserializeInternalNetworkData(document.RootElement); - return new InternalNetworkResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L2IsolationDomainOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L2IsolationDomainOperationSource.cs deleted file mode 100644 index eb0aeacbe47c3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L2IsolationDomainOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class L2IsolationDomainOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal L2IsolationDomainOperationSource(ArmClient client) - { - _client = client; - } - - L2IsolationDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = L2IsolationDomainData.DeserializeL2IsolationDomainData(document.RootElement); - return new L2IsolationDomainResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = L2IsolationDomainData.DeserializeL2IsolationDomainData(document.RootElement); - return new L2IsolationDomainResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L3IsolationDomainOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L3IsolationDomainOperationSource.cs deleted file mode 100644 index 300470e404de3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/L3IsolationDomainOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class L3IsolationDomainOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal L3IsolationDomainOperationSource(ArmClient client) - { - _client = client; - } - - L3IsolationDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = L3IsolationDomainData.DeserializeL3IsolationDomainData(document.RootElement); - return new L3IsolationDomainResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = L3IsolationDomainData.DeserializeL3IsolationDomainData(document.RootElement); - return new L3IsolationDomainResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkDeviceInterfaceOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkDeviceInterfaceOperationSource.cs new file mode 100644 index 0000000000000..a8053f90a7b0d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkDeviceInterfaceOperationSource.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 NetworkDeviceInterfaceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkDeviceInterfaceOperationSource(ArmClient client) + { + _client = client; + } + + NetworkDeviceInterfaceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(document.RootElement); + return new NetworkDeviceInterfaceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(document.RootElement); + return new NetworkDeviceInterfaceResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricAccessControlListOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricAccessControlListOperationSource.cs new file mode 100644 index 0000000000000..32fb35ccc2ef7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricAccessControlListOperationSource.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 NetworkFabricAccessControlListOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricAccessControlListOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricAccessControlListResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(document.RootElement); + return new NetworkFabricAccessControlListResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(document.RootElement); + return new NetworkFabricAccessControlListResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricExternalNetworkOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricExternalNetworkOperationSource.cs new file mode 100644 index 0000000000000..8ba5223ffd03b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricExternalNetworkOperationSource.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 NetworkFabricExternalNetworkOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricExternalNetworkOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricExternalNetworkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(document.RootElement); + return new NetworkFabricExternalNetworkResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(document.RootElement); + return new NetworkFabricExternalNetworkResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPCommunityOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPCommunityOperationSource.cs new file mode 100644 index 0000000000000..aa5f29123c799 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPCommunityOperationSource.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 NetworkFabricIPCommunityOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricIPCommunityOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricIPCommunityResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(document.RootElement); + return new NetworkFabricIPCommunityResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(document.RootElement); + return new NetworkFabricIPCommunityResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPExtendedCommunityOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPExtendedCommunityOperationSource.cs new file mode 100644 index 0000000000000..b86d8f77e839b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPExtendedCommunityOperationSource.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 NetworkFabricIPExtendedCommunityOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricIPExtendedCommunityOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricIPExtendedCommunityResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(document.RootElement); + return new NetworkFabricIPExtendedCommunityResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(document.RootElement); + return new NetworkFabricIPExtendedCommunityResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPPrefixOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPPrefixOperationSource.cs new file mode 100644 index 0000000000000..1472db0788f30 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricIPPrefixOperationSource.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 NetworkFabricIPPrefixOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricIPPrefixOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricIPPrefixResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(document.RootElement); + return new NetworkFabricIPPrefixResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(document.RootElement); + return new NetworkFabricIPPrefixResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternalNetworkOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternalNetworkOperationSource.cs new file mode 100644 index 0000000000000..ed2fa5478bd45 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternalNetworkOperationSource.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 NetworkFabricInternalNetworkOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricInternalNetworkOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricInternalNetworkResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(document.RootElement); + return new NetworkFabricInternalNetworkResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(document.RootElement); + return new NetworkFabricInternalNetworkResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayOperationSource.cs new file mode 100644 index 0000000000000..530922968d3f5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayOperationSource.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 NetworkFabricInternetGatewayOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricInternetGatewayOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricInternetGatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(document.RootElement); + return new NetworkFabricInternetGatewayResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(document.RootElement); + return new NetworkFabricInternetGatewayResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayRuleOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayRuleOperationSource.cs new file mode 100644 index 0000000000000..cb7f2cff3a3f4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricInternetGatewayRuleOperationSource.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 NetworkFabricInternetGatewayRuleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricInternetGatewayRuleOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricInternetGatewayRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(document.RootElement); + return new NetworkFabricInternetGatewayRuleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(document.RootElement); + return new NetworkFabricInternetGatewayRuleResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL2IsolationDomainOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL2IsolationDomainOperationSource.cs new file mode 100644 index 0000000000000..ae2a2a946ae0a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL2IsolationDomainOperationSource.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 NetworkFabricL2IsolationDomainOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricL2IsolationDomainOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricL2IsolationDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(document.RootElement); + return new NetworkFabricL2IsolationDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(document.RootElement); + return new NetworkFabricL2IsolationDomainResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL3IsolationDomainOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL3IsolationDomainOperationSource.cs new file mode 100644 index 0000000000000..e3d377b4d61d3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricL3IsolationDomainOperationSource.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 NetworkFabricL3IsolationDomainOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricL3IsolationDomainOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricL3IsolationDomainResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(document.RootElement); + return new NetworkFabricL3IsolationDomainResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(document.RootElement); + return new NetworkFabricL3IsolationDomainResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricNeighborGroupOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricNeighborGroupOperationSource.cs new file mode 100644 index 0000000000000..ab4232c660e85 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricNeighborGroupOperationSource.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 NetworkFabricNeighborGroupOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricNeighborGroupOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricNeighborGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(document.RootElement); + return new NetworkFabricNeighborGroupResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(document.RootElement); + return new NetworkFabricNeighborGroupResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricRoutePolicyOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricRoutePolicyOperationSource.cs new file mode 100644 index 0000000000000..72f49b9629ffe --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkFabricRoutePolicyOperationSource.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 NetworkFabricRoutePolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkFabricRoutePolicyOperationSource(ArmClient client) + { + _client = client; + } + + NetworkFabricRoutePolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(document.RootElement); + return new NetworkFabricRoutePolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(document.RootElement); + return new NetworkFabricRoutePolicyResource(_client, data); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkInterfaceOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkInterfaceOperationSource.cs deleted file mode 100644 index 4616c415eac1a..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkInterfaceOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class NetworkInterfaceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal NetworkInterfaceOperationSource(ArmClient client) - { - _client = client; - } - - NetworkInterfaceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = NetworkInterfaceData.DeserializeNetworkInterfaceData(document.RootElement); - return new NetworkInterfaceResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = NetworkInterfaceData.DeserializeNetworkInterfaceData(document.RootElement); - return new NetworkInterfaceResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPExtendedCommunityOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs similarity index 50% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPExtendedCommunityOperationSource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs index 13bf03a3a1b2d..4b3c17b31a81a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/IPExtendedCommunityOperationSource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/NetworkPacketBrokerOperationSource.cs @@ -14,27 +14,27 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - internal class IPExtendedCommunityOperationSource : IOperationSource + internal class NetworkPacketBrokerOperationSource : IOperationSource { private readonly ArmClient _client; - internal IPExtendedCommunityOperationSource(ArmClient client) + internal NetworkPacketBrokerOperationSource(ArmClient client) { _client = client; } - IPExtendedCommunityResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + NetworkPacketBrokerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); - var data = IPExtendedCommunityData.DeserializeIPExtendedCommunityData(document.RootElement); - return new IPExtendedCommunityResource(_client, data); + var data = NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(document.RootElement); + return new NetworkPacketBrokerResource(_client, data); } - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = IPExtendedCommunityData.DeserializeIPExtendedCommunityData(document.RootElement); - return new IPExtendedCommunityResource(_client, data); + 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/RoutePolicyOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/RoutePolicyOperationSource.cs deleted file mode 100644 index f773324ebc4a3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/RoutePolicyOperationSource.cs +++ /dev/null @@ -1,40 +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; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - internal class RoutePolicyOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal RoutePolicyOperationSource(ArmClient client) - { - _client = client; - } - - RoutePolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RoutePolicyData.DeserializeRoutePolicyData(document.RootElement); - return new RoutePolicyResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RoutePolicyData.DeserializeRoutePolicyData(document.RootElement); - return new RoutePolicyResource(_client, data); - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/StateUpdateCommonPostActionResultOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/StateUpdateCommonPostActionResultOperationSource.cs new file mode 100644 index 0000000000000..ed5e14425cb4c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/StateUpdateCommonPostActionResultOperationSource.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 StateUpdateCommonPostActionResultOperationSource : IOperationSource + { + StateUpdateCommonPostActionResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return StateUpdateCommonPostActionResult.DeserializeStateUpdateCommonPostActionResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return StateUpdateCommonPostActionResult.DeserializeStateUpdateCommonPostActionResult(document.RootElement); + } + } +} 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/ValidateConfigurationResultOperationSource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResultOperationSource.cs new file mode 100644 index 0000000000000..946ae4b94fc40 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/LongRunningOperation/ValidateConfigurationResultOperationSource.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 ValidateConfigurationResultOperationSource : IOperationSource + { + ValidateConfigurationResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return ValidateConfigurationResult.DeserializeValidateConfigurationResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return ValidateConfigurationResult.DeserializeValidateConfigurationResult(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/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..743b9cc88793d --- /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 needs to be matched. + /// List of IP fragment packets that needs to be matched. + /// List of IP Lengths that needs to be matched. + /// List of TTL [Time To Live] values that needs to be matched. + /// List of DSCP Markings that needs 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 needs to be matched. + public IList EtherTypes { get; } + /// List of IP fragment packets that needs to be matched. + public IList Fragments { get; } + /// List of IP Lengths that needs to be matched. + public IList IPLengths { get; } + /// List of TTL [Time To Live] values that needs to be matched. + public IList TtlValues { get; } + /// List of DSCP Markings that needs 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..e6a628b0d2be6 --- /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 NetworkFabricIPAddressType(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..de5394cb2a416 --- /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, NetworkFabricIPAddressType? 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 NetworkFabricIPAddressType? 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.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs deleted file mode 100644 index cee9c38a384fe..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.cs +++ /dev/null @@ -1,32 +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 -{ - /// The AccessControlList patch resource definition. - public partial class AccessControlListPatch - { - /// Initializes a new instance of AccessControlListPatch. - public AccessControlListPatch() - { - Tags = new ChangeTrackingDictionary(); - Conditions = new ChangeTrackingList(); - } - - /// Resource tags. - public IDictionary Tags { 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..61c0e1a1fe319 --- /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 NetworkFabricPortType(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..d7bb3389aeb42 --- /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 : NetworkFabricPortCondition + { + /// 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 to be matched. + /// List of protocol flags that needs to be matched. + internal AccessControlListPortCondition(NetworkFabricPortType? portType, Layer4Protocol layer4Protocol, IList ports, IList portGroupNames, IList flags) : base(portType, layer4Protocol, ports, portGroupNames) + { + Flags = flags; + } + + /// List of protocol flags that needs to be matched. + public IList Flags { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.Serialization.cs new file mode 100644 index 0000000000000..be38b2be09464 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.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 AccessControlListsResult + { + internal static AccessControlListsResult DeserializeAccessControlListsResult(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(NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new AccessControlListsResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.cs similarity index 54% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.cs index dbf97fd31b79d..5308f4711b5d0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of AccessControlLists. - internal partial class AccessControlListsListResult + /// List of Access Control Lists. + internal partial class AccessControlListsResult { - /// Initializes a new instance of AccessControlListsListResult. - internal AccessControlListsListResult() + /// Initializes a new instance of AccessControlListsResult. + internal AccessControlListsResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of AccessControlListsListResult. - /// List of AccessControlList resources. + /// Initializes a new instance of AccessControlListsResult. + /// List of Access Control List resources. /// Url to follow for getting next page of resources. - internal AccessControlListsListResult(IReadOnlyList value, string nextLink) + internal AccessControlListsResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of AccessControlList resources. - public IReadOnlyList Value { get; } + /// 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/ActionIPCommunityProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs index 6e310a9f9a86f..7f7c387da806f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPCommunityProperties.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { @@ -18,19 +19,19 @@ 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 + public IList DeleteIPCommunityIds { get { @@ -40,10 +41,10 @@ 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 + public IList SetIPCommunityIds { get { 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..5a4ee5306d078 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ActionIPExtendedCommunityProperties.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { @@ -18,19 +19,19 @@ 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 + public IList DeleteIPExtendedCommunityIds { get { @@ -40,10 +41,10 @@ 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 + public IList SetIPExtendedCommunityIds { get { 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/AdministrativeEnableState.cs similarity index 55% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeEnableState.cs index 068e174f2de92..5a25fee319717 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeState.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AdministrativeEnableState.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Administrative state. - public readonly partial struct AdministrativeState : IEquatable + public readonly partial struct AdministrativeEnableState : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public AdministrativeState(string value) + public AdministrativeEnableState(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -26,21 +26,21 @@ public AdministrativeState(string value) private const string DisableValue = "Disable"; /// Enable. - public static AdministrativeState Enable { get; } = new AdministrativeState(EnableValue); + public static AdministrativeEnableState Enable { get; } = new AdministrativeEnableState(EnableValue); /// Disable. - public static AdministrativeState Disable { get; } = new AdministrativeState(DisableValue); - /// 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. - public static bool operator !=(AdministrativeState left, AdministrativeState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AdministrativeState(string value) => new AdministrativeState(value); + public static AdministrativeEnableState Disable { get; } = new AdministrativeEnableState(DisableValue); + /// Determines if two values are the same. + public static bool operator ==(AdministrativeEnableState left, AdministrativeEnableState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdministrativeEnableState left, AdministrativeEnableState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AdministrativeEnableState(string value) => new AdministrativeEnableState(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdministrativeState other && Equals(other); + public override bool Equals(object obj) => obj is AdministrativeEnableState other && Equals(other); /// - public bool Equals(AdministrativeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(AdministrativeEnableState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] 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/AnnotationResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.Serialization.cs similarity index 80% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResource.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.Serialization.cs index c2beddb121c46..c456613260ef0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class AnnotationResource : IUtf8JsonSerializable + public partial class AnnotationResourceProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,7 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AnnotationResource DeserializeAnnotationResource(JsonElement element) + internal static AnnotationResourceProperties DeserializeAnnotationResourceProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -38,7 +38,7 @@ internal static AnnotationResource DeserializeAnnotationResource(JsonElement ele continue; } } - return new AnnotationResource(annotation.Value); + return new AnnotationResourceProperties(annotation.Value); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.cs similarity index 76% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.cs index b541d8aaf17fe..df300d1619cd0 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AnnotationResourceProperties.cs @@ -8,16 +8,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Switch configuration entries require a description to discern between configuration groups. - public partial class AnnotationResource + public partial class AnnotationResourceProperties { - /// Initializes a new instance of AnnotationResource. - public AnnotationResource() + /// Initializes a new instance of AnnotationResourceProperties. + public AnnotationResourceProperties() { } - /// Initializes a new instance of AnnotationResource. + /// Initializes a new instance of AnnotationResourceProperties. /// Switch configuration description. - internal AnnotationResource(string annotation) + internal AnnotationResourceProperties(string annotation) { Annotation = annotation; } 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..c55fa483fd233 --- /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..b6159ab4de026 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); @@ -93,11 +96,11 @@ internal static BgpConfiguration DeserializeBgpConfiguration(JsonElement element return null; } Optional bfdConfiguration = default; - Optional defaultRouteOriginate = default; + 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; @@ -120,7 +123,7 @@ internal static BgpConfiguration DeserializeBgpConfiguration(JsonElement element { continue; } - defaultRouteOriginate = new BooleanEnumProperty(property.Value.GetString()); + defaultRouteOriginate = new NetworkFabricBooleanValue(property.Value.GetString()); continue; } if (property.NameEquals("allowAS"u8)) @@ -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..dd5108987c97a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BgpConfiguration.cs @@ -11,13 +11,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// BGP configuration properties. - public partial class BgpConfiguration : AnnotationResource + public partial class BgpConfiguration : AnnotationResourceProperties { /// 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(); @@ -30,20 +28,20 @@ public BgpConfiguration(int peerASN) /// 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. - /// BGP Ipv4 ListenRange. - /// BGP Ipv6 ListenRange. - /// List with stringified ipv4NeighborAddresses. + /// 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 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, NetworkFabricBooleanValue? defaultRouteOriginate, int? allowAS, AllowASOverride? allowASOverride, long? fabricAsn, long? peerAsn, IList ipv4ListenRangePrefixes, IList ipv6ListenRangePrefixes, IList ipv4NeighborAddress, IList ipv6NeighborAddress) : base(annotation) { BfdConfiguration = bfdConfiguration; DefaultRouteOriginate = defaultRouteOriginate; AllowAS = allowAS; AllowASOverride = allowASOverride; - FabricASN = fabricASN; - PeerASN = peerASN; + FabricAsn = fabricAsn; + PeerAsn = peerAsn; IPv4ListenRangePrefixes = ipv4ListenRangePrefixes; IPv6ListenRangePrefixes = ipv6ListenRangePrefixes; IPv4NeighborAddress = ipv4NeighborAddress; @@ -53,20 +51,20 @@ internal BgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, /// BFD configuration properties. public BfdConfiguration BfdConfiguration { get; set; } /// Originate a defaultRoute. Ex: "True" | "False". - public BooleanEnumProperty? DefaultRouteOriginate { get; set; } + public NetworkFabricBooleanValue? DefaultRouteOriginate { get; set; } /// 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. public int? AllowAS { get; set; } /// 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/BooleanEnumProperty.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BooleanEnumProperty.cs deleted file mode 100644 index 0a984465181be..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/BooleanEnumProperty.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 -{ - /// Boolean Enum. Example- True/False. - public readonly partial struct BooleanEnumProperty : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BooleanEnumProperty(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TrueValue = "True"; - private const string FalseValue = "False"; - - /// True. - public static BooleanEnumProperty True { get; } = new BooleanEnumProperty(TrueValue); - /// False. - public static BooleanEnumProperty False { get; } = new BooleanEnumProperty(FalseValue); - /// Determines if two values are the same. - public static bool operator ==(BooleanEnumProperty left, BooleanEnumProperty right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BooleanEnumProperty left, BooleanEnumProperty right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BooleanEnumProperty(string value) => new BooleanEnumProperty(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BooleanEnumProperty other && Equals(other); - /// - public bool Equals(BooleanEnumProperty 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/CommonDynamicMatchConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/CommonDynamicMatchConfiguration.Serialization.cs new file mode 100644 index 0000000000000..da78c61e04b89 --- /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(MatchConfigurationIPGroupProperties.DeserializeMatchConfigurationIPGroupProperties(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..4d42f94fc5c60 --- /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 group. + 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 group. + 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/Condition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.cs deleted file mode 100644 index 7ed68ce4b1bd6..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Condition.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 -{ - /// Specify prefix-list bounds. - public readonly partial struct Condition : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Condition(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EqualToValue = "EqualTo"; - private const string GreaterThanOrEqualToValue = "GreaterThanOrEqualTo"; - private const string LesserThanOrEqualToValue = "LesserThanOrEqualTo"; - - /// EqualTo. - public static Condition EqualTo { get; } = new Condition(EqualToValue); - /// GreaterThanOrEqualTo. - public static Condition GreaterThanOrEqualTo { get; } = new Condition(GreaterThanOrEqualToValue); - /// LesserThanOrEqualTo. - public static Condition LesserThanOrEqualTo { get; } = new Condition(LesserThanOrEqualToValue); - /// 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. - public static bool operator !=(Condition left, Condition right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Condition(string value) => new Condition(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Condition other && Equals(other); - /// - public bool Equals(Condition 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/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/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..dcd79aba9f4c7 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 + public partial class ConnectedSubnet : AnnotationResourceProperties { /// 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/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/DeviceUpdateCommonPostActionResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.Serialization.cs new file mode 100644 index 0000000000000..4215325b4be73 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.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 DeviceUpdateCommonPostActionResult + { + internal static DeviceUpdateCommonPostActionResult DeserializeDeviceUpdateCommonPostActionResult(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 NetworkFabricConfigurationState(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 DeviceUpdateCommonPostActionResult(error.Value, Optional.ToNullable(configurationState), Optional.ToList(successfulDevices), Optional.ToList(failedDevices)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.cs new file mode 100644 index 0000000000000..0a4afc1055164 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceUpdateCommonPostActionResult.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 DeviceUpdateCommonPostActionResult : NetworkFabricErrorResult + { + /// Initializes a new instance of DeviceUpdateCommonPostActionResult. + internal DeviceUpdateCommonPostActionResult() + { + SuccessfulDevices = new ChangeTrackingList(); + FailedDevices = new ChangeTrackingList(); + } + + /// Initializes a new instance of DeviceUpdateCommonPostActionResult. + /// 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 DeviceUpdateCommonPostActionResult(ResponseError error, NetworkFabricConfigurationState? configurationState, IReadOnlyList successfulDevices, IReadOnlyList failedDevices) : base(error) + { + ConfigurationState = configurationState; + SuccessfulDevices = successfulDevices; + FailedDevices = failedDevices; + } + + /// Gets the configuration state. + public NetworkFabricConfigurationState? 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/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/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/ExternalNetworkPropertiesOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.Serialization.cs similarity index 70% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.Serialization.cs index f9c68c5cf19e4..d960b9cbe4de1 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class ExternalNetworkPropertiesOptionAProperties : IUtf8JsonSerializable + public partial class ExternalNetworkOptionAProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -25,16 +25,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("vlanId"u8); writer.WriteNumberValue(VlanId.Value); } - if (Optional.IsDefined(PeerASN)) + if (Optional.IsDefined(PeerAsn)) { writer.WritePropertyName("peerASN"u8); - writer.WriteNumberValue(PeerASN.Value); + 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); @@ -58,7 +68,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ExternalNetworkPropertiesOptionAProperties DeserializeExternalNetworkPropertiesOptionAProperties(JsonElement element) + internal static ExternalNetworkOptionAProperties DeserializeExternalNetworkOptionAProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -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 ExternalNetworkOptionAProperties(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/ExternalNetworkOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.cs new file mode 100644 index 0000000000000..9b4ddcaf8fac9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkOptionAProperties.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 ExternalNetworkOptionAProperties : Layer3IPPrefixProperties + { + /// Initializes a new instance of ExternalNetworkOptionAProperties. + public ExternalNetworkOptionAProperties() + { + } + + /// Initializes a new instance of ExternalNetworkOptionAProperties. + /// 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 ExternalNetworkOptionAProperties(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/ExternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs deleted file mode 100644 index 43e77f4855523..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ManagedNetworkFabric.Models -{ - /// The ExternalNetwork patch resource definition. - public partial class ExternalNetworkPatch - { - /// Initializes a new instance of ExternalNetworkPatch. - public ExternalNetworkPatch() - { - } - - /// Switch configuration description. - public string Annotation { get; set; } - /// Peering option list. - public PeeringOption? PeeringOption { get; set; } - /// option B properties object. - public OptionBProperties 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; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.Serialization.cs new file mode 100644 index 0000000000000..b7daff0554b41 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.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 ExternalNetworkPatchOptionAProperties : 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 ExternalNetworkPatchOptionAProperties DeserializeExternalNetworkPatchOptionAProperties(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 ExternalNetworkPatchOptionAProperties(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/ExternalNetworkPatchOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.cs new file mode 100644 index 0000000000000..289b2d7755105 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatchOptionAProperties.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 ExternalNetworkPatchOptionAProperties : Layer3IPPrefixProperties + { + /// Initializes a new instance of ExternalNetworkPatchOptionAProperties. + public ExternalNetworkPatchOptionAProperties() + { + } + + /// Initializes a new instance of ExternalNetworkPatchOptionAProperties. + /// 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 ExternalNetworkPatchOptionAProperties(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.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.cs deleted file mode 100644 index 130227252c1e2..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPropertiesOptionAProperties.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 -{ - /// option A properties object. - public partial class ExternalNetworkPropertiesOptionAProperties : Layer3OptionAProperties - { - /// Initializes a new instance of ExternalNetworkPropertiesOptionAProperties. - 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. - /// 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) - { - } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.Serialization.cs index 9b02f77ad5449..dde75fe4421a5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.Serialization.cs @@ -20,7 +20,7 @@ internal static ExternalNetworksList DeserializeExternalNetworksList(JsonElement { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static ExternalNetworksList DeserializeExternalNetworksList(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ExternalNetworkData.DeserializeExternalNetworkData(item)); + array.Add(NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(item)); } value = array; continue; 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..089253fcec5b2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworksList.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of ExternalNetworks. + /// List of External Networks. internal partial class ExternalNetworksList { /// Initializes a new instance of ExternalNetworksList. internal ExternalNetworksList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal ExternalNetworksList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of ExternalNetworks resources. - public IReadOnlyList Value { get; } + /// 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/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/IPCommunitiesListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.Serialization.cs index d3f357ec36dd4..05851f2f80766 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static IPCommunitiesListResult DeserializeIPCommunitiesListResult(JsonE { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static IPCommunitiesListResult DeserializeIPCommunitiesListResult(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(IPCommunityData.DeserializeIPCommunityData(item)); + array.Add(NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(item)); } value = array; continue; 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..6018a5e31718d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunitiesListResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IPCommunities. + /// List of IP Communities. internal partial class IPCommunitiesListResult { /// Initializes a new instance of IPCommunitiesListResult. internal IPCommunitiesListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal IPCommunitiesListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of IpCommunity resources. - public IReadOnlyList Value { get; } + /// 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..2e139b4f6bdf3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityAddOperationProperties.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { @@ -18,16 +19,16 @@ 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 + public IList AddIPCommunityIds { get { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.Serialization.cs index 07e4347860e99..a1cabd15e6f75 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.Serialization.cs @@ -22,6 +22,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in IPCommunityIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -35,7 +40,7 @@ internal static IPCommunityIdList DeserializeIPCommunityIdList(JsonElement eleme { return null; } - Optional> ipCommunityIds = default; + Optional> ipCommunityIds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("ipCommunityIds"u8)) @@ -44,10 +49,17 @@ internal static IPCommunityIdList DeserializeIPCommunityIdList(JsonElement eleme { 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())); + } } ipCommunityIds = array; continue; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.cs index b511641143704..cca143e698680 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityIdList.cs @@ -16,17 +16,17 @@ public partial class IPCommunityIdList /// Initializes a new instance of IPCommunityIdList. public IPCommunityIdList() { - IPCommunityIds = new ChangeTrackingList(); + IPCommunityIds = new ChangeTrackingList(); } /// Initializes a new instance of IPCommunityIdList. /// List of IP Community resource IDs. - internal IPCommunityIdList(IList ipCommunityIds) + internal IPCommunityIdList(IList ipCommunityIds) { IPCommunityIds = ipCommunityIds; } /// List of IP Community resource IDs. - public IList IPCommunityIds { get; } + public IList IPCommunityIds { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs deleted file mode 100644 index b8d9a1841bfe1..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.cs +++ /dev/null @@ -1,25 +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 -{ - /// The IPCommunity patch resource definition. - public partial class IPCommunityPatch - { - /// Initializes a new instance of IPCommunityPatch. - public IPCommunityPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { 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..53eb155a3372b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityAddOperationProperties.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.ManagedNetworkFabric.Models { @@ -18,16 +19,16 @@ 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 + public IList AddIPExtendedCommunityIds { get { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.Serialization.cs index 5a8f1923c18e3..1aeb79f98cc26 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.Serialization.cs @@ -22,6 +22,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in IPExtendedCommunityIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -35,7 +40,7 @@ internal static IPExtendedCommunityIdList DeserializeIPExtendedCommunityIdList(J { return null; } - Optional> ipExtendedCommunityIds = default; + Optional> ipExtendedCommunityIds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("ipExtendedCommunityIds"u8)) @@ -44,10 +49,17 @@ internal static IPExtendedCommunityIdList DeserializeIPExtendedCommunityIdList(J { 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())); + } } ipExtendedCommunityIds = array; continue; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.cs index b12aaf712f100..20a50963df8dc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityIdList.cs @@ -16,17 +16,17 @@ internal partial class IPExtendedCommunityIdList /// Initializes a new instance of IPExtendedCommunityIdList. public IPExtendedCommunityIdList() { - IPExtendedCommunityIds = new ChangeTrackingList(); + IPExtendedCommunityIds = new ChangeTrackingList(); } /// Initializes a new instance of IPExtendedCommunityIdList. /// List of IP Extended Community resource IDs. - internal IPExtendedCommunityIdList(IList ipExtendedCommunityIds) + internal IPExtendedCommunityIdList(IList ipExtendedCommunityIds) { IPExtendedCommunityIds = ipExtendedCommunityIds; } /// List of IP Extended Community resource IDs. - public IList IPExtendedCommunityIds { get; } + public IList IPExtendedCommunityIds { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.Serialization.cs index 84bf25917be62..b8e859a4f521a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static IPExtendedCommunityListResult DeserializeIPExtendedCommunityList { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static IPExtendedCommunityListResult DeserializeIPExtendedCommunityList { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(IPExtendedCommunityData.DeserializeIPExtendedCommunityData(item)); + array.Add(NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(item)); } value = array; continue; 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..e1b44daaf7836 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityListResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IpExtendedCommunities. + /// List of IP Extended Communities. internal partial class IPExtendedCommunityListResult { /// Initializes a new instance of IPExtendedCommunityListResult. internal IPExtendedCommunityListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal IPExtendedCommunityListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of IpExtendedCommunities resources. - public IReadOnlyList Value { get; } + /// 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.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs deleted file mode 100644 index 9fa7f46b9291e..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.cs +++ /dev/null @@ -1,25 +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 -{ - /// The IpExtendedCommunities patch resource definition. - public partial class IPExtendedCommunityPatch - { - /// Initializes a new instance of IPExtendedCommunityPatch. - public IPExtendedCommunityPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { get; } - } -} 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/IPMatchCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchCondition.Serialization.cs new file mode 100644 index 0000000000000..ce798c3eed51e --- /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 IPMatchConditionPrefixType(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..8c201ce3d7b53 --- /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. + /// IP Prefix Type. + /// The list of IP Prefixes. + /// The List of IP Group Names that need to be matched. + internal IPMatchCondition(SourceDestinationType? sourceDestinationType, IPMatchConditionPrefixType? prefixType, IList ipPrefixValues, IList ipGroupNames) + { + SourceDestinationType = sourceDestinationType; + PrefixType = prefixType; + IPPrefixValues = ipPrefixValues; + IPGroupNames = ipGroupNames; + } + + /// IP Address type. + public SourceDestinationType? SourceDestinationType { get; set; } + /// IP Prefix Type. + public IPMatchConditionPrefixType? PrefixType { get; set; } + /// The list of IP Prefixes. + 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/IPMatchConditionPrefixType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchConditionPrefixType.cs new file mode 100644 index 0000000000000..d0373c2b166b0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPMatchConditionPrefixType.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. + public readonly partial struct IPMatchConditionPrefixType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IPMatchConditionPrefixType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrefixValue = "Prefix"; + private const string LongestPrefixValue = "LongestPrefix"; + + /// Prefix. + public static IPMatchConditionPrefixType Prefix { get; } = new IPMatchConditionPrefixType(PrefixValue); + /// LongestPrefix. + public static IPMatchConditionPrefixType LongestPrefix { get; } = new IPMatchConditionPrefixType(LongestPrefixValue); + /// Determines if two values are the same. + public static bool operator ==(IPMatchConditionPrefixType left, IPMatchConditionPrefixType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IPMatchConditionPrefixType left, IPMatchConditionPrefixType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IPMatchConditionPrefixType(string value) => new IPMatchConditionPrefixType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IPMatchConditionPrefixType other && Equals(other); + /// + public bool Equals(IPMatchConditionPrefixType 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/IPPrefixPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs deleted file mode 100644 index 68894e55ca883..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.cs +++ /dev/null @@ -1,25 +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 -{ - /// The IPPrefix patch resource definition. - public partial class IPPrefixPatch - { - /// Initializes a new instance of IPPrefixPatch. - public IPPrefixPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { 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 74% 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..b0cf9271302de 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) { @@ -43,8 +43,8 @@ internal static IPPrefixPropertiesIPPrefixRulesItem DeserializeIPPrefixPropertie CommunityActionType action = default; long sequenceNumber = default; string networkPrefix = default; - Optional condition = default; - Optional subnetMaskLength = default; + Optional condition = default; + Optional subnetMaskLength = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("action"u8)) @@ -68,20 +68,16 @@ internal static IPPrefixPropertiesIPPrefixRulesItem DeserializeIPPrefixPropertie { continue; } - condition = new Condition(property.Value.GetString()); + condition = new IPPrefixRuleCondition(property.Value.GetString()); continue; } 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 75% 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..aff13f54b59eb 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, IPPrefixRuleCondition? condition, string subnetMaskLength) { Action = action; SequenceNumber = sequenceNumber; @@ -49,8 +49,8 @@ internal IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType action, long se /// Network Prefix specifying IPv4/IPv6 packets to be permitted or denied. Example: 1.1.1.0/24 | 3FFE:FFFF:0:CD30::/126. 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; } + public IPPrefixRuleCondition? 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 string SubnetMaskLength { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRuleCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRuleCondition.cs new file mode 100644 index 0000000000000..78394134beeed --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixRuleCondition.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 +{ + /// Specify prefix-list bounds. + public readonly partial struct IPPrefixRuleCondition : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IPPrefixRuleCondition(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EqualToValue = "EqualTo"; + private const string GreaterThanOrEqualToValue = "GreaterThanOrEqualTo"; + private const string LesserThanOrEqualToValue = "LesserThanOrEqualTo"; + private const string RangeValue = "Range"; + + /// EqualTo. + public static IPPrefixRuleCondition EqualTo { get; } = new IPPrefixRuleCondition(EqualToValue); + /// GreaterThanOrEqualTo. + public static IPPrefixRuleCondition GreaterThanOrEqualTo { get; } = new IPPrefixRuleCondition(GreaterThanOrEqualToValue); + /// LesserThanOrEqualTo. + public static IPPrefixRuleCondition LesserThanOrEqualTo { get; } = new IPPrefixRuleCondition(LesserThanOrEqualToValue); + /// Range. + public static IPPrefixRuleCondition Range { get; } = new IPPrefixRuleCondition(RangeValue); + /// Determines if two values are the same. + public static bool operator ==(IPPrefixRuleCondition left, IPPrefixRuleCondition right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IPPrefixRuleCondition left, IPPrefixRuleCondition right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IPPrefixRuleCondition(string value) => new IPPrefixRuleCondition(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IPPrefixRuleCondition other && Equals(other); + /// + public bool Equals(IPPrefixRuleCondition 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/IPPrefixesListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.Serialization.cs index fd4e6411af45a..fab7f006d8606 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static IPPrefixesListResult DeserializeIPPrefixesListResult(JsonElement { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static IPPrefixesListResult DeserializeIPPrefixesListResult(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(IPPrefixData.DeserializeIPPrefixData(item)); + array.Add(NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(item)); } value = array; continue; 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..123e621d3e788 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixesListResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of IpPrefixes. + /// List of IP Prefixes. internal partial class IPPrefixesListResult { /// Initializes a new instance of IPPrefixesListResult. internal IPPrefixesListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal IPPrefixesListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of IPPrefix resources. - public IReadOnlyList Value { get; } + /// 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/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/InterfaceType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceType.cs deleted file mode 100644 index 2ebf86a4a635c..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InterfaceType.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 Interface Type. Example: Management/Data. - public readonly partial struct InterfaceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InterfaceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ManagementValue = "Management"; - private const string DataValue = "Data"; - - /// Management. - public static InterfaceType Management { get; } = new InterfaceType(ManagementValue); - /// Data. - public static InterfaceType Data { get; } = new InterfaceType(DataValue); - /// Determines if two values are the same. - public static bool operator ==(InterfaceType left, InterfaceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InterfaceType left, InterfaceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator InterfaceType(string value) => new InterfaceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InterfaceType other && Equals(other); - /// - public bool Equals(InterfaceType 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/InternalNetworkBgpConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.Serialization.cs new file mode 100644 index 0000000000000..c95cfef570191 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.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 InternalNetworkBgpConfiguration : 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 InternalNetworkBgpConfiguration DeserializeInternalNetworkBgpConfiguration(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 NetworkFabricBooleanValue(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 InternalNetworkBgpConfiguration(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/InternalNetworkBgpConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.cs new file mode 100644 index 0000000000000..bc080f81ba2ca --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkBgpConfiguration.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 InternalNetworkBgpConfiguration : BgpConfiguration + { + /// Initializes a new instance of InternalNetworkBgpConfiguration. + public InternalNetworkBgpConfiguration() + { + } + + /// Initializes a new instance of InternalNetworkBgpConfiguration. + /// 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 InternalNetworkBgpConfiguration(string annotation, BfdConfiguration bfdConfiguration, NetworkFabricBooleanValue? 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/InternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs deleted file mode 100644 index 4c0d2b45039c3..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.cs +++ /dev/null @@ -1,40 +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 -{ - /// The InternalNetwork patch resource definition. - public partial class InternalNetworkPatch - { - /// Initializes a new instance of InternalNetworkPatch. - public InternalNetworkPatch() - { - ConnectedIPv4Subnets = new ChangeTrackingList(); - ConnectedIPv6Subnets = new ChangeTrackingList(); - } - - /// 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. - public IList ConnectedIPv4Subnets { get; } - /// List with object 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; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.Serialization.cs new file mode 100644 index 0000000000000..9946e14a80e6b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.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 InternalNetworkStaticRouteConfiguration : 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 InternalNetworkStaticRouteConfiguration DeserializeInternalNetworkStaticRouteConfiguration(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 StaticRouteConfigurationExtension(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 InternalNetworkStaticRouteConfiguration(bfdConfiguration.Value, Optional.ToList(ipv4Routes), Optional.ToList(ipv6Routes), Optional.ToNullable(extension)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.cs new file mode 100644 index 0000000000000..b6c1e736eb22f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkStaticRouteConfiguration.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 InternalNetworkStaticRouteConfiguration : StaticRouteConfiguration + { + /// Initializes a new instance of InternalNetworkStaticRouteConfiguration. + public InternalNetworkStaticRouteConfiguration() + { + } + + /// Initializes a new instance of InternalNetworkStaticRouteConfiguration. + /// BFD configuration properties. + /// List of IPv4 Routes. + /// List of IPv6 Routes. + /// Extension. Example: NoExtension | NPB. + internal InternalNetworkStaticRouteConfiguration(BfdConfiguration bfdConfiguration, IList ipv4Routes, IList ipv6Routes, StaticRouteConfigurationExtension? extension) : base(bfdConfiguration, ipv4Routes, ipv6Routes) + { + Extension = extension; + } + + /// Extension. Example: NoExtension | NPB. + public StaticRouteConfigurationExtension? Extension { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.Serialization.cs index 4f700a6e9d65a..8e395020d1a33 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.Serialization.cs @@ -20,7 +20,7 @@ internal static InternalNetworksList DeserializeInternalNetworksList(JsonElement { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static InternalNetworksList DeserializeInternalNetworksList(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(InternalNetworkData.DeserializeInternalNetworkData(item)); + array.Add(NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(item)); } value = array; continue; 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..b93fbf7160bd9 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworksList.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of InternalNetworks. + /// List of Internal Networks. internal partial class InternalNetworksList { /// Initializes a new instance of InternalNetworksList. internal InternalNetworksList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal InternalNetworksList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of InternalNetworks resources. - public IReadOnlyList Value { get; } + /// 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/InternetGatewayRuleAction.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleAction.cs new file mode 100644 index 0000000000000..a7bed7e1cab19 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRuleAction.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 InternetGatewayRuleAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InternetGatewayRuleAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static InternetGatewayRuleAction Allow { get; } = new InternetGatewayRuleAction(AllowValue); + /// Deny. + public static InternetGatewayRuleAction Deny { get; } = new InternetGatewayRuleAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(InternetGatewayRuleAction left, InternetGatewayRuleAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InternetGatewayRuleAction left, InternetGatewayRuleAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator InternetGatewayRuleAction(string value) => new InternetGatewayRuleAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternetGatewayRuleAction other && Equals(other); + /// + public bool Equals(InternetGatewayRuleAction 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/InternetGatewayRules.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.Serialization.cs new file mode 100644 index 0000000000000..96d107f60c20b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.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 InternetGatewayRules : 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 InternetGatewayRules DeserializeInternetGatewayRules(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternetGatewayRuleAction action = default; + IList addressList = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = new InternetGatewayRuleAction(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 InternetGatewayRules(action, addressList); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.cs new file mode 100644 index 0000000000000..d9e14fcf30891 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRules.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 InternetGatewayRules + { + /// Initializes a new instance of InternetGatewayRules. + /// Specify action. + /// List of Addresses to be allowed or denied. + /// is null. + public InternetGatewayRules(InternetGatewayRuleAction action, IEnumerable addressList) + { + Argument.AssertNotNull(addressList, nameof(addressList)); + + Action = action; + AddressList = addressList.ToList(); + } + + /// Initializes a new instance of InternetGatewayRules. + /// Specify action. + /// List of Addresses to be allowed or denied. + internal InternetGatewayRules(InternetGatewayRuleAction action, IList addressList) + { + Action = action; + AddressList = addressList; + } + + /// Specify action. + public InternetGatewayRuleAction 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/InternetGatewayRulesListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayRulesListResult.Serialization.cs new file mode 100644 index 0000000000000..3f5acc3955dda --- /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(NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(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..d3063f74e77d3 --- /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/InternetGatewayType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayType.cs new file mode 100644 index 0000000000000..b7f85fe1464e1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewayType.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 InternetGatewayType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InternetGatewayType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfrastructureValue = "Infrastructure"; + private const string WorkloadValue = "Workload"; + + /// Infrastructure. + public static InternetGatewayType Infrastructure { get; } = new InternetGatewayType(InfrastructureValue); + /// Workload. + public static InternetGatewayType Workload { get; } = new InternetGatewayType(WorkloadValue); + /// Determines if two values are the same. + public static bool operator ==(InternetGatewayType left, InternetGatewayType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InternetGatewayType left, InternetGatewayType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator InternetGatewayType(string value) => new InternetGatewayType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InternetGatewayType other && Equals(other); + /// + public bool Equals(InternetGatewayType 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/InternetGatewaysListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternetGatewaysListResult.Serialization.cs new file mode 100644 index 0000000000000..44431a7b919c6 --- /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(NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(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..12b090dd7e5cc --- /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/IsolationDomainEncapsulationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainEncapsulationType.cs new file mode 100644 index 0000000000000..6e6b28e9fb8eb --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IsolationDomainEncapsulationType.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 IsolationDomainEncapsulationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IsolationDomainEncapsulationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string GreValue = "GRE"; + + /// None. + public static IsolationDomainEncapsulationType None { get; } = new IsolationDomainEncapsulationType(NoneValue); + /// GRE. + public static IsolationDomainEncapsulationType Gre { get; } = new IsolationDomainEncapsulationType(GreValue); + /// Determines if two values are the same. + public static bool operator ==(IsolationDomainEncapsulationType left, IsolationDomainEncapsulationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IsolationDomainEncapsulationType left, IsolationDomainEncapsulationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IsolationDomainEncapsulationType(string value) => new IsolationDomainEncapsulationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsolationDomainEncapsulationType other && Equals(other); + /// + public bool Equals(IsolationDomainEncapsulationType 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..74a0c9aa830df --- /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 IsolationDomainEncapsulationType(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..3d6c888a5d9b9 --- /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(IsolationDomainEncapsulationType? encapsulation, IList neighborGroupIds) + { + Encapsulation = encapsulation; + NeighborGroupIds = neighborGroupIds; + } + + /// Type of encapsulation. + public IsolationDomainEncapsulationType? Encapsulation { get; set; } + /// List of Neighbor Group IDs. + public IList NeighborGroupIds { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs deleted file mode 100644 index 154d91d49ba58..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.cs +++ /dev/null @@ -1,29 +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 -{ - /// The L2IsolationDomain patch resource definition. - public partial class L2IsolationDomainPatch - { - /// 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. - public int? Mtu { get; set; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.Serialization.cs index 9483df53685d5..dddf1797aaa61 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static L2IsolationDomainsListResult DeserializeL2IsolationDomainsListRe { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static L2IsolationDomainsListResult DeserializeL2IsolationDomainsListRe { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(L2IsolationDomainData.DeserializeL2IsolationDomainData(item)); + array.Add(NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(item)); } value = array; continue; 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..43205dd03df00 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainsListResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of L2IsolationDomains. + /// List of L2 Isolation Domains. internal partial class L2IsolationDomainsListResult { /// Initializes a new instance of L2IsolationDomainsListResult. internal L2IsolationDomainsListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal L2IsolationDomainsListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// Displays list of L2IsolationDomain resources. - public IReadOnlyList Value { get; } + /// 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/L3IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs deleted file mode 100644 index 2b5c25bc91067..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.cs +++ /dev/null @@ -1,35 +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 -{ - /// The L3IsolationDomain patch resource definition. - public partial class L3IsolationDomainPatch - { - /// Initializes a new instance of L3IsolationDomainPatch. - public L3IsolationDomainPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { get; } - /// 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. - public AggregateRouteConfiguration AggregateRouteConfiguration { get; set; } - /// L3 Isolation Domain description. - public string Description { get; set; } - /// Connected Subnet RoutePolicy. - public L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy 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.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.Serialization.cs index cdaa31c665b5e..b742f514a367e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static L3IsolationDomainsListResult DeserializeL3IsolationDomainsListRe { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static L3IsolationDomainsListResult DeserializeL3IsolationDomainsListRe { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(L3IsolationDomainData.DeserializeL3IsolationDomainData(item)); + array.Add(NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(item)); } value = array; continue; 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..8560dc88e720d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainsListResult.cs @@ -11,26 +11,26 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// List of L3IsolationDomains. + /// List of L3 Isolation Domains. internal partial class L3IsolationDomainsListResult { /// Initializes a new instance of L3IsolationDomainsListResult. internal L3IsolationDomainsListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// 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) + internal L3IsolationDomainsListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// List of L3IsolationDomain resources. - public IReadOnlyList Value { get; } + /// 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..b636ebba8e2f8 --- /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/MatchConfigurationIPGroupProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.Serialization.cs new file mode 100644 index 0000000000000..afa4dca2d70d6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.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 MatchConfigurationIPGroupProperties : 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 MatchConfigurationIPGroupProperties DeserializeMatchConfigurationIPGroupProperties(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 NetworkFabricIPAddressType(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 MatchConfigurationIPGroupProperties(name.Value, Optional.ToNullable(ipAddressType), Optional.ToList(ipPrefixes)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.cs new file mode 100644 index 0000000000000..429e796d1e96d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/MatchConfigurationIPGroupProperties.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 MatchConfigurationIPGroupProperties + { + /// Initializes a new instance of MatchConfigurationIPGroupProperties. + public MatchConfigurationIPGroupProperties() + { + IPPrefixes = new ChangeTrackingList(); + } + + /// Initializes a new instance of MatchConfigurationIPGroupProperties. + /// IP Group name. + /// IP Address type. + /// List of IP Prefixes. + internal MatchConfigurationIPGroupProperties(string name, NetworkFabricIPAddressType? ipAddressType, IList ipPrefixes) + { + Name = name; + IPAddressType = ipAddressType; + IPPrefixes = ipPrefixes; + } + + /// IP Group name. + public string Name { get; set; } + /// IP Address type. + public NetworkFabricIPAddressType? IPAddressType { get; set; } + /// List of IP Prefixes. + public IList IPPrefixes { get; } + } +} 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..97bd4e915d369 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 NetworkFabricConfigurationState(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..bc434fe942061 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, NetworkFabricConfigurationState? 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 NetworkFabricConfigurationState? ConfigurationState { get; } } } 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..b625ff598a285 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Net; +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) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.ToString()); + } + 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()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(IPAddress.Parse(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..6606a11d920b5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupDestination.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Net; +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/NeighborGroupsListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NeighborGroupsListResult.Serialization.cs new file mode 100644 index 0000000000000..d66c330a36296 --- /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(NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(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..cd0c6f1bf409d --- /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/NetworkDeviceAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceAdministrativeState.cs new file mode 100644 index 0000000000000..a7cac18a8a2e8 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceAdministrativeState.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 NetworkDeviceAdministrativeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkDeviceAdministrativeState(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 NetworkDeviceAdministrativeState Rma { get; } = new NetworkDeviceAdministrativeState(RmaValue); + /// Resync. + public static NetworkDeviceAdministrativeState Resync { get; } = new NetworkDeviceAdministrativeState(ResyncValue); + /// GracefulQuarantine. + public static NetworkDeviceAdministrativeState GracefulQuarantine { get; } = new NetworkDeviceAdministrativeState(GracefulQuarantineValue); + /// Quarantine. + public static NetworkDeviceAdministrativeState Quarantine { get; } = new NetworkDeviceAdministrativeState(QuarantineValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkDeviceAdministrativeState left, NetworkDeviceAdministrativeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkDeviceAdministrativeState left, NetworkDeviceAdministrativeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkDeviceAdministrativeState(string value) => new NetworkDeviceAdministrativeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkDeviceAdministrativeState other && Equals(other); + /// + public bool Equals(NetworkDeviceAdministrativeState 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/NetworkDeviceData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceData.Serialization.cs index 5a629bd5b435a..9d8e6a48b9c30 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 @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using System.Net; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -53,11 +54,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 +75,13 @@ internal static NetworkDeviceData DeserializeNetworkDeviceData(JsonElement eleme Optional serialNumber = default; Optional version = default; Optional networkDeviceSku = default; - Optional networkDeviceRole = default; - Optional provisioningState = default; - Optional networkRackId = 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 +167,39 @@ 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)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkRackId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("managementIpv4Address"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managementIPv4Address = IPAddress.Parse(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 NetworkFabricConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -176,19 +208,23 @@ internal static NetworkDeviceData DeserializeNetworkDeviceData(JsonElement eleme { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(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 NetworkFabricAdministrativeState(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/NetworkInterfaceData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceData.Serialization.cs similarity index 77% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceData.Serialization.cs index 1bee966a4e033..2668a72b1317f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfaceData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Net; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -12,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class NetworkInterfaceData : IUtf8JsonSerializable + public partial class NetworkDeviceInterfaceData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -28,7 +29,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static NetworkInterfaceData DeserializeNetworkInterfaceData(JsonElement element) + internal static NetworkDeviceInterfaceData DeserializeNetworkDeviceInterfaceData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -40,12 +41,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 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,53 +92,57 @@ internal static NetworkInterfaceData DeserializeNetworkInterfaceData(JsonElement physicalIdentifier = property0.Value.GetString(); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("connectedTo"u8)) + { + connectedTo = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("interfaceType"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + interfaceType = new NetworkDeviceInterfaceType(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("ipv4Address"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + ipv4Address = IPAddress.Parse(property0.Value.GetString()); continue; } - if (property0.NameEquals("connectedTo"u8)) + if (property0.NameEquals("ipv6Address"u8)) { - connectedTo = property0.Value.GetString(); + ipv6Address = property0.Value.GetString(); continue; } - if (property0.NameEquals("interfaceType"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - interfaceType = new InterfaceType(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("ipv4Address"u8)) - { - ipv4Address = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("ipv6Address"u8)) + if (property0.NameEquals("administrativeState"u8)) { - ipv6Address = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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 NetworkDeviceInterfaceData(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/NetworkInterfacePatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.Serialization.cs similarity index 90% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacePatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.Serialization.cs index a92048ef7d210..024c8d98612ec 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacePatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class NetworkInterfacePatch : IUtf8JsonSerializable + public partial class NetworkDeviceInterfacePatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacePatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.cs similarity index 69% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacePatch.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.cs index b776ff673f4da..7f82dfb5da9a9 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacePatch.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacePatch.cs @@ -8,10 +8,10 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// The NetworkInterfacePatch resource definition. - public partial class NetworkInterfacePatch + public partial class NetworkDeviceInterfacePatch { - /// Initializes a new instance of NetworkInterfacePatch. - public NetworkInterfacePatch() + /// Initializes a new instance of NetworkDeviceInterfacePatch. + public NetworkDeviceInterfacePatch() { } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.Serialization.cs similarity index 88% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.Serialization.cs index 171a932699f77..3ced03908ca70 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class DeviceInterfaceProperties : IUtf8JsonSerializable + public partial class NetworkDeviceInterfaceProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -39,7 +39,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static DeviceInterfaceProperties DeserializeDeviceInterfaceProperties(JsonElement element) + internal static NetworkDeviceInterfaceProperties DeserializeNetworkDeviceInterfaceProperties(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -75,7 +75,7 @@ internal static DeviceInterfaceProperties DeserializeDeviceInterfaceProperties(J continue; } } - return new DeviceInterfaceProperties(identifier.Value, interfaceType.Value, Optional.ToList(supportedConnectorTypes)); + return new NetworkDeviceInterfaceProperties(identifier.Value, interfaceType.Value, Optional.ToList(supportedConnectorTypes)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.cs similarity index 73% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.cs index c487768eb240c..c3719a59203d8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/DeviceInterfaceProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceProperties.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Network device interface properties. - public partial class DeviceInterfaceProperties + public partial class NetworkDeviceInterfaceProperties { - /// Initializes a new instance of DeviceInterfaceProperties. - public DeviceInterfaceProperties() + /// Initializes a new instance of NetworkDeviceInterfaceProperties. + public NetworkDeviceInterfaceProperties() { SupportedConnectorTypes = new ChangeTrackingList(); } - /// Initializes a new instance of DeviceInterfaceProperties. + /// Initializes a new instance of NetworkDeviceInterfaceProperties. /// Interface identifier. Example: HundredGigE0/0. /// Interface type. /// List of supported connector types. - internal DeviceInterfaceProperties(string identifier, string interfaceType, IList supportedConnectorTypes) + internal NetworkDeviceInterfaceProperties(string identifier, string interfaceType, IList supportedConnectorTypes) { Identifier = identifier; InterfaceType = interfaceType; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceType.cs new file mode 100644 index 0000000000000..09584d09f3906 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfaceType.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 +{ + /// The Interface Type. Example: Management/Data. + public readonly partial struct NetworkDeviceInterfaceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkDeviceInterfaceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagementValue = "Management"; + private const string DataValue = "Data"; + + /// Management. + public static NetworkDeviceInterfaceType Management { get; } = new NetworkDeviceInterfaceType(ManagementValue); + /// Data. + public static NetworkDeviceInterfaceType Data { get; } = new NetworkDeviceInterfaceType(DataValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkDeviceInterfaceType left, NetworkDeviceInterfaceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkDeviceInterfaceType left, NetworkDeviceInterfaceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkDeviceInterfaceType(string value) => new NetworkDeviceInterfaceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkDeviceInterfaceType other && Equals(other); + /// + public bool Equals(NetworkDeviceInterfaceType 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/NetworkDeviceInterfacesList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.Serialization.cs new file mode 100644 index 0000000000000..616a77d083780 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.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 NetworkDeviceInterfacesList + { + internal static NetworkDeviceInterfacesList DeserializeNetworkDeviceInterfacesList(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(NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new NetworkDeviceInterfacesList(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacesList.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.cs similarity index 60% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacesList.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.cs index 8e77dee7dfd34..798e18d1cc543 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacesList.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceInterfacesList.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// List of NetworkInterfaces. - internal partial class NetworkInterfacesList + internal partial class NetworkDeviceInterfacesList { - /// Initializes a new instance of NetworkInterfacesList. - internal NetworkInterfacesList() + /// Initializes a new instance of NetworkDeviceInterfacesList. + internal NetworkDeviceInterfacesList() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of NetworkInterfacesList. + /// Initializes a new instance of NetworkDeviceInterfacesList. /// List of NetworkInterfaces resources. /// Url to follow for getting next page of resources. - internal NetworkInterfacesList(IReadOnlyList value, string nextLink) + internal NetworkDeviceInterfacesList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// List of NetworkInterfaces resources. - public IReadOnlyList Value { get; } + 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/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/UpdatePowerCycleProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.Serialization.cs similarity index 60% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.Serialization.cs index f0fe5d3e001be..cac86cb9dd17e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdatePowerCycleProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.Serialization.cs @@ -10,15 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class UpdatePowerCycleProperties : IUtf8JsonSerializable + public partial class NetworkDeviceRebootContent : 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/NetworkDeviceRebootContent.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.cs new file mode 100644 index 0000000000000..ff52bbd8375e1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootContent.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 NetworkDeviceRebootContent + { + /// Initializes a new instance of NetworkDeviceRebootContent. + public NetworkDeviceRebootContent() + { + } + + /// Type of reboot to be performed. Example: GracefulRebootWithZTP. + public NetworkDeviceRebootType? RebootType { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootType.cs new file mode 100644 index 0000000000000..895c8f757401f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRebootType.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 NetworkDeviceRebootType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkDeviceRebootType(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 NetworkDeviceRebootType GracefulRebootWithZtp { get; } = new NetworkDeviceRebootType(GracefulRebootWithZtpValue); + /// GracefulRebootWithoutZTP. + public static NetworkDeviceRebootType GracefulRebootWithoutZtp { get; } = new NetworkDeviceRebootType(GracefulRebootWithoutZtpValue); + /// UngracefulRebootWithZTP. + public static NetworkDeviceRebootType UngracefulRebootWithZtp { get; } = new NetworkDeviceRebootType(UngracefulRebootWithZtpValue); + /// UngracefulRebootWithoutZTP. + public static NetworkDeviceRebootType UngracefulRebootWithoutZtp { get; } = new NetworkDeviceRebootType(UngracefulRebootWithoutZtpValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkDeviceRebootType left, NetworkDeviceRebootType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkDeviceRebootType left, NetworkDeviceRebootType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkDeviceRebootType(string value) => new NetworkDeviceRebootType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkDeviceRebootType other && Equals(other); + /// + public bool Equals(NetworkDeviceRebootType 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 51% 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..eba6fafcbdbd8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleType.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRole.cs @@ -10,46 +10,46 @@ 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)); } private const string CEValue = "CE"; private const string ToRValue = "ToR"; - private const string NPBValue = "NPB"; + private const string NpbValue = "NPB"; private const string TSValue = "TS"; 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/NetworkDeviceRoleName.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleName.cs index c2205a4bcb371..8acc61b701e56 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleName.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkDeviceRoleName.cs @@ -24,7 +24,7 @@ public NetworkDeviceRoleName(string value) private const string CEValue = "CE"; private const string ToRValue = "ToR"; - private const string NPBValue = "NPB"; + private const string NpbValue = "NPB"; private const string TSValue = "TS"; private const string ManagementValue = "Management"; @@ -33,7 +33,7 @@ public NetworkDeviceRoleName(string value) /// ToR. public static NetworkDeviceRoleName ToR { get; } = new NetworkDeviceRoleName(ToRValue); /// NPB. - public static NetworkDeviceRoleName NPB { get; } = new NetworkDeviceRoleName(NPBValue); + public static NetworkDeviceRoleName Npb { get; } = new NetworkDeviceRoleName(NpbValue); /// TS. public static NetworkDeviceRoleName TS { get; } = new NetworkDeviceRoleName(TSValue); /// Management. 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..15e51b858b8f2 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,10 +74,9 @@ 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; + Optional> interfaces = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -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) @@ -171,10 +156,10 @@ internal static NetworkDeviceSkuData DeserializeNetworkDeviceSkuData(JsonElement { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(DeviceInterfaceProperties.DeserializeDeviceInterfaceProperties(item)); + array.Add(NetworkDeviceInterfaceProperties.DeserializeNetworkDeviceInterfaceProperties(item)); } interfaces = array; continue; @@ -185,14 +170,14 @@ internal static NetworkDeviceSkuData DeserializeNetworkDeviceSkuData(JsonElement { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } } 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/NetworkFabricAccessControlListData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListData.Serialization.cs new file mode 100644 index 0000000000000..c01740219f2cc --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListData.Serialization.cs @@ -0,0 +1,245 @@ +// 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 NetworkFabricAccessControlListData : 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(AclsUri)) + { + writer.WritePropertyName("aclsUrl"u8); + writer.WriteStringValue(AclsUri.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(); + } + + internal static NetworkFabricAccessControlListData DeserializeNetworkFabricAccessControlListData(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 aclsUrl = 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)) + { + 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 NetworkFabricConfigurationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("aclsUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aclsUrl = 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(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(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; + } + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkFabricAccessControlListData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, Optional.ToNullable(configurationType), aclsUrl.Value, 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/NetworkFabricAccessControlListPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.Serialization.cs new file mode 100644 index 0000000000000..75c9900459545 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.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 NetworkFabricAccessControlListPatch : 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(ConfigurationType)) + { + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.Value.ToString()); + } + if (Optional.IsDefined(AclsUri)) + { + writer.WritePropertyName("aclsUrl"u8); + writer.WriteStringValue(AclsUri.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(Annotation)) + { + writer.WritePropertyName("annotation"u8); + writer.WriteStringValue(Annotation); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.cs new file mode 100644 index 0000000000000..fb239f6711037 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAccessControlListPatch.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 Access Control Lists patch resource definition. + public partial class NetworkFabricAccessControlListPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricAccessControlListPatch. + public NetworkFabricAccessControlListPatch() + { + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); + } + + /// Input method to configure Access Control List. + public NetworkFabricConfigurationType? ConfigurationType { get; set; } + /// Access Control List file URL. + public Uri AclsUri { 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; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAdministrativeState.cs new file mode 100644 index 0000000000000..519475b551824 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricAdministrativeState.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 +{ + /// State defined to represent administrative actions or post actions on a particular resource. + public readonly partial struct NetworkFabricAdministrativeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricAdministrativeState(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 NetworkFabricAdministrativeState Enabled { get; } = new NetworkFabricAdministrativeState(EnabledValue); + /// Disabled. + public static NetworkFabricAdministrativeState Disabled { get; } = new NetworkFabricAdministrativeState(DisabledValue); + /// MAT. + public static NetworkFabricAdministrativeState Mat { get; } = new NetworkFabricAdministrativeState(MatValue); + /// RMA. + public static NetworkFabricAdministrativeState Rma { get; } = new NetworkFabricAdministrativeState(RmaValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricAdministrativeState left, NetworkFabricAdministrativeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricAdministrativeState left, NetworkFabricAdministrativeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricAdministrativeState(string value) => new NetworkFabricAdministrativeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricAdministrativeState other && Equals(other); + /// + public bool Equals(NetworkFabricAdministrativeState 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/NetworkFabricBooleanValue.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricBooleanValue.cs new file mode 100644 index 0000000000000..ee39863f5f2ea --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricBooleanValue.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 +{ + /// Boolean Enum. Example- True/False. + public readonly partial struct NetworkFabricBooleanValue : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricBooleanValue(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// True. + public static NetworkFabricBooleanValue True { get; } = new NetworkFabricBooleanValue(TrueValue); + /// False. + public static NetworkFabricBooleanValue False { get; } = new NetworkFabricBooleanValue(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricBooleanValue left, NetworkFabricBooleanValue right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricBooleanValue left, NetworkFabricBooleanValue right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricBooleanValue(string value) => new NetworkFabricBooleanValue(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricBooleanValue other && Equals(other); + /// + public bool Equals(NetworkFabricBooleanValue 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/NetworkFabricConfigurationState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationState.cs new file mode 100644 index 0000000000000..3bf1b8098ff25 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationState.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 NetworkFabricConfigurationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricConfigurationState(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 NetworkFabricConfigurationState Succeeded { get; } = new NetworkFabricConfigurationState(SucceededValue); + /// Failed. + public static NetworkFabricConfigurationState Failed { get; } = new NetworkFabricConfigurationState(FailedValue); + /// Rejected. + public static NetworkFabricConfigurationState Rejected { get; } = new NetworkFabricConfigurationState(RejectedValue); + /// Accepted. + public static NetworkFabricConfigurationState Accepted { get; } = new NetworkFabricConfigurationState(AcceptedValue); + /// Provisioned. + public static NetworkFabricConfigurationState Provisioned { get; } = new NetworkFabricConfigurationState(ProvisionedValue); + /// ErrorProvisioning. + public static NetworkFabricConfigurationState ErrorProvisioning { get; } = new NetworkFabricConfigurationState(ErrorProvisioningValue); + /// Deprovisioning. + public static NetworkFabricConfigurationState Deprovisioning { get; } = new NetworkFabricConfigurationState(DeprovisioningValue); + /// Deprovisioned. + public static NetworkFabricConfigurationState Deprovisioned { get; } = new NetworkFabricConfigurationState(DeprovisionedValue); + /// ErrorDeprovisioning. + public static NetworkFabricConfigurationState ErrorDeprovisioning { get; } = new NetworkFabricConfigurationState(ErrorDeprovisioningValue); + /// DeferredControl. + public static NetworkFabricConfigurationState DeferredControl { get; } = new NetworkFabricConfigurationState(DeferredControlValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricConfigurationState left, NetworkFabricConfigurationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricConfigurationState left, NetworkFabricConfigurationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricConfigurationState(string value) => new NetworkFabricConfigurationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricConfigurationState other && Equals(other); + /// + public bool Equals(NetworkFabricConfigurationState 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/NetworkFabricConfigurationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationType.cs new file mode 100644 index 0000000000000..172291e638e29 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricConfigurationType.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 NetworkFabricConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FileValue = "File"; + private const string InlineValue = "Inline"; + + /// File. + public static NetworkFabricConfigurationType File { get; } = new NetworkFabricConfigurationType(FileValue); + /// Inline. + public static NetworkFabricConfigurationType Inline { get; } = new NetworkFabricConfigurationType(InlineValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricConfigurationType left, NetworkFabricConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricConfigurationType left, NetworkFabricConfigurationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricConfigurationType(string value) => new NetworkFabricConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricConfigurationType other && Equals(other); + /// + public bool Equals(NetworkFabricConfigurationType 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/NetworkFabricControllerData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerData.Serialization.cs index a1c5a3dc5a18d..c3b6e6b1e0050 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,15 +102,17 @@ 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 provisioningState = default; + Optional nfcSku = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -194,7 +206,7 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - infrastructureServices = InfrastructureServices.DeserializeInfrastructureServices(property0.Value); + infrastructureServices = NetworkFabricControllerServices.DeserializeNetworkFabricControllerServices(property0.Value); continue; } if (property0.NameEquals("workloadServices"u8)) @@ -203,7 +215,7 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - workloadServices = WorkloadServices.DeserializeWorkloadServices(property0.Value); + workloadServices = NetworkFabricControllerServices.DeserializeNetworkFabricControllerServices(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 NetworkFabricControllerSKU(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -263,14 +312,14 @@ internal static NetworkFabricControllerData DeserializeNetworkFabricControllerDa { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } } 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/NetworkFabricControllerSKU.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerSKU.cs new file mode 100644 index 0000000000000..2e282cbd84bc9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerSKU.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 NetworkFabricControllerSKU : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricControllerSKU(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 NetworkFabricControllerSKU Basic { get; } = new NetworkFabricControllerSKU(BasicValue); + /// Standard. + public static NetworkFabricControllerSKU Standard { get; } = new NetworkFabricControllerSKU(StandardValue); + /// HighPerformance. + public static NetworkFabricControllerSKU HighPerformance { get; } = new NetworkFabricControllerSKU(HighPerformanceValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricControllerSKU left, NetworkFabricControllerSKU right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricControllerSKU left, NetworkFabricControllerSKU right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricControllerSKU(string value) => new NetworkFabricControllerSKU(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricControllerSKU other && Equals(other); + /// + public bool Equals(NetworkFabricControllerSKU 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/InfrastructureServices.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerServices.Serialization.cs similarity index 85% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerServices.Serialization.cs index 46a4b54ba2b1b..99d7ada1c0d97 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerServices.Serialization.cs @@ -11,9 +11,9 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class InfrastructureServices + public partial class NetworkFabricControllerServices { - internal static InfrastructureServices DeserializeInfrastructureServices(JsonElement element) + internal static NetworkFabricControllerServices DeserializeNetworkFabricControllerServices(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -52,7 +52,7 @@ internal static InfrastructureServices DeserializeInfrastructureServices(JsonEle continue; } } - return new InfrastructureServices(Optional.ToList(ipv4AddressSpaces), Optional.ToList(ipv6AddressSpaces)); + return new NetworkFabricControllerServices(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/NetworkFabricControllerServices.cs similarity index 72% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerServices.cs index cc1f4094e948a..e7327443e8a11 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InfrastructureServices.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricControllerServices.cs @@ -10,20 +10,20 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// InfrastructureServices IP ranges. - public partial class InfrastructureServices + /// Network Fabric Controller services. + public partial class NetworkFabricControllerServices { - /// Initializes a new instance of InfrastructureServices. - internal InfrastructureServices() + /// Initializes a new instance of NetworkFabricControllerServices. + internal NetworkFabricControllerServices() { IPv4AddressSpaces = new ChangeTrackingList(); IPv6AddressSpaces = new ChangeTrackingList(); } - /// Initializes a new instance of InfrastructureServices. + /// Initializes a new instance of NetworkFabricControllerServices. /// 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 NetworkFabricControllerServices(IReadOnlyList ipv4AddressSpaces, IReadOnlyList ipv6AddressSpaces) { IPv4AddressSpaces = ipv4AddressSpaces; IPv6AddressSpaces = ipv6AddressSpaces; 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..edd3245dc39ed 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 provisioningState = 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 NetworkFabricConfigurationState(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 NetworkFabricProvisioningState(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 NetworkFabricAdministrativeState(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/NetworkFabricErrorResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.Serialization.cs new file mode 100644 index 0000000000000..b798a178bb19f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + public partial class NetworkFabricErrorResult + { + internal static NetworkFabricErrorResult DeserializeNetworkFabricErrorResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new NetworkFabricErrorResult(error.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.cs new file mode 100644 index 0000000000000..1aa15bb4a802e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricErrorResult.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 NetworkFabricErrorResult + { + /// Initializes a new instance of NetworkFabricErrorResult. + internal NetworkFabricErrorResult() + { + } + + /// Initializes a new instance of NetworkFabricErrorResult. + /// The error object. + internal NetworkFabricErrorResult(ResponseError error) + { + Error = error; + } + + /// The error object. + public ResponseError Error { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkData.Serialization.cs similarity index 60% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkData.Serialization.cs index b645c10e0b23d..c99b4dd4798b3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkData.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; @@ -13,7 +12,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class ExternalNetworkData : IUtf8JsonSerializable + public partial class NetworkFabricExternalNetworkData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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,21 +56,11 @@ 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(); } - internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement element) + internal static NetworkFabricExternalNetworkData DeserializeNetworkFabricExternalNetworkData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -62,15 +71,17 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e ResourceType type = default; Optional systemData = default; Optional annotation = default; - Optional networkToNetworkInterconnectId = default; - Optional> disabledOnResources = default; - Optional administrativeState = default; - Optional provisioningState = default; + Optional importRoutePolicyId = default; + Optional exportRoutePolicyId = default; + Optional importRoutePolicy = default; + Optional exportRoutePolicy = default; + Optional networkToNetworkInterconnectId = default; PeeringOption peeringOption = default; - Optional optionBProperties = default; - Optional optionAProperties = default; - Optional importRoutePolicyId = default; - Optional exportRoutePolicyId = default; + Optional optionBProperties = default; + Optional optionAProperties = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -111,41 +122,49 @@ 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()) + exportRoutePolicyId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("importRoutePolicy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + continue; } - disabledOnResources = array; + importRoutePolicy = ImportRoutePolicy.DeserializeImportRoutePolicy(property0.Value); continue; } - if (property0.NameEquals("administrativeState"u8)) + if (property0.NameEquals("exportRoutePolicy"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - administrativeState = new EnabledDisabledState(property0.Value.GetString()); + exportRoutePolicy = ExportRoutePolicy.DeserializeExportRoutePolicy(property0.Value); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("networkToNetworkInterconnectId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + networkToNetworkInterconnectId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("peeringOption"u8)) @@ -159,7 +178,7 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e { continue; } - optionBProperties = OptionBProperties.DeserializeOptionBProperties(property0.Value); + optionBProperties = L3OptionBProperties.DeserializeL3OptionBProperties(property0.Value); continue; } if (property0.NameEquals("optionAProperties"u8)) @@ -168,24 +187,41 @@ internal static ExternalNetworkData DeserializeExternalNetworkData(JsonElement e { continue; } - optionAProperties = ExternalNetworkPropertiesOptionAProperties.DeserializeExternalNetworkPropertiesOptionAProperties(property0.Value); + optionAProperties = ExternalNetworkOptionAProperties.DeserializeExternalNetworkOptionAProperties(property0.Value); continue; } - if (property0.NameEquals("importRoutePolicyId"u8)) + if (property0.NameEquals("configurationState"u8)) { - importRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); continue; } - if (property0.NameEquals("exportRoutePolicyId"u8)) + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) { - exportRoutePolicyId = property0.Value.GetString(); + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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 NetworkFabricExternalNetworkData(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/NetworkFabricExternalNetworkPatch.Serialization.cs similarity index 78% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkPatch.Serialization.cs index 3bed17092fc17..36a37cb1bac60 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ExternalNetworkPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class ExternalNetworkPatch : IUtf8JsonSerializable + public partial class NetworkFabricExternalNetworkPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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/NetworkFabricExternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkPatch.cs new file mode 100644 index 0000000000000..0df31b8468c41 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricExternalNetworkPatch.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The ExternalNetwork patch resource definition. + public partial class NetworkFabricExternalNetworkPatch + { + /// Initializes a new instance of NetworkFabricExternalNetworkPatch. + public NetworkFabricExternalNetworkPatch() + { + } + + /// 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 L3OptionBProperties OptionBProperties { get; set; } + /// option A properties object. + public ExternalNetworkPatchOptionAProperties OptionAProperties { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPAddressType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPAddressType.cs new file mode 100644 index 0000000000000..268c46b59ec23 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPAddressType.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 NetworkFabricIPAddressType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricIPAddressType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IPv4Value = "IPv4"; + private const string IPv6Value = "IPv6"; + + /// IPv4. + public static NetworkFabricIPAddressType IPv4 { get; } = new NetworkFabricIPAddressType(IPv4Value); + /// IPv6. + public static NetworkFabricIPAddressType IPv6 { get; } = new NetworkFabricIPAddressType(IPv6Value); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricIPAddressType left, NetworkFabricIPAddressType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricIPAddressType left, NetworkFabricIPAddressType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricIPAddressType(string value) => new NetworkFabricIPAddressType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricIPAddressType other && Equals(other); + /// + public bool Equals(NetworkFabricIPAddressType 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/NetworkFabricIPCommunityData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityData.Serialization.cs new file mode 100644 index 0000000000000..19eda280e5973 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityData.Serialization.cs @@ -0,0 +1,179 @@ +// 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 NetworkFabricIPCommunityData : 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.IsCollectionDefined(IPCommunityRules)) + { + writer.WritePropertyName("ipCommunityRules"u8); + writer.WriteStartArray(); + foreach (var item in IPCommunityRules) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static NetworkFabricIPCommunityData DeserializeNetworkFabricIPCommunityData(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> ipCommunityRules = 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("ipCommunityRules"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(IPCommunityRule.DeserializeIPCommunityRule(item)); + } + ipCommunityRules = array; + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkFabricIPCommunityData(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/NetworkFabricIPCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.Serialization.cs new file mode 100644 index 0000000000000..ba9c5a5a3a007 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.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 NetworkFabricIPCommunityPatch : 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.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/NetworkFabricIPCommunityPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.cs new file mode 100644 index 0000000000000..3c40612299bfc --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPCommunityPatch.cs @@ -0,0 +1,25 @@ +// 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 IP Community patch resource definition. + public partial class NetworkFabricIPCommunityPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricIPCommunityPatch. + public NetworkFabricIPCommunityPatch() + { + IPCommunityRules = new ChangeTrackingList(); + } + + /// List of IP Community Rules. + public IList IPCommunityRules { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityData.Serialization.cs similarity index 69% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityData.Serialization.cs index b1d904350cd59..8431725c5b665 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class AccessControlListData : IUtf8JsonSerializable + public partial class NetworkFabricIPExtendedCommunityData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -38,11 +38,9 @@ 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.WritePropertyName("ipExtendedCommunityRules"u8); writer.WriteStartArray(); - foreach (var item in Conditions) + foreach (var item in IPExtendedCommunityRules) { writer.WriteObjectValue(item); } @@ -51,7 +49,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AccessControlListData DeserializeAccessControlListData(JsonElement element) + internal static NetworkFabricIPExtendedCommunityData DeserializeNetworkFabricIPExtendedCommunityData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -64,9 +62,10 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme ResourceType type = default; Optional systemData = default; Optional annotation = default; - AddressFamily addressFamily = default; - IList conditions = default; - Optional provisioningState = default; + IList ipExtendedCommunityRules = default; + Optional configurationState = default; + Optional provisioningState = default; + Optional administrativeState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -126,19 +125,23 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("addressFamily"u8)) + if (property0.NameEquals("ipExtendedCommunityRules"u8)) { - addressFamily = new AddressFamily(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(IPExtendedCommunityRule.DeserializeIPExtendedCommunityRule(item)); + } + ipExtendedCommunityRules = array; continue; } - if (property0.NameEquals("conditions"u8)) + if (property0.NameEquals("configurationState"u8)) { - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(AccessControlListConditionProperties.DeserializeAccessControlListConditionProperties(item)); + continue; } - conditions = array; + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -147,14 +150,23 @@ internal static AccessControlListData DeserializeAccessControlListData(JsonEleme { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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 NetworkFabricIPExtendedCommunityData(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/NetworkFabricIPExtendedCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.Serialization.cs new file mode 100644 index 0000000000000..65aaf3165337d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.Serialization.cs @@ -0,0 +1,50 @@ +// 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 NetworkFabricIPExtendedCommunityPatch : 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.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/NetworkFabricIPExtendedCommunityPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.cs new file mode 100644 index 0000000000000..559e8377cb730 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPExtendedCommunityPatch.cs @@ -0,0 +1,27 @@ +// 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 IP Extended Communities patch resource definition. + public partial class NetworkFabricIPExtendedCommunityPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricIPExtendedCommunityPatch. + public NetworkFabricIPExtendedCommunityPatch() + { + IPExtendedCommunityRules = new ChangeTrackingList(); + } + + /// 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/IPPrefixData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixData.Serialization.cs similarity index 66% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixData.Serialization.cs index 0fe92591b753a..40bcfe3c942e8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class IPPrefixData : IUtf8JsonSerializable + public partial class NetworkFabricIPPrefixData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -38,18 +38,21 @@ 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(); } - internal static IPPrefixData DeserializeIPPrefixData(JsonElement element) + internal static NetworkFabricIPPrefixData DeserializeNetworkFabricIPPrefixData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -62,8 +65,10 @@ internal static IPPrefixData DeserializeIPPrefixData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - IList ipPrefixRules = default; - Optional provisioningState = 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,28 +130,50 @@ 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 NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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 NetworkFabricIPPrefixData(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/NetworkFabricIPPrefixPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.Serialization.cs new file mode 100644 index 0000000000000..263bd689029b3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.Serialization.cs @@ -0,0 +1,50 @@ +// 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 NetworkFabricIPPrefixPatch : 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.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/NetworkFabricIPPrefixPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.cs new file mode 100644 index 0000000000000..7d46ba6f28380 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricIPPrefixPatch.cs @@ -0,0 +1,27 @@ +// 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 IP Prefix patch resource definition. + public partial class NetworkFabricIPPrefixPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricIPPrefixPatch. + public NetworkFabricIPPrefixPatch() + { + IPPrefixRules = new ChangeTrackingList(); + } + + /// 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/InternalNetworkData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkData.Serialization.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkData.Serialization.cs index 213b74b8c36cc..972bf7afed447 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class InternalNetworkData : IUtf8JsonSerializable + public partial class NetworkFabricInternalNetworkData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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,13 +60,53 @@ 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(); } - internal static InternalNetworkData DeserializeInternalNetworkData(JsonElement element) + internal static NetworkFabricInternalNetworkData DeserializeNetworkFabricInternalNetworkData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -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 StaticRouteConfigurationExtension(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 = InternalNetworkBgpConfiguration.DeserializeInternalNetworkBgpConfiguration(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 = InternalNetworkStaticRouteConfiguration.DeserializeInternalNetworkStaticRouteConfiguration(property0.Value); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + continue; } - bfdForStaticRoutesDisabledOnResources = array; + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -277,19 +321,23 @@ internal static InternalNetworkData DeserializeInternalNetworkData(JsonElement e { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(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 NetworkFabricAdministrativeState(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 NetworkFabricInternalNetworkData(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/NetworkFabricInternalNetworkPatch.Serialization.cs similarity index 69% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkPatch.Serialization.cs index 60df815cb8232..8932d78a7b58a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/InternalNetworkPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class InternalNetworkPatch : IUtf8JsonSerializable + public partial class NetworkFabricInternalNetworkPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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/NetworkFabricInternalNetworkPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkPatch.cs new file mode 100644 index 0000000000000..925249a0802d6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternalNetworkPatch.cs @@ -0,0 +1,50 @@ +// 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 InternalNetwork patch resource definition. + public partial class NetworkFabricInternalNetworkPatch + { + /// Initializes a new instance of NetworkFabricInternalNetworkPatch. + public NetworkFabricInternalNetworkPatch() + { + ConnectedIPv4Subnets = new ChangeTrackingList(); + ConnectedIPv6Subnets = new ChangeTrackingList(); + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Maximum transmission unit. Default value is 1500. + public int? Mtu { get; set; } + /// List of Connected IPv4 Subnets. + public IList ConnectedIPv4Subnets { get; } + /// List of connected IPv6 Subnets. + public IList ConnectedIPv6Subnets { 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; } + /// BGP configuration properties. + public BgpConfiguration BgpConfiguration { get; set; } + /// Static Route Configuration properties. + public StaticRouteConfiguration StaticRouteConfiguration { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayData.Serialization.cs new file mode 100644 index 0000000000000..30ca496fe15a1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayData.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Net; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + public partial class NetworkFabricInternetGatewayData : 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 NetworkFabricInternetGatewayData DeserializeNetworkFabricInternetGatewayData(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; + InternetGatewayType 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)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipv4Address = IPAddress.Parse(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 InternetGatewayType(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 NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new NetworkFabricInternetGatewayData(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/IPPrefixPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.Serialization.cs similarity index 65% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.Serialization.cs index 6b523d751bfa6..b605178840738 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPPrefixPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class IPPrefixPatch : IUtf8JsonSerializable + public partial class NetworkFabricInternetGatewayPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,6 +26,14 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } 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/NetworkFabricInternetGatewayPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.cs new file mode 100644 index 0000000000000..3919e6d883fd1 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayPatch.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 NetworkFabricInternetGatewayPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricInternetGatewayPatch. + public NetworkFabricInternetGatewayPatch() + { + } + + /// ARM Resource ID of the Internet Gateway Rule. + public ResourceIdentifier InternetGatewayRuleId { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRuleData.Serialization.cs similarity index 73% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRuleData.Serialization.cs index d459483823188..3f14ce1a48033 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRuleData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class IPExtendedCommunityData : IUtf8JsonSerializable + public partial class NetworkFabricInternetGatewayRuleData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -38,26 +38,13 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(Action)) - { - 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.WritePropertyName("ruleProperties"u8); + writer.WriteObjectValue(RuleProperties); writer.WriteEndObject(); writer.WriteEndObject(); } - internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonElement element) + internal static NetworkFabricInternetGatewayRuleData DeserializeNetworkFabricInternetGatewayRuleData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -70,9 +57,9 @@ internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonE ResourceType type = default; Optional systemData = default; Optional annotation = default; - Optional action = default; - Optional> routeTargets = default; - Optional provisioningState = default; + InternetGatewayRules ruleProperties = default; + Optional provisioningState = default; + Optional> internetGatewayIds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -132,43 +119,46 @@ internal static IPExtendedCommunityData DeserializeIPExtendedCommunityData(JsonE annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("action"u8)) + if (property0.NameEquals("ruleProperties"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - action = new CommunityActionType(property0.Value.GetString()); + ruleProperties = InternetGatewayRules.DeserializeInternetGatewayRules(property0.Value); continue; } - if (property0.NameEquals("routeTargets"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()); - } - routeTargets = array; + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("internetGatewayIds"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + 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())); + } + } + internetGatewayIds = array; 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 NetworkFabricInternetGatewayRuleData(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/IPCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.Serialization.cs similarity index 90% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.Serialization.cs index 6dec980aaeedc..a0357d3d69236 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class IPCommunityPatch : IUtf8JsonSerializable + public partial class NetworkFabricInternetGatewayRulePatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.cs new file mode 100644 index 0000000000000..d78df6eadcbd2 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricInternetGatewayRulePatch.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 NetworkFabricInternetGatewayRulePatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricInternetGatewayRulePatch. + public NetworkFabricInternetGatewayRulePatch() + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainData.Serialization.cs similarity index 75% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainData.Serialization.cs index 8e8ba4658a18f..4b0d2d49c6f7d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class L2IsolationDomainData : IUtf8JsonSerializable + public partial class NetworkFabricL2IsolationDomainData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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); @@ -57,7 +51,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static L2IsolationDomainData DeserializeL2IsolationDomainData(JsonElement element) + internal static NetworkFabricL2IsolationDomainData DeserializeNetworkFabricL2IsolationDomainData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -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 provisioningState = 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 NetworkFabricConfigurationState(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 NetworkFabricProvisioningState(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 NetworkFabricAdministrativeState(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 NetworkFabricL2IsolationDomainData(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.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.Serialization.cs similarity index 93% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.Serialization.cs index 08d62d383a97f..a34cbc8efc019 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L2IsolationDomainPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class L2IsolationDomainPatch : IUtf8JsonSerializable + public partial class NetworkFabricL2IsolationDomainPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.cs new file mode 100644 index 0000000000000..e4d5c5a6f8f46 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL2IsolationDomainPatch.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 L2 Isolation Domain patch resource definition. + public partial class NetworkFabricL2IsolationDomainPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricL2IsolationDomainPatch. + public NetworkFabricL2IsolationDomainPatch() + { + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Maximum transmission unit. Default value is 1500. + public int? Mtu { 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/NetworkFabricL3IsolationDomainData.Serialization.cs similarity index 71% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainData.Serialization.cs index d61ff4e922c3e..2b1aaaa92cb72 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class L3IsolationDomainData : IUtf8JsonSerializable + public partial class NetworkFabricL3IsolationDomainData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -53,26 +53,18 @@ 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(); } - internal static L3IsolationDomainData DeserializeL3IsolationDomainData(JsonElement element) + internal static NetworkFabricL3IsolationDomainData DeserializeNetworkFabricL3IsolationDomainData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -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 provisioningState = 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 NetworkFabricConfigurationState(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 NetworkFabricProvisioningState(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 NetworkFabricAdministrativeState(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 NetworkFabricL3IsolationDomainData(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/NetworkFabricL3IsolationDomainPatch.Serialization.cs similarity index 88% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainPatch.Serialization.cs index d9ac48aa3935d..7bb9922e59d23 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/L3IsolationDomainPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class L3IsolationDomainPatch : IUtf8JsonSerializable + public partial class NetworkFabricL3IsolationDomainPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -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/NetworkFabricL3IsolationDomainPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainPatch.cs new file mode 100644 index 0000000000000..0a96f07125a4b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricL3IsolationDomainPatch.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.ManagedNetworkFabric.Models +{ + /// The L3 Isolation Domain patch resource definition. + public partial class NetworkFabricL3IsolationDomainPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricL3IsolationDomainPatch. + public NetworkFabricL3IsolationDomainPatch() + { + } + + /// 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; } + /// Aggregate route configurations. + public AggregateRouteConfiguration AggregateRouteConfiguration { get; set; } + /// Connected Subnet RoutePolicy. + public ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } + } +} 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/IPCommunityData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupData.Serialization.cs similarity index 70% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupData.Serialization.cs index 978654d129603..042e4b84a6d60 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPCommunityData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class IPCommunityData : IUtf8JsonSerializable + public partial class NetworkFabricNeighborGroupData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -38,36 +38,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(Action)) + if (Optional.IsDefined(Destination)) { - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.Value.ToString()); - } - if (Optional.IsCollectionDefined(WellKnownCommunities)) - { - writer.WritePropertyName("wellKnownCommunities"u8); - writer.WriteStartArray(); - foreach (var item in WellKnownCommunities) - { - 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.WriteEndArray(); + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination); } writer.WriteEndObject(); writer.WriteEndObject(); } - internal static IPCommunityData DeserializeIPCommunityData(JsonElement element) + internal static NetworkFabricNeighborGroupData DeserializeNetworkFabricNeighborGroupData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -80,10 +60,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 provisioningState = default; + Optional destination = default; + Optional> networkTapIds = default; + Optional> networkTapRuleIds = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -143,41 +123,55 @@ internal static IPCommunityData DeserializeIPCommunityData(JsonElement element) annotation = property0.Value.GetString(); continue; } - if (property0.NameEquals("action"u8)) + if (property0.NameEquals("destination"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - action = new CommunityActionType(property0.Value.GetString()); + destination = NeighborGroupDestination.DeserializeNeighborGroupDestination(property0.Value); continue; } - if (property0.NameEquals("wellKnownCommunities"u8)) + if (property0.NameEquals("networkTapIds"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(new WellKnownCommunity(item.GetString())); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } - wellKnownCommunities = array; + networkTapIds = array; continue; } - if (property0.NameEquals("communityMembers"u8)) + if (property0.NameEquals("networkTapRuleIds"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(item.GetString()); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } } - communityMembers = array; + networkTapRuleIds = array; continue; } if (property0.NameEquals("provisioningState"u8)) @@ -186,14 +180,14 @@ internal static IPCommunityData DeserializeIPCommunityData(JsonElement element) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(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 NetworkFabricNeighborGroupData(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/NetworkFabricNeighborGroupPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.Serialization.cs new file mode 100644 index 0000000000000..7867edcbfb7f6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.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 NetworkFabricNeighborGroupPatch : 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/NetworkFabricNeighborGroupPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.cs new file mode 100644 index 0000000000000..54d76c2e80863 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricNeighborGroupPatch.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 NetworkFabricNeighborGroupPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricNeighborGroupPatch. + public NetworkFabricNeighborGroupPatch() + { + } + + /// 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/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..4a37440087af6 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..b347171c2937f 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/NetworkFabricPortCondition.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.Serialization.cs new file mode 100644 index 0000000000000..8c0e8e028f1cd --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.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 NetworkFabricPortCondition : 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 NetworkFabricPortCondition DeserializeNetworkFabricPortCondition(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 NetworkFabricPortType(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 NetworkFabricPortCondition(Optional.ToNullable(portType), layer4Protocol, Optional.ToList(ports), Optional.ToList(portGroupNames)); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.cs new file mode 100644 index 0000000000000..362ffd26f6e18 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortCondition.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 NetworkFabricPortCondition + { + /// Initializes a new instance of NetworkFabricPortCondition. + /// Layer4 protocol type that needs to be matched. + public NetworkFabricPortCondition(Layer4Protocol layer4Protocol) + { + Layer4Protocol = layer4Protocol; + Ports = new ChangeTrackingList(); + PortGroupNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricPortCondition. + /// 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 to be matched. + internal NetworkFabricPortCondition(NetworkFabricPortType? portType, Layer4Protocol layer4Protocol, IList ports, IList portGroupNames) + { + PortType = portType; + Layer4Protocol = layer4Protocol; + Ports = ports; + PortGroupNames = portGroupNames; + } + + /// Port type that needs to be matched. + public NetworkFabricPortType? 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 to be matched. + public IList PortGroupNames { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortType.cs new file mode 100644 index 0000000000000..48a3e7f72bc3e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricPortType.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 NetworkFabricPortType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricPortType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SourcePortValue = "SourcePort"; + private const string DestinationPortValue = "DestinationPort"; + + /// SourcePort. + public static NetworkFabricPortType SourcePort { get; } = new NetworkFabricPortType(SourcePortValue); + /// DestinationPort. + public static NetworkFabricPortType DestinationPort { get; } = new NetworkFabricPortType(DestinationPortValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricPortType left, NetworkFabricPortType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricPortType left, NetworkFabricPortType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricPortType(string value) => new NetworkFabricPortType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricPortType other && Equals(other); + /// + public bool Equals(NetworkFabricPortType 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/NetworkFabricProvisioningState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricProvisioningState.cs new file mode 100644 index 0000000000000..1684cbf4f5958 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricProvisioningState.cs @@ -0,0 +1,63 @@ +// 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 current provisioning state. + public readonly partial struct NetworkFabricProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricProvisioningState(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 DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Accepted. + public static NetworkFabricProvisioningState Accepted { get; } = new NetworkFabricProvisioningState(AcceptedValue); + /// Succeeded. + public static NetworkFabricProvisioningState Succeeded { get; } = new NetworkFabricProvisioningState(SucceededValue); + /// Updating. + public static NetworkFabricProvisioningState Updating { get; } = new NetworkFabricProvisioningState(UpdatingValue); + /// Deleting. + public static NetworkFabricProvisioningState Deleting { get; } = new NetworkFabricProvisioningState(DeletingValue); + /// Failed. + public static NetworkFabricProvisioningState Failed { get; } = new NetworkFabricProvisioningState(FailedValue); + /// Canceled. + public static NetworkFabricProvisioningState Canceled { get; } = new NetworkFabricProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricProvisioningState left, NetworkFabricProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricProvisioningState left, NetworkFabricProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricProvisioningState(string value) => new NetworkFabricProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricProvisioningState other && Equals(other); + /// + public bool Equals(NetworkFabricProvisioningState 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/NetworkFabricRoutePolicyData.Serialization.cs similarity index 59% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyData.Serialization.cs index 8d5d471ad2c90..76dba87b8312e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyData.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { - public partial class RoutePolicyData : IUtf8JsonSerializable + public partial class NetworkFabricRoutePolicyData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -38,18 +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.IsCollectionDefined(Statements)) { - writer.WriteObjectValue(item); + 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(); } - internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) + internal static NetworkFabricRoutePolicyData DeserializeNetworkFabricRoutePolicyData(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -62,8 +72,12 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) ResourceType type = default; Optional systemData = default; Optional annotation = default; - IList statements = default; - Optional provisioningState = 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)) @@ -125,6 +139,10 @@ internal static RoutePolicyData DeserializeRoutePolicyData(JsonElement element) } if (property0.NameEquals("statements"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { @@ -133,20 +151,52 @@ 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 NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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 NetworkFabricRoutePolicyData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, annotation.Value, 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/NetworkFabricRoutePolicyPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.Serialization.cs new file mode 100644 index 0000000000000..a804d8963064a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.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 NetworkFabricRoutePolicyPatch : 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.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/NetworkFabricRoutePolicyPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.cs new file mode 100644 index 0000000000000..8ef1a2bb56974 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricRoutePolicyPatch.cs @@ -0,0 +1,25 @@ +// 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 Route Policy patch resource definition. + public partial class NetworkFabricRoutePolicyPatch : NetworkRackPatch + { + /// Initializes a new instance of NetworkFabricRoutePolicyPatch. + public NetworkFabricRoutePolicyPatch() + { + Statements = new ChangeTrackingList(); + } + + /// Route Policy statements. + public IList Statements { get; } + } +} 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..fab5f6664364f 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,12 +44,12 @@ 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 provisioningState = default; + Optional maximumServerCount = default; + Optional> supportedVersions = default; + Optional details = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -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 NetworkFabricSkuType(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)) @@ -119,14 +137,14 @@ internal static NetworkFabricSkuData DeserializeNetworkFabricSkuData(JsonElement { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } } 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/NetworkFabricSkuType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuType.cs new file mode 100644 index 0000000000000..8c2d64cceea75 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricSkuType.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 NetworkFabricSkuType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricSkuType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleRackValue = "SingleRack"; + private const string MultiRackValue = "MultiRack"; + + /// SingleRack. + public static NetworkFabricSkuType SingleRack { get; } = new NetworkFabricSkuType(SingleRackValue); + /// MultiRack. + public static NetworkFabricSkuType MultiRack { get; } = new NetworkFabricSkuType(MultiRackValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricSkuType left, NetworkFabricSkuType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricSkuType left, NetworkFabricSkuType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricSkuType(string value) => new NetworkFabricSkuType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricSkuType other && Equals(other); + /// + public bool Equals(NetworkFabricSkuType 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/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/UpdateVersionProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.Serialization.cs similarity index 61% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.Serialization.cs index 430fc509cc8b2..02080aa2cdc8d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateVersionProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.Serialization.cs @@ -10,13 +10,16 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class UpdateVersionProperties : IUtf8JsonSerializable + public partial class NetworkFabricUpdateVersionContent : 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/NetworkFabricUpdateVersionContent.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.cs new file mode 100644 index 0000000000000..66aa638dfcefb --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricUpdateVersionContent.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 NetworkFabricUpdateVersionContent + { + /// Initializes a new instance of NetworkFabricUpdateVersionContent. + public NetworkFabricUpdateVersionContent() + { + } + + /// Specify the version. + public string Version { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricValidateAction.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricValidateAction.cs new file mode 100644 index 0000000000000..fc259ce2d3310 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricValidateAction.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 NetworkFabricValidateAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkFabricValidateAction(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 NetworkFabricValidateAction Cabling { get; } = new NetworkFabricValidateAction(CablingValue); + /// Configuration. + public static NetworkFabricValidateAction Configuration { get; } = new NetworkFabricValidateAction(ConfigurationValue); + /// Connectivity. + public static NetworkFabricValidateAction Connectivity { get; } = new NetworkFabricValidateAction(ConnectivityValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkFabricValidateAction left, NetworkFabricValidateAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkFabricValidateAction left, NetworkFabricValidateAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkFabricValidateAction(string value) => new NetworkFabricValidateAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkFabricValidateAction other && Equals(other); + /// + public bool Equals(NetworkFabricValidateAction 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/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/NetworkPacketBrokerData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerData.Serialization.cs new file mode 100644 index 0000000000000..401a4ca1fdcd9 --- /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 NetworkFabricProvisioningState(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/IPExtendedCommunityPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs similarity index 92% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs index c4eb0fb37740e..94dc864e9b2f6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/IPExtendedCommunityPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokerPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class IPExtendedCommunityPatch : IUtf8JsonSerializable + public partial class NetworkPacketBrokerPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { 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/AccessControlListsListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs similarity index 69% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs index e2c8edd33683f..1fd329eb8d2bc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListsListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkPacketBrokersListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - internal partial class AccessControlListsListResult + internal partial class NetworkPacketBrokersListResult { - internal static AccessControlListsListResult DeserializeAccessControlListsListResult(JsonElement element) + internal static NetworkPacketBrokersListResult DeserializeNetworkPacketBrokersListResult(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 AccessControlListsListResult DeserializeAccessControlListsListRe { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AccessControlListData.DeserializeAccessControlListData(item)); + array.Add(NetworkPacketBrokerData.DeserializeNetworkPacketBrokerData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static AccessControlListsListResult DeserializeAccessControlListsListRe continue; } } - return new AccessControlListsListResult(Optional.ToList(value), nextLink.Value); + 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..1d122c04beb83 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,10 +62,10 @@ 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 provisioningState = default; + Optional networkRackType = default; + ResourceIdentifier networkFabricId = default; + Optional> networkDevices = default; + Optional provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("tags"u8)) @@ -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; @@ -152,14 +166,14 @@ internal static NetworkRackData DeserializeNetworkRackData(JsonElement element) { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); continue; } } 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/NetworkRackSkuData.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs deleted file mode 100644 index a6dec84977b1f..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkRackSkuData.Serialization.cs +++ /dev/null @@ -1,167 +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; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - public partial class NetworkRackSkuData : 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)) - { - writer.WritePropertyName("maximumUplinks"u8); - writer.WriteNumberValue(MaximumUplinks.Value); - } - if (Optional.IsCollectionDefined(NetworkDevices)) - { - writer.WritePropertyName("networkDevices"u8); - writer.WriteStartArray(); - foreach (var item in NetworkDevices) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static NetworkRackSkuData DeserializeNetworkRackSkuData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - 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 provisioningState = 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("roleName"u8)) - { - roleName = new NetworkRackRoleName(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("maximumServerCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximumServerCount = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("maximumStorageCount"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximumStorageCount = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("maximumUplinks"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximumUplinks = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("networkDevices"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(NetworkDeviceRoleProperties.DeserializeNetworkDeviceRoleProperties(item)); - } - networkDevices = array; - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new ProvisioningState(property0.Value.GetString()); - 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)); - } - } -} 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..f900efbd3c549 --- /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 NetworkTapPollingType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("configurationState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationState = new NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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/NetworkTapDestinationProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.Serialization.cs new file mode 100644 index 0000000000000..bdf069a67292f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.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 NetworkTapDestinationProperties : 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 NetworkTapDestinationProperties DeserializeNetworkTapDestinationProperties(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 NetworkTapDestinationType(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 NetworkTapDestinationProperties(name.Value, Optional.ToNullable(destinationType), destinationId.Value, isolationDomainProperties.Value, destinationTapRuleId.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.cs new file mode 100644 index 0000000000000..7b76bc2ac0fd4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationProperties.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 NetworkTapDestinationProperties + { + /// Initializes a new instance of NetworkTapDestinationProperties. + public NetworkTapDestinationProperties() + { + } + + /// Initializes a new instance of NetworkTapDestinationProperties. + /// 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 NetworkTapDestinationProperties(string name, NetworkTapDestinationType? 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 NetworkTapDestinationType? 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/NetworkTapDestinationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationType.cs new file mode 100644 index 0000000000000..4347640ef84a6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapDestinationType.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 NetworkTapDestinationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkTapDestinationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IsolationDomainValue = "IsolationDomain"; + private const string DirectValue = "Direct"; + + /// IsolationDomain. + public static NetworkTapDestinationType IsolationDomain { get; } = new NetworkTapDestinationType(IsolationDomainValue); + /// Direct. + public static NetworkTapDestinationType Direct { get; } = new NetworkTapDestinationType(DirectValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkTapDestinationType left, NetworkTapDestinationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkTapDestinationType left, NetworkTapDestinationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkTapDestinationType(string value) => new NetworkTapDestinationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkTapDestinationType other && Equals(other); + /// + public bool Equals(NetworkTapDestinationType 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/NetworkTapEncapsulationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapEncapsulationType.cs new file mode 100644 index 0000000000000..adae87c89dadd --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapEncapsulationType.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. + public readonly partial struct NetworkTapEncapsulationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkTapEncapsulationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string GTPv1Value = "GTPv1"; + + /// None. + public static NetworkTapEncapsulationType None { get; } = new NetworkTapEncapsulationType(NoneValue); + /// GTPv1. + public static NetworkTapEncapsulationType GTPv1 { get; } = new NetworkTapEncapsulationType(GTPv1Value); + /// Determines if two values are the same. + public static bool operator ==(NetworkTapEncapsulationType left, NetworkTapEncapsulationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkTapEncapsulationType left, NetworkTapEncapsulationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkTapEncapsulationType(string value) => new NetworkTapEncapsulationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkTapEncapsulationType other && Equals(other); + /// + public bool Equals(NetworkTapEncapsulationType 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/AccessControlListPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs similarity index 76% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs index 8770e0ae230a7..46366c69f5a5a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/AccessControlListPatch.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPatch.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class AccessControlListPatch : IUtf8JsonSerializable + public partial class NetworkTapPatch : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -33,16 +33,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("annotation"u8); writer.WriteStringValue(Annotation); } - if (Optional.IsDefined(AddressFamily)) + if (Optional.IsDefined(PollingType)) { - writer.WritePropertyName("addressFamily"u8); - writer.WriteStringValue(AddressFamily.Value.ToString()); + writer.WritePropertyName("pollingType"u8); + writer.WriteStringValue(PollingType.Value.ToString()); } - if (Optional.IsCollectionDefined(Conditions)) + if (Optional.IsCollectionDefined(Destinations)) { - writer.WritePropertyName("conditions"u8); + writer.WritePropertyName("destinations"u8); writer.WriteStartArray(); - foreach (var item in Conditions) + foreach (var item in Destinations) { writer.WriteObjectValue(item); } 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..490551523e000 --- /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 NetworkTapPollingType? 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..94fec9e875b84 --- /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 NetworkTapDestinationType(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..48852c4ac4aac --- /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 : NetworkTapDestinationProperties + { + /// 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, NetworkTapDestinationType? destinationType, ResourceIdentifier destinationId, IsolationDomainProperties isolationDomainProperties, ResourceIdentifier destinationTapRuleId) : base(name, destinationType, destinationId, isolationDomainProperties, destinationTapRuleId) + { + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPollingType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPollingType.cs new file mode 100644 index 0000000000000..d24d9ffc7423a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPollingType.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 NetworkTapPollingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkTapPollingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PullValue = "Pull"; + private const string PushValue = "Push"; + + /// Pull. + public static NetworkTapPollingType Pull { get; } = new NetworkTapPollingType(PullValue); + /// Push. + public static NetworkTapPollingType Push { get; } = new NetworkTapPollingType(PushValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkTapPollingType left, NetworkTapPollingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkTapPollingType left, NetworkTapPollingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkTapPollingType(string value) => new NetworkTapPollingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkTapPollingType other && Equals(other); + /// + public bool Equals(NetworkTapPollingType 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/NetworkTapPropertiesDestinationsItem.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapPropertiesDestinationsItem.Serialization.cs new file mode 100644 index 0000000000000..95361b439f88b --- /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 NetworkTapDestinationType(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..8d57d466e11ac --- /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 : NetworkTapDestinationProperties + { + /// 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, NetworkTapDestinationType? 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..be98a1d24d7f3 --- /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 NetworkFabricBooleanValue(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..df3c04d66f344 --- /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, NetworkFabricBooleanValue? 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 NetworkFabricBooleanValue? 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..29713f0ff308c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapRuleData.Serialization.cs @@ -0,0 +1,270 @@ +// 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 NetworkFabricConfigurationType(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)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkTapId = new ResourceIdentifier(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 NetworkFabricConfigurationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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..cdd1b80dbba73 --- /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 NetworkTapEncapsulationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("portCondition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + portCondition = NetworkFabricPortCondition.DeserializeNetworkFabricPortCondition(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..c890f5b3220d3 --- /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. + /// Defines the port condition that needs to be matched. + internal NetworkTapRuleMatchCondition(IList protocolTypes, VlanMatchCondition vlanMatchCondition, IPMatchCondition ipCondition, NetworkTapEncapsulationType? encapsulationType, NetworkFabricPortCondition portCondition) : base(protocolTypes, vlanMatchCondition, ipCondition) + { + EncapsulationType = encapsulationType; + PortCondition = portCondition; + } + + /// Encapsulation Type. + public NetworkTapEncapsulationType? EncapsulationType { get; set; } + /// Defines the port condition that needs to be matched. + public NetworkFabricPortCondition 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..de8d30e431d4e --- /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 NetworkFabricIPAddressType(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..c8271d868543e --- /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, NetworkFabricIPAddressType? 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 NetworkFabricIPAddressType? 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..8c542f79baa77 --- /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 NetworkFabricConfigurationType? 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/NetworkInterfacesList.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs similarity index 72% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacesList.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs index d9137fa0d87e8..c935e40622872 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkInterfacesList.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkTapsListResult.Serialization.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - internal partial class NetworkInterfacesList + internal partial class NetworkTapsListResult { - internal static NetworkInterfacesList DeserializeNetworkInterfacesList(JsonElement element) + internal static NetworkTapsListResult DeserializeNetworkTapsListResult(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 NetworkInterfacesList DeserializeNetworkInterfacesList(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NetworkInterfaceData.DeserializeNetworkInterfaceData(item)); + array.Add(NetworkTapData.DeserializeNetworkTapData(item)); } value = array; continue; @@ -44,7 +44,7 @@ internal static NetworkInterfacesList DeserializeNetworkInterfacesList(JsonEleme continue; } } - return new NetworkInterfacesList(Optional.ToList(value), nextLink.Value); + 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..e42860a1e365f 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; + NetworkFabricBooleanValue useOptionB = default; Optional layer2Configuration = default; - Optional layer3Configuration = default; - Optional provisioningState = 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 NetworkFabricBooleanValue(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 = NetworkToNetworkInterconnectOptionBLayer3Configuration.DeserializeNetworkToNetworkInterconnectOptionBLayer3Configuration(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 NetworkFabricConfigurationState(property0.Value.GetString()); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -160,14 +229,23 @@ internal static NetworkToNetworkInterconnectData DeserializeNetworkToNetworkInte { continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new NetworkFabricProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("administrativeState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + administrativeState = new NetworkFabricAdministrativeState(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/Layer3Configuration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.Serialization.cs similarity index 68% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.Serialization.cs index 42a877906ab56..c98744fdb6d18 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3Configuration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.Serialization.cs @@ -10,25 +10,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class Layer3Configuration : IUtf8JsonSerializable + public partial class NetworkToNetworkInterconnectOptionBLayer3Configuration : 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)) + if (Optional.IsDefined(PeerAsn)) { writer.WritePropertyName("peerASN"u8); - writer.WriteNumberValue(PeerASN.Value); + writer.WriteNumberValue(PeerAsn.Value); } if (Optional.IsDefined(VlanId)) { @@ -58,40 +48,28 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static Layer3Configuration DeserializeLayer3Configuration(JsonElement element) + internal static NetworkToNetworkInterconnectOptionBLayer3Configuration DeserializeNetworkToNetworkInterconnectOptionBLayer3Configuration(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 NetworkToNetworkInterconnectOptionBLayer3Configuration(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/NetworkToNetworkInterconnectOptionBLayer3Configuration.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.cs new file mode 100644 index 0000000000000..bbe6773a30076 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkToNetworkInterconnectOptionBLayer3Configuration.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 NetworkToNetworkInterconnectOptionBLayer3Configuration : OptionBLayer3Configuration + { + /// Initializes a new instance of NetworkToNetworkInterconnectOptionBLayer3Configuration. + public NetworkToNetworkInterconnectOptionBLayer3Configuration() + { + } + + /// Initializes a new instance of NetworkToNetworkInterconnectOptionBLayer3Configuration. + /// 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 NetworkToNetworkInterconnectOptionBLayer3Configuration(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/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/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/NniType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NniType.cs index 158c3fa52eea1..93bf3fa47c385 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NniType.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NniType.cs @@ -23,12 +23,12 @@ public NniType(string value) } private const string CEValue = "CE"; - private const string NPBValue = "NPB"; + private const string NpbValue = "NPB"; /// CE. public static NniType CE { get; } = new NniType(CEValue); /// NPB. - public static NniType NPB { get; } = new NniType(NPBValue); + public static NniType Npb { get; } = new NniType(NpbValue); /// Determines if two values are the same. public static bool operator ==(NniType left, NniType right) => left.Equals(right); /// Determines if two values are not the same. 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..1bbcaacfe42e9 --- /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..9b2d341b52494 --- /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..780c100baa151 --- /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..35f16bf1cf961 --- /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/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..f8eec36b3b260 --- /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 needs 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 needs to be matched. + public IList Ports { get; } + } +} 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/ProvisioningState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index a139d7289ccf1..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ProvisioningState.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 -{ - /// The current provisioning state. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - 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"; - - /// 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); - /// 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. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState 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/RoutePoliciesListResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.Serialization.cs index 48397619ba36c..a7063c265e96a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.Serialization.cs @@ -20,7 +20,7 @@ internal static RoutePoliciesListResult DeserializeRoutePoliciesListResult(JsonE { return null; } - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -30,10 +30,10 @@ internal static RoutePoliciesListResult DeserializeRoutePoliciesListResult(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RoutePolicyData.DeserializeRoutePolicyData(item)); + array.Add(NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(item)); } value = array; continue; diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.cs index 232086e30b6c8..c243b164b04d2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePoliciesListResult.cs @@ -17,20 +17,20 @@ internal partial class RoutePoliciesListResult /// Initializes a new instance of RoutePoliciesListResult. internal RoutePoliciesListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of RoutePoliciesListResult. /// List of RoutePolicy resources. /// Url to follow for getting next page of resources. - internal RoutePoliciesListResult(IReadOnlyList value, string nextLink) + internal RoutePoliciesListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// List of RoutePolicy resources. - public IReadOnlyList Value { get; } + 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/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/RoutePolicyPatch.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs deleted file mode 100644 index e43991556bae9..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.Serialization.cs +++ /dev/null @@ -1,32 +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 RoutePolicyPatch : 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/RoutePolicyPatch.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs deleted file mode 100644 index 693407fb19029..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyPatch.cs +++ /dev/null @@ -1,25 +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 -{ - /// The RoutePolicy patch resource definition. - public partial class RoutePolicyPatch - { - /// Initializes a new instance of RoutePolicyPatch. - public RoutePolicyPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { 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..d039f8b60f8c3 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/RoutePolicyStatementProperties.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - /// Route Policy Statement properties.. - public partial class RoutePolicyStatementProperties : AnnotationResource + /// Route Policy Statement properties. + public partial class RoutePolicyStatementProperties : AnnotationResourceProperties { /// Initializes a new instance of RoutePolicyStatementProperties. /// Sequence to insert to/delete from existing route. 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/SourceDestinationType.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SourceDestinationType.cs new file mode 100644 index 0000000000000..aa27bd118539e --- /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. + 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/FabricBfdConfiguration.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.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/StateUpdateCommonPostActionResult.Serialization.cs index 5c15537cdaf4a..12ff8d562be63 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/FabricBfdConfiguration.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.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 StateUpdateCommonPostActionResult { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static FabricBfdConfiguration DeserializeFabricBfdConfiguration(JsonElement element) + internal static StateUpdateCommonPostActionResult DeserializeStateUpdateCommonPostActionResult(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 NetworkFabricConfigurationState(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 StateUpdateCommonPostActionResult(error.Value, Optional.ToNullable(configurationState)); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.cs new file mode 100644 index 0000000000000..63b3ed2ffd9e6 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StateUpdateCommonPostActionResult.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 StateUpdateCommonPostActionResult : NetworkFabricErrorResult + { + /// Initializes a new instance of StateUpdateCommonPostActionResult. + internal StateUpdateCommonPostActionResult() + { + } + + /// Initializes a new instance of StateUpdateCommonPostActionResult. + /// The error object. + /// Gets the configuration state. + internal StateUpdateCommonPostActionResult(ResponseError error, NetworkFabricConfigurationState? configurationState) : base(error) + { + ConfigurationState = configurationState; + } + + /// Gets the configuration state. + public NetworkFabricConfigurationState? ConfigurationState { get; } + } +} 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..2378c3f90fbbd 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); @@ -27,6 +32,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in IPExtendedCommunityIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -37,6 +47,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in IPCommunityIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -50,14 +65,28 @@ internal static StatementConditionProperties DeserializeStatementConditionProper { return null; } - Optional ipPrefixId = default; - Optional> ipExtendedCommunityIds = default; - Optional> ipCommunityIds = default; + 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(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ipPrefixId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("ipExtendedCommunityIds"u8)) @@ -66,10 +95,17 @@ internal static StatementConditionProperties DeserializeStatementConditionProper { 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())); + } } ipExtendedCommunityIds = array; continue; @@ -80,16 +116,23 @@ internal static StatementConditionProperties DeserializeStatementConditionProper { 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())); + } } ipCommunityIds = array; 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..0e28b09aad256 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StatementConditionProperties.cs @@ -16,22 +16,26 @@ public partial class StatementConditionProperties : IPCommunityIdList /// Initializes a new instance of StatementConditionProperties. public StatementConditionProperties() { - IPExtendedCommunityIds = new ChangeTrackingList(); + IPExtendedCommunityIds = new ChangeTrackingList(); } /// 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, ResourceIdentifier 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; } + public ResourceIdentifier IPPrefixId { get; set; } /// List of IP Extended Community resource IDs. - public IList IPExtendedCommunityIds { get; } + public IList IPExtendedCommunityIds { get; } } } 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/StaticRouteConfigurationExtension.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfigurationExtension.cs new file mode 100644 index 0000000000000..025cb67736df3 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/StaticRouteConfigurationExtension.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 StaticRouteConfigurationExtension : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StaticRouteConfigurationExtension(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoExtensionValue = "NoExtension"; + private const string NpbValue = "NPB"; + + /// NoExtension. + public static StaticRouteConfigurationExtension NoExtension { get; } = new StaticRouteConfigurationExtension(NoExtensionValue); + /// NPB. + public static StaticRouteConfigurationExtension Npb { get; } = new StaticRouteConfigurationExtension(NpbValue); + /// Determines if two values are the same. + public static bool operator ==(StaticRouteConfigurationExtension left, StaticRouteConfigurationExtension right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StaticRouteConfigurationExtension left, StaticRouteConfigurationExtension right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StaticRouteConfigurationExtension(string value) => new StaticRouteConfigurationExtension(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StaticRouteConfigurationExtension other && Equals(other); + /// + public bool Equals(StaticRouteConfigurationExtension 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/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.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs deleted file mode 100644 index 4fc0a35e56599..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/SupportPackageProperties.Serialization.cs +++ /dev/null @@ -1,33 +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 SupportPackageProperties - { - internal static SupportPackageProperties DeserializeSupportPackageProperties(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string supportPackageURL = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("supportPackageURL"u8)) - { - supportPackageURL = property.Value.GetString(); - continue; - } - } - return new SupportPackageProperties(supportPackageURL); - } - } -} 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..95b1a8d6ee915 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 NetworkFabricBooleanValue(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..36f91ef350132 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, NetworkFabricBooleanValue? 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 NetworkFabricBooleanValue? 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..9460aabf93800 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(); } @@ -59,58 +59,62 @@ internal static TerminalServerConfiguration DeserializeTerminalServerConfigurati { return null; } - Optional networkDeviceId = default; - Optional username = default; - Optional password = default; - Optional serialNumber = default; + Optional networkDeviceId = 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)) { - networkDeviceId = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkDeviceId = new ResourceIdentifier(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..1c1dbe56481ed 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/TerminalServerConfiguration.cs @@ -5,10 +5,12 @@ #nullable disable +using Azure.Core; + 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 +18,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, ResourceIdentifier 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; } + public ResourceIdentifier NetworkDeviceId { get; } + /// 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.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.Serialization.cs similarity index 79% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.Serialization.cs index 4e53a31408ec4..63b75cb356688 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class UpdateAdministrativeState : IUtf8JsonSerializable + public partial class UpdateAdministrativeStateContent : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -26,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in ResourceIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.cs similarity index 64% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.cs index 49294f2e997c6..6c751a5775457 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeState.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateContent.cs @@ -8,14 +8,14 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Update administrative state on list of resources. - public partial class UpdateAdministrativeState : EnableDisableOnResources + public partial class UpdateAdministrativeStateContent : UpdateAdministrativeStateOnResources { - /// Initializes a new instance of UpdateAdministrativeState. - public UpdateAdministrativeState() + /// Initializes a new instance of UpdateAdministrativeStateContent. + public UpdateAdministrativeStateContent() { } /// Administrative state. - public AdministrativeState? State { get; set; } + public AdministrativeEnableState? State { get; set; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.Serialization.cs similarity index 75% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.Serialization.cs index 6a70c4c2427b5..843d7041bedee 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class EnableDisableOnResources : IUtf8JsonSerializable + public partial class UpdateAdministrativeStateOnResources : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartArray(); foreach (var item in ResourceIds) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item); } writer.WriteEndArray(); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.cs similarity index 55% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.cs index 3ca4bbd0a34ea..cfc95cf27897f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/EnableDisableOnResources.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateAdministrativeStateOnResources.cs @@ -11,15 +11,15 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { /// Update administrative state on list of resources. - public partial class EnableDisableOnResources + public partial class UpdateAdministrativeStateOnResources { - /// Initializes a new instance of EnableDisableOnResources. - public EnableDisableOnResources() + /// Initializes a new instance of UpdateAdministrativeStateOnResources. + public UpdateAdministrativeStateOnResources() { - ResourceIds = new ChangeTrackingList(); + ResourceIds = new ChangeTrackingList(); } /// Network Fabrics or Network Rack resource Id. - public IList ResourceIds { get; } + public IList ResourceIds { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.Serialization.cs new file mode 100644 index 0000000000000..a669ff7ba6752 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.Serialization.cs @@ -0,0 +1,41 @@ +// 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 UpdateDeviceAdministrativeStateContent : 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) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.cs new file mode 100644 index 0000000000000..6aab23a17fe63 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/UpdateDeviceAdministrativeStateContent.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 UpdateDeviceAdministrativeStateContent : UpdateAdministrativeStateOnResources + { + /// Initializes a new instance of UpdateDeviceAdministrativeStateContent. + public UpdateDeviceAdministrativeStateContent() + { + } + + /// Administrative state. + public NetworkDeviceAdministrativeState? 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.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/ValidateConfigurationContent.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.Serialization.cs new file mode 100644 index 0000000000000..2ab0f105c0425 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.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 ValidateConfigurationContent : 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/ValidateConfigurationContent.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.cs new file mode 100644 index 0000000000000..48831b1766850 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationContent.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 ValidateConfigurationContent + { + /// Initializes a new instance of ValidateConfigurationContent. + public ValidateConfigurationContent() + { + } + + /// Validate action that to be performed. + public NetworkFabricValidateAction? ValidateAction { get; set; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.Serialization.cs new file mode 100644 index 0000000000000..b9dd3af0d22c0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.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 ValidateConfigurationResult + { + internal static ValidateConfigurationResult DeserializeValidateConfigurationResult(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 NetworkFabricConfigurationState(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 ValidateConfigurationResult(error.Value, Optional.ToNullable(configurationState), url.Value); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.cs new file mode 100644 index 0000000000000..68ebdbd3d0385 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/ValidateConfigurationResult.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 ValidateConfigurationResult : NetworkFabricErrorResult + { + /// Initializes a new instance of ValidateConfigurationResult. + internal ValidateConfigurationResult() + { + } + + /// Initializes a new instance of ValidateConfigurationResult. + /// The error object. + /// Gets the configuration state. + /// URL for the details of the response. + internal ValidateConfigurationResult(ResponseError error, NetworkFabricConfigurationState? configurationState, Uri uri) : base(error) + { + ConfigurationState = configurationState; + Uri = uri; + } + + /// Gets the configuration state. + public NetworkFabricConfigurationState? 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..a915ea6ddabe8 --- /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 needs 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 needs to be matched. + /// List of inner vlans that needs to be matched. + /// List of vlan group names that to be matched. + internal VlanMatchCondition(IList vlans, IList innerVlans, IList vlanGroupNames) + { + Vlans = vlans; + InnerVlans = innerVlans; + VlanGroupNames = vlanGroupNames; + } + + /// List of vlans that needs to be matched. + public IList Vlans { get; } + /// List of inner vlans that needs to be matched. + public IList InnerVlans { get; } + /// List of vlan group names that to be matched. + public IList VlanGroupNames { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.Serialization.cs similarity index 83% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.Serialization.cs index 2f562d7dcc250..517f9ac68fae5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/NetworkFabricOptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.Serialization.cs @@ -10,31 +10,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class NetworkFabricOptionAProperties : IUtf8JsonSerializable + public partial class VpnConfigurationOptionAProperties : 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 VpnConfigurationOptionAProperties DeserializeVpnConfigurationOptionAProperties(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 VpnConfigurationOptionAProperties(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/VpnConfigurationOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.cs new file mode 100644 index 0000000000000..aa06deda6296b --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationOptionAProperties.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 VpnConfigurationOptionAProperties : OptionAProperties + { + /// Initializes a new instance of VpnConfigurationOptionAProperties. + public VpnConfigurationOptionAProperties() + { + } + + /// Initializes a new instance of VpnConfigurationOptionAProperties. + /// 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 VpnConfigurationOptionAProperties(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/Layer3OptionAProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.Serialization.cs similarity index 82% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.Serialization.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.Serialization.cs index 46a49332106c8..dce72b60d94c5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/Layer3OptionAProperties.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.Serialization.cs @@ -10,31 +10,11 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Models { - public partial class Layer3OptionAProperties : IUtf8JsonSerializable + public partial class VpnConfigurationPatchableOptionAProperties : 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 VpnConfigurationPatchableOptionAProperties DeserializeVpnConfigurationPatchableOptionAProperties(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 VpnConfigurationPatchableOptionAProperties(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/VpnConfigurationPatchableOptionAProperties.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.cs new file mode 100644 index 0000000000000..164ed99b47a39 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableOptionAProperties.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 VpnConfigurationPatchableOptionAProperties : OptionAProperties + { + /// Initializes a new instance of VpnConfigurationPatchableOptionAProperties. + public VpnConfigurationPatchableOptionAProperties() + { + } + + /// Initializes a new instance of VpnConfigurationPatchableOptionAProperties. + /// 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 VpnConfigurationPatchableOptionAProperties(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/VpnConfigurationPatchableProperties.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/VpnConfigurationPatchableProperties.Serialization.cs new file mode 100644 index 0000000000000..9d11f784d1e64 --- /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 = VpnConfigurationPatchableOptionAProperties.DeserializeVpnConfigurationPatchableOptionAProperties(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..d753595049551 --- /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, VpnConfigurationPatchableOptionAProperties 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 VpnConfigurationPatchableOptionAProperties OptionAProperties { 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..68ec5cfba5b95 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 NetworkFabricAdministrativeState(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 = VpnConfigurationOptionAProperties.DeserializeVpnConfigurationOptionAProperties(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..2e298c5ab16db 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, NetworkFabricAdministrativeState? administrativeState, PeeringOption peeringOption, OptionBProperties optionBProperties, VpnConfigurationOptionAProperties 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 NetworkFabricAdministrativeState? 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 VpnConfigurationOptionAProperties OptionAProperties { 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/WorkloadServices.Serialization.cs deleted file mode 100644 index c969af9627a3d..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/Models/WorkloadServices.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 WorkloadServices - { - internal static WorkloadServices DeserializeWorkloadServices(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 WorkloadServices(Optional.ToList(ipv4AddressSpaces), Optional.ToList(ipv6AddressSpaces)); - } - } -} 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/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..7fc05faff8ec4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceData.cs @@ -6,6 +6,7 @@ #nullable disable using System.Collections.Generic; +using System.Net; using Azure.Core; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Models; @@ -14,7 +15,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 +33,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, ResourceIdentifier networkRackId, IPAddress managementIPv4Address, string managementIPv6Address, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; HostName = hostName; @@ -47,25 +52,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; } + public ResourceIdentifier NetworkRackId { get; } + /// Management IPv4 Address. + public IPAddress ManagementIPv4Address { get; } + /// Management IPv6 Address. + public string ManagementIPv6Address { get; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceCollection.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceCollection.cs index 52b0cb6b58fe1..fd681ac36cd93 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceCollection.cs @@ -19,28 +19,28 @@ 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 GetNetworkInterfaces method from an instance of . + /// 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 GetNetworkDeviceInterfaces method from an instance of . /// - public partial class NetworkInterfaceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkDeviceInterfaceCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _networkInterfaceClientDiagnostics; - private readonly NetworkInterfacesRestOperations _networkInterfaceRestClient; + private readonly ClientDiagnostics _networkDeviceInterfaceNetworkInterfacesClientDiagnostics; + private readonly NetworkInterfacesRestOperations _networkDeviceInterfaceNetworkInterfacesRestClient; - /// Initializes a new instance of the class for mocking. - protected NetworkInterfaceCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkDeviceInterfaceCollection() { } - /// Initializes a new instance of the class. + /// 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 NetworkInterfaceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkDeviceInterfaceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _networkInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkInterfaceResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(NetworkInterfaceResource.ResourceType, out string networkInterfaceApiVersion); - _networkInterfaceRestClient = new NetworkInterfacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkInterfaceApiVersion); + _networkDeviceInterfaceNetworkInterfacesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkDeviceInterfaceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkDeviceInterfaceResource.ResourceType, out string networkDeviceInterfaceNetworkInterfacesApiVersion); + _networkDeviceInterfaceNetworkInterfacesRestClient = new NetworkInterfacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkDeviceInterfaceNetworkInterfacesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -66,22 +66,22 @@ 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. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string networkInterfaceName, NetworkInterfaceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string networkInterfaceName, NetworkDeviceInterfaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.CreateOrUpdate"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _networkInterfaceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkDeviceInterfaceNetworkInterfacesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkDeviceInterfaceOperationSource(Client), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +107,22 @@ 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. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string networkInterfaceName, NetworkInterfaceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string networkInterfaceName, NetworkDeviceInterfaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.CreateOrUpdate"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.CreateOrUpdate"); scope.Start(); try { - var response = _networkInterfaceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new NetworkInterfaceOperationSource(Client), _networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkDeviceInterfaceNetworkInterfacesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkDeviceInterfaceOperationSource(Client), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,22 +147,22 @@ 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. - public virtual async Task> GetAsync(string networkInterfaceName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string networkInterfaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.Get"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.Get"); scope.Start(); try { - var response = await _networkInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken).ConfigureAwait(false); + var response = await _networkDeviceInterfaceNetworkInterfacesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkInterfaceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkDeviceInterfaceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,22 +184,22 @@ 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. - public virtual Response Get(string networkInterfaceName, CancellationToken cancellationToken = default) + public virtual Response Get(string networkInterfaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.Get"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.Get"); scope.Start(); try { - var response = _networkInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken); + var response = _networkDeviceInterfaceNetworkInterfacesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkInterfaceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkDeviceInterfaceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -217,17 +217,17 @@ public virtual Response Get(string networkInterfaceNam /// /// /// Operation Id - /// NetworkInterfaces_List + /// NetworkInterfaces_ListByNetworkDevice /// /// /// /// 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) + /// 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); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkInterfaceResource(Client, NetworkInterfaceData.DeserializeNetworkInterfaceData(e)), _networkInterfaceClientDiagnostics, Pipeline, "NetworkInterfaceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkDeviceInterfaceNetworkInterfacesRestClient.CreateListByNetworkDeviceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkDeviceInterfaceNetworkInterfacesRestClient.CreateListByNetworkDeviceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkDeviceInterfaceResource(Client, NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(e)), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, "NetworkDeviceInterfaceCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -239,17 +239,17 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Operation Id - /// NetworkInterfaces_List + /// NetworkInterfaces_ListByNetworkDevice /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// 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); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkInterfaceResource(Client, NetworkInterfaceData.DeserializeNetworkInterfaceData(e)), _networkInterfaceClientDiagnostics, Pipeline, "NetworkInterfaceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkDeviceInterfaceNetworkInterfacesRestClient.CreateListByNetworkDeviceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkDeviceInterfaceNetworkInterfacesRestClient.CreateListByNetworkDeviceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkDeviceInterfaceResource(Client, NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(e)), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, "NetworkDeviceInterfaceCollection.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. @@ -273,11 +273,11 @@ public virtual async Task> ExistsAsync(string networkInterfaceNam { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.Exists"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.Exists"); scope.Start(); try { - var response = await _networkInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkDeviceInterfaceNetworkInterfacesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -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. @@ -308,11 +308,11 @@ public virtual Response Exists(string networkInterfaceName, CancellationTo { Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceCollection.Exists"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceCollection.Exists"); scope.Start(); try { - var response = _networkInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken: cancellationToken); + var response = _networkDeviceInterfaceNetworkInterfacesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkInterfaceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -322,7 +322,7 @@ public virtual Response Exists(string networkInterfaceName, CancellationTo } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -332,7 +332,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceData.cs new file mode 100644 index 0000000000000..ac29626029c8d --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceData.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Net; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkDeviceInterface data model. + /// Defines the NetworkInterface resource. + /// + public partial class NetworkDeviceInterfaceData : ResourceData + { + /// Initializes a new instance of NetworkDeviceInterfaceData. + public NetworkDeviceInterfaceData() + { + } + + /// Initializes a new instance of NetworkDeviceInterfaceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Switch configuration description. + /// 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 of the interface. + /// IPv6Address of the interface. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkDeviceInterfaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, string physicalIdentifier, string connectedTo, NetworkDeviceInterfaceType? interfaceType, IPAddress ipv4Address, string ipv6Address, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData) + { + Annotation = annotation; + PhysicalIdentifier = physicalIdentifier; + ConnectedTo = connectedTo; + InterfaceType = interfaceType; + IPv4Address = ipv4Address; + IPv6Address = ipv6Address; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Physical Identifier of the network interface. + public string PhysicalIdentifier { get; } + /// The ARM resource id of the interface or compute server its connected to. + public string ConnectedTo { get; } + /// The Interface Type. Example: Management/Data. + public NetworkDeviceInterfaceType? InterfaceType { get; } + /// IPv4Address of the interface. + public IPAddress IPv4Address { get; } + /// IPv6Address of the interface. + public string IPv6Address { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.cs similarity index 57% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.cs index c0f7f553a8c67..9975433c8153b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.cs @@ -18,46 +18,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing a NetworkInterface 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 GetNetworkInterfaceResource method. - /// Otherwise you can get one from its parent resource using the GetNetworkInterface method. + /// A Class representing a NetworkDeviceInterface 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 GetNetworkDeviceInterfaceResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkDeviceInterface method. /// - public partial class NetworkInterfaceResource : ArmResource + public partial class NetworkDeviceInterfaceResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/networkInterfaces/{networkInterfaceName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _networkInterfaceClientDiagnostics; - private readonly NetworkInterfacesRestOperations _networkInterfaceRestClient; - private readonly NetworkInterfaceData _data; + private readonly ClientDiagnostics _networkDeviceInterfaceNetworkInterfacesClientDiagnostics; + private readonly NetworkInterfacesRestOperations _networkDeviceInterfaceNetworkInterfacesRestClient; + private readonly NetworkDeviceInterfaceData _data; - /// Initializes a new instance of the class for mocking. - protected NetworkInterfaceResource() + /// Initializes a new instance of the class for mocking. + protected NetworkDeviceInterfaceResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal NetworkInterfaceResource(ArmClient client, NetworkInterfaceData data) : this(client, data.Id) + internal NetworkDeviceInterfaceResource(ArmClient client, NetworkDeviceInterfaceData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 NetworkInterfaceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkDeviceInterfaceResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _networkInterfaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string networkInterfaceApiVersion); - _networkInterfaceRestClient = new NetworkInterfacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkInterfaceApiVersion); + _networkDeviceInterfaceNetworkInterfacesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkDeviceInterfaceNetworkInterfacesApiVersion); + _networkDeviceInterfaceNetworkInterfacesRestClient = new NetworkInterfacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkDeviceInterfaceNetworkInterfacesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -71,7 +71,7 @@ internal NetworkInterfaceResource(ArmClient client, ResourceIdentifier id) : bas /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual NetworkInterfaceData Data + public virtual NetworkDeviceInterfaceData Data { get { @@ -101,16 +101,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Get"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Get"); scope.Start(); try { - var response = await _networkInterfaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkDeviceInterfaceNetworkInterfacesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkInterfaceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkDeviceInterfaceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -133,16 +133,16 @@ public virtual async Task> GetAsync(Cancellat /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Get"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Get"); scope.Start(); try { - var response = _networkInterfaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _networkDeviceInterfaceNetworkInterfacesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkInterfaceResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkDeviceInterfaceResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -168,12 +168,12 @@ public virtual Response Get(CancellationToken cancella /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Delete"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Delete"); scope.Start(); try { - var response = await _networkInterfaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkDeviceInterfaceNetworkInterfacesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -202,12 +202,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Delete"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Delete"); scope.Start(); try { - var response = _networkInterfaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_networkInterfaceClientDiagnostics, Pipeline, _networkInterfaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkDeviceInterfaceNetworkInterfacesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -236,16 +236,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// NetworkInterface properties to update. Only tags are supported. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkInterfacePatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkDeviceInterfacePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Update"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Update"); scope.Start(); 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 response = await _networkDeviceInterfaceNetworkInterfacesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkDeviceInterfaceOperationSource(Client), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.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; @@ -274,84 +274,16 @@ public virtual async Task> UpdateAsync(Wa /// NetworkInterface properties to update. Only tags are supported. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, NetworkInterfacePatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkDeviceInterfacePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.Update"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.Update"); scope.Start(); 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 response = _networkDeviceInterfaceNetworkInterfacesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkDeviceInterfaceOperationSource(Client), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.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,26 +304,26 @@ public virtual ArmOperation GetStatus(WaitUntil waitUntil, Canc /// /// /// Operation Id - /// NetworkInterfaces_updateAdministrativeState + /// NetworkInterfaces_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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.UpdateAdministrativeState"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.UpdateAdministrativeState"); scope.Start(); 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 response = await _networkDeviceInterfaceNetworkInterfacesRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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,26 +342,26 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// Operation Id - /// NetworkInterfaces_updateAdministrativeState + /// NetworkInterfaces_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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkInterfaceClientDiagnostics.CreateScope("NetworkInterfaceResource.UpdateAdministrativeState"); + using var scope = _networkDeviceInterfaceNetworkInterfacesClientDiagnostics.CreateScope("NetworkDeviceInterfaceResource.UpdateAdministrativeState"); scope.Start(); 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 response = _networkDeviceInterfaceNetworkInterfacesRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceInterfaceNetworkInterfacesClientDiagnostics, Pipeline, _networkDeviceInterfaceNetworkInterfacesRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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/NetworkDeviceResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs index 4a7bb418ca026..8a83170714731 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.cs @@ -89,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of NetworkInterfaceResources in the NetworkDevice. - /// An object representing collection of NetworkInterfaceResources and their operations over a NetworkInterfaceResource. - public virtual NetworkInterfaceCollection GetNetworkInterfaces() + /// Gets a collection of NetworkDeviceInterfaceResources in the NetworkDevice. + /// An object representing collection of NetworkDeviceInterfaceResources and their operations over a NetworkDeviceInterfaceResource. + public virtual NetworkDeviceInterfaceCollection GetNetworkDeviceInterfaces() { - return GetCachedClient(Client => new NetworkInterfaceCollection(Client, Id)); + return GetCachedClient(Client => new NetworkDeviceInterfaceCollection(Client, Id)); } /// @@ -109,14 +109,14 @@ 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. [ForwardsClientCalls] - public virtual async Task> GetNetworkInterfaceAsync(string networkInterfaceName, CancellationToken cancellationToken = default) + public virtual async Task> GetNetworkDeviceInterfaceAsync(string networkInterfaceName, CancellationToken cancellationToken = default) { - return await GetNetworkInterfaces().GetAsync(networkInterfaceName, cancellationToken).ConfigureAwait(false); + return await GetNetworkDeviceInterfaces().GetAsync(networkInterfaceName, cancellationToken).ConfigureAwait(false); } /// @@ -132,18 +132,18 @@ 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. [ForwardsClientCalls] - public virtual Response GetNetworkInterface(string networkInterfaceName, CancellationToken cancellationToken = default) + public virtual Response GetNetworkDeviceInterface(string networkInterfaceName, CancellationToken cancellationToken = default) { - return GetNetworkInterfaces().Get(networkInterfaceName, cancellationToken); + return GetNetworkDeviceInterfaces().Get(networkInterfaceName, cancellationToken); } /// - /// 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, NetworkDeviceRebootContent content, CancellationToken cancellationToken = default) { + Argument.AssertNotNull(content, nameof(content)); + 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, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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,166 +397,26 @@ public virtual async Task RebootAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// 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. - /// The cancellation token to use. - public virtual ArmOperation Reboot(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Restore the configuration of the Network Device resource to last known good configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig - /// - /// - /// Operation Id - /// NetworkDevices_restoreConfig - /// - /// - /// - /// 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) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RestoreConfig"); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Restore the configuration of the Network Device resource to last known good configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/restoreConfig - /// - /// - /// Operation Id - /// NetworkDevices_restoreConfig - /// - /// - /// - /// 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) - { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RestoreConfig"); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the SKU version of the Network Device resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion - /// - /// - /// Operation Id - /// NetworkDevices_updateVersion + /// 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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, UpdateVersionProperties body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Reboot(WaitUntil waitUntil, NetworkDeviceRebootContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateVersion"); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the SKU version of the Network Device resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/updateVersion - /// - /// - /// Operation Id - /// NetworkDevices_updateVersion - /// - /// - /// - /// 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 UpdateVersion(WaitUntil waitUntil, UpdateVersionProperties body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateVersion"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Reboot"); 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); + var response = _networkDeviceRestClient.Reboot(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRebootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -563,28 +427,28 @@ public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, UpdateVersionProp } /// - /// Generate Support Package for the given Network Device. + /// Refreshes the configuration the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration /// /// /// Operation Id - /// NetworkDevices_generateSupportPackage + /// 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> GenerateSupportPackageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RefreshConfigurationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GenerateSupportPackage"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RefreshConfiguration"); 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); + var response = await _networkDeviceRestClient.RefreshConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -597,28 +461,28 @@ public virtual async Task> GenerateSuppor } /// - /// Generate Support Package for the given Network Device. + /// Refreshes the configuration the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/generateSupportPackage + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/refreshConfiguration /// /// /// Operation Id - /// NetworkDevices_generateSupportPackage + /// 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 GenerateSupportPackage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation RefreshConfiguration(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GenerateSupportPackage"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.RefreshConfiguration"); 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.RefreshConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateRefreshConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -631,34 +495,34 @@ public virtual ArmOperation GenerateSupportPackage(Wai } /// - /// Update PDU power cycle of the Network Device. + /// Updates the Administrative state 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}/updateAdministrativeState /// /// /// Operation Id - /// NetworkDevices_updatePowerCycle + /// NetworkDevices_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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task UpdatePowerCycleAsync(WaitUntil waitUntil, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateDeviceAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdatePowerCycle"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateAdministrativeState"); 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.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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,34 +533,34 @@ public virtual async Task UpdatePowerCycleAsync(WaitUntil waitUnti } /// - /// Update PDU power cycle of the Network Device. + /// Updates the Administrative state 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}/updateAdministrativeState /// /// /// Operation Id - /// NetworkDevices_updatePowerCycle + /// NetworkDevices_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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdatePowerCycle(WaitUntil waitUntil, UpdatePowerCycleProperties body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateDeviceAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdatePowerCycle"); + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.UpdateAdministrativeState"); 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); + var response = _networkDeviceRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -707,28 +571,32 @@ public virtual ArmOperation UpdatePowerCycle(WaitUntil waitUntil, UpdatePowerCyc } /// - /// Get the running status of the Network Device. + /// Upgrades the version of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade /// /// /// Operation Id - /// NetworkDevices_getStatus + /// NetworkDevices_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. + /// Request payload. /// The cancellation token to use. - public virtual async Task> GetStatusAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpgradeAsync(WaitUntil waitUntil, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GetStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.Upgrade"); 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); + var response = await _networkDeviceRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -741,28 +609,32 @@ public virtual async Task> GetStatusAsyn } /// - /// Get the running status of the Network Device. + /// Upgrades the version of the Network Device. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/getStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkDevices/{networkDeviceName}/upgrade /// /// /// Operation Id - /// NetworkDevices_getStatus + /// NetworkDevices_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. + /// Request payload. /// The cancellation token to use. - public virtual ArmOperation GetStatus(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Upgrade(WaitUntil waitUntil, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) { - using var scope = _networkDeviceClientDiagnostics.CreateScope("NetworkDeviceResource.GetStatus"); + Argument.AssertNotNull(content, nameof(content)); + + 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, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkDeviceClientDiagnostics, Pipeline, _networkDeviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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..27dd90655525f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuData.cs @@ -29,7 +29,7 @@ public NetworkDeviceSkuData(string model) Model = model; SupportedVersions = new ChangeTrackingList(); SupportedRoleTypes = new ChangeTrackingList(); - Interfaces = new ChangeTrackingList(); + Interfaces = new ChangeTrackingList(); } /// Initializes a new instance of NetworkDeviceSkuData. @@ -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, NetworkFabricProvisioningState? 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. - public ProvisioningState? ProvisioningState { get; } + public IList Interfaces { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? 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/AccessControlListCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListCollection.cs similarity index 62% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListCollection.cs index 718b43e1fdcb7..baad248e8c1d4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListCollection.cs @@ -20,28 +20,28 @@ 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 GetAccessControlLists method from an instance of . + /// 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 GetNetworkFabricAccessControlLists method from an instance of . /// - public partial class AccessControlListCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricAccessControlListCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _accessControlListClientDiagnostics; - private readonly AccessControlListsRestOperations _accessControlListRestClient; + private readonly ClientDiagnostics _networkFabricAccessControlListAccessControlListsClientDiagnostics; + private readonly AccessControlListsRestOperations _networkFabricAccessControlListAccessControlListsRestClient; - /// Initializes a new instance of the class for mocking. - protected AccessControlListCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricAccessControlListCollection() { } - /// Initializes a new instance of the class. + /// 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 AccessControlListCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricAccessControlListCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _accessControlListClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", AccessControlListResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(AccessControlListResource.ResourceType, out string accessControlListApiVersion); - _accessControlListRestClient = new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, accessControlListApiVersion); + _networkFabricAccessControlListAccessControlListsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricAccessControlListResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricAccessControlListResource.ResourceType, out string networkFabricAccessControlListAccessControlListsApiVersion); + _networkFabricAccessControlListAccessControlListsRestClient = new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricAccessControlListAccessControlListsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string accessControlListName, NetworkFabricAccessControlListData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.CreateOrUpdate"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.CreateOrUpdate"); scope.Start(); 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 response = await _networkFabricAccessControlListAccessControlListsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricAccessControlListOperationSource(Client), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdat /// 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 accessControlListName, AccessControlListData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string accessControlListName, NetworkFabricAccessControlListData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.CreateOrUpdate"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.CreateOrUpdate"); scope.Start(); 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 response = _networkFabricAccessControlListAccessControlListsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricAccessControlListOperationSource(Client), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string accessControlListName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string accessControlListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.Get"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.Get"); scope.Start(); try { - var response = await _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string a /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string accessControlListName, CancellationToken cancellationToken = default) + public virtual Response Get(string accessControlListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.Get"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.Get"); scope.Start(); try { - var response = _accessControlListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken); + var response = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string accessControlListN /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _accessControlListRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _accessControlListRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AccessControlListResource(Client, AccessControlListData.DeserializeAccessControlListData(e)), _accessControlListClientDiagnostics, Pipeline, "AccessControlListCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricAccessControlListAccessControlListsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricAccessControlListAccessControlListsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricAccessControlListResource(Client, NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(e)), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, "NetworkFabricAccessControlListCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _accessControlListRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _accessControlListRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AccessControlListResource(Client, AccessControlListData.DeserializeAccessControlListData(e)), _accessControlListClientDiagnostics, Pipeline, "AccessControlListCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricAccessControlListAccessControlListsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricAccessControlListAccessControlListsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricAccessControlListResource(Client, NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(e)), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, "NetworkFabricAccessControlListCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string accessControlListNa { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.Exists"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.Exists"); scope.Start(); try { - var response = await _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string accessControlListName, CancellationT { Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListCollection.Exists"); + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListCollection.Exists"); scope.Start(); try { - var response = _accessControlListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken: cancellationToken); + var response = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accessControlListName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string accessControlListName, CancellationT } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListData.cs new file mode 100644 index 0000000000000..b6f4ddc18a91c --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListData.cs @@ -0,0 +1,78 @@ +// 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 NetworkFabricAccessControlList data model. + /// The Access Control List resource definition. + /// + public partial class NetworkFabricAccessControlListData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricAccessControlListData. + /// The location. + public NetworkFabricAccessControlListData(AzureLocation location) : base(location) + { + MatchConfigurations = new ChangeTrackingList(); + DynamicMatchConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricAccessControlListData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Input method to configure Access Control List. + /// Access Control List file URL. + /// 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 NetworkFabricAccessControlListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, NetworkFabricConfigurationType? configurationType, Uri aclsUri, IList matchConfigurations, IList dynamicMatchConfigurations, DateTimeOffset? lastSyncedOn, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + ConfigurationType = configurationType; + AclsUri = aclsUri; + MatchConfigurations = matchConfigurations; + DynamicMatchConfigurations = dynamicMatchConfigurations; + LastSyncedOn = lastSyncedOn; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Input method to configure Access Control List. + public NetworkFabricConfigurationType? ConfigurationType { get; set; } + /// Access Control List file URL. + public Uri AclsUri { 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 NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.cs new file mode 100644 index 0000000000000..b88b3fea44d54 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.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 NetworkFabricAccessControlList 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 GetNetworkFabricAccessControlListResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricAccessControlList method. + /// + public partial class NetworkFabricAccessControlListResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accessControlListName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkFabricAccessControlListAccessControlListsClientDiagnostics; + private readonly AccessControlListsRestOperations _networkFabricAccessControlListAccessControlListsRestClient; + private readonly NetworkFabricAccessControlListData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricAccessControlListResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricAccessControlListResource(ArmClient client, NetworkFabricAccessControlListData 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 NetworkFabricAccessControlListResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricAccessControlListAccessControlListsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricAccessControlListAccessControlListsApiVersion); + _networkFabricAccessControlListAccessControlListsRestClient = new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricAccessControlListAccessControlListsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/accessControlLists"; + + /// 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 NetworkFabricAccessControlListData 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 Access Control List GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Access Control List GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Get"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Access Control List DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Access Control List DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the Access Control List resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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. + /// Access Control List properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricAccessControlListPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricAccessControlListOperationSource(Client), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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 Access Control List resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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. + /// Access Control List properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricAccessControlListPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Update"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricAccessControlListOperationSource(Client), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Resync"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.ResyncAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.Resync"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.Resync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricAccessControlListAccessControlListsRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _networkFabricAccessControlListAccessControlListsRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricAccessControlListAccessControlListsClientDiagnostics, Pipeline, _networkFabricAccessControlListAccessControlListsRestClient.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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 _networkFabricAccessControlListAccessControlListsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/accessControlLists/{accessControlListName} + /// + /// + /// Operation Id + /// AccessControlLists_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 = _networkFabricAccessControlListAccessControlListsClientDiagnostics.CreateScope("NetworkFabricAccessControlListResource.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 = _networkFabricAccessControlListAccessControlListsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricAccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricAccessControlListPatch(); + 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/NetworkFabricControllerData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerData.cs index 539f9162053eb..e804830f4cc20 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, NetworkFabricControllerServices infrastructureServices, NetworkFabricControllerServices workloadServices, ManagedResourceGroupConfiguration managedResourceGroupConfiguration, IReadOnlyList networkFabricIds, bool? isWorkloadManagementNetwork, IsWorkloadManagementNetworkEnabled? isWorkloadManagementNetworkEnabled, IReadOnlyList tenantInternetGatewayIds, string ipv4AddressSpace, string ipv6AddressSpace, NetworkFabricControllerSKU? nfcSku, NetworkFabricProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { Annotation = annotation; InfrastructureExpressRouteConnections = infrastructureExpressRouteConnections; @@ -55,10 +58,12 @@ internal NetworkFabricControllerData(ResourceIdentifier id, string name, Resourc WorkloadServices = workloadServices; ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; NetworkFabricIds = networkFabricIds; - WorkloadManagementNetwork = workloadManagementNetwork; + IsWorkloadManagementNetwork = isWorkloadManagementNetwork; + IsWorkloadManagementNetworkEnabled = isWorkloadManagementNetworkEnabled; + TenantInternetGatewayIds = tenantInternetGatewayIds; IPv4AddressSpace = ipv4AddressSpace; IPv6AddressSpace = ipv6AddressSpace; - OperationalState = operationalState; + NfcSku = nfcSku; ProvisioningState = provisioningState; } @@ -69,22 +74,26 @@ 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 NetworkFabricControllerServices InfrastructureServices { get; } /// WorkloadServices IP ranges. - public WorkloadServices WorkloadServices { get; } + public NetworkFabricControllerServices 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; } + 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? IsWorkloadManagementNetwork { 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 bool? WorkloadManagementNetwork { get; } + 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 NetworkFabricControllerSKU? 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; } + public NetworkFabricProvisioningState? 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..19636c8c92928 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. + /// 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. - /// 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, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? 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; + FabricAsn = fabricAsn; 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 ProvisioningState? ProvisioningState { get; } + 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 NetworkFabricConfigurationState? 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 NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkCollection.cs similarity index 61% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkCollection.cs index edd94896ca77b..03cf3068644eb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/ExternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkCollection.cs @@ -19,28 +19,28 @@ 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 GetExternalNetworks method from an instance of . + /// 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 GetNetworkFabricExternalNetworks method from an instance of . /// - public partial class ExternalNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricExternalNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _externalNetworkClientDiagnostics; - private readonly ExternalNetworksRestOperations _externalNetworkRestClient; + private readonly ClientDiagnostics _networkFabricExternalNetworkExternalNetworksClientDiagnostics; + private readonly ExternalNetworksRestOperations _networkFabricExternalNetworkExternalNetworksRestClient; - /// Initializes a new instance of the class for mocking. - protected ExternalNetworkCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricExternalNetworkCollection() { } - /// Initializes a new instance of the class. + /// 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 ExternalNetworkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricExternalNetworkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _externalNetworkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ExternalNetworkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ExternalNetworkResource.ResourceType, out string externalNetworkApiVersion); - _externalNetworkRestClient = new ExternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, externalNetworkApiVersion); + _networkFabricExternalNetworkExternalNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricExternalNetworkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricExternalNetworkResource.ResourceType, out string networkFabricExternalNetworkExternalNetworksApiVersion); + _networkFabricExternalNetworkExternalNetworksRestClient = new ExternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricExternalNetworkExternalNetworksApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -48,8 +48,8 @@ internal ExternalNetworkCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != L3IsolationDomainResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, L3IsolationDomainResource.ResourceType), nameof(id)); + if (id.ResourceType != NetworkFabricL3IsolationDomainResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetworkFabricL3IsolationDomainResource.ResourceType), nameof(id)); } /// @@ -66,22 +66,22 @@ 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. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string externalNetworkName, ExternalNetworkData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string externalNetworkName, NetworkFabricExternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.CreateOrUpdate"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _externalNetworkRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricExternalNetworkOperationSource(Client), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +107,22 @@ 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. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string externalNetworkName, ExternalNetworkData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string externalNetworkName, NetworkFabricExternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.CreateOrUpdate"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.CreateOrUpdate"); scope.Start(); try { - var response = _externalNetworkRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new ExternalNetworkOperationSource(Client), _externalNetworkClientDiagnostics, Pipeline, _externalNetworkRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricExternalNetworkOperationSource(Client), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,22 +147,22 @@ 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. - public virtual async Task> GetAsync(string externalNetworkName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string externalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.Get"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.Get"); scope.Start(); try { - var response = await _externalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ExternalNetworkResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricExternalNetworkResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,22 +184,22 @@ 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. - public virtual Response Get(string externalNetworkName, CancellationToken cancellationToken = default) + public virtual Response Get(string externalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.Get"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.Get"); scope.Start(); try { - var response = _externalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken); + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ExternalNetworkResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricExternalNetworkResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -217,17 +217,17 @@ public virtual Response Get(string externalNetworkName, /// /// /// Operation Id - /// ExternalNetworks_List + /// ExternalNetworks_ListByL3IsolationDomain /// /// /// /// 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) + /// 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); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExternalNetworkResource(Client, ExternalNetworkData.DeserializeExternalNetworkData(e)), _externalNetworkClientDiagnostics, Pipeline, "ExternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricExternalNetworkExternalNetworksRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricExternalNetworkExternalNetworksRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricExternalNetworkResource(Client, NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(e)), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, "NetworkFabricExternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -239,17 +239,17 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Operation Id - /// ExternalNetworks_List + /// ExternalNetworks_ListByL3IsolationDomain /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// 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); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExternalNetworkResource(Client, ExternalNetworkData.DeserializeExternalNetworkData(e)), _externalNetworkClientDiagnostics, Pipeline, "ExternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricExternalNetworkExternalNetworksRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricExternalNetworkExternalNetworksRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricExternalNetworkResource(Client, NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(e)), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, "NetworkFabricExternalNetworkCollection.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. @@ -273,11 +273,11 @@ public virtual async Task> ExistsAsync(string externalNetworkName { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.Exists"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.Exists"); scope.Start(); try { - var response = await _externalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -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. @@ -308,11 +308,11 @@ public virtual Response Exists(string externalNetworkName, CancellationTok { Argument.AssertNotNullOrEmpty(externalNetworkName, nameof(externalNetworkName)); - using var scope = _externalNetworkClientDiagnostics.CreateScope("ExternalNetworkCollection.Exists"); + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkCollection.Exists"); scope.Start(); try { - var response = _externalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken: cancellationToken); + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, externalNetworkName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -322,7 +322,7 @@ public virtual Response Exists(string externalNetworkName, CancellationTok } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -332,7 +332,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkData.cs new file mode 100644 index 0000000000000..ee53774699031 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkData.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkFabricExternalNetwork data model. + /// Defines the External Network resource. + /// + public partial class NetworkFabricExternalNetworkData : ResourceData + { + /// Initializes a new instance of NetworkFabricExternalNetworkData. + /// Peering option list. + public NetworkFabricExternalNetworkData(PeeringOption peeringOption) + { + PeeringOption = peeringOption; + } + + /// Initializes a new instance of NetworkFabricExternalNetworkData. + /// The id. + /// The name. + /// 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. + /// Peering option list. + /// option B properties object. + /// option A properties object. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkFabricExternalNetworkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string annotation, ResourceIdentifier importRoutePolicyId, ResourceIdentifier exportRoutePolicyId, ImportRoutePolicy importRoutePolicy, ExportRoutePolicy exportRoutePolicy, ResourceIdentifier networkToNetworkInterconnectId, PeeringOption peeringOption, L3OptionBProperties optionBProperties, ExternalNetworkOptionAProperties optionAProperties, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData) + { + Annotation = annotation; + ImportRoutePolicyId = importRoutePolicyId; + ExportRoutePolicyId = exportRoutePolicyId; + ImportRoutePolicy = importRoutePolicy; + ExportRoutePolicy = exportRoutePolicy; + NetworkToNetworkInterconnectId = networkToNetworkInterconnectId; + PeeringOption = peeringOption; + OptionBProperties = optionBProperties; + OptionAProperties = optionAProperties; + 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 ResourceIdentifier NetworkToNetworkInterconnectId { get; } + /// Peering option list. + public PeeringOption PeeringOption { get; set; } + /// option B properties object. + public L3OptionBProperties OptionBProperties { get; set; } + /// option A properties object. + public ExternalNetworkOptionAProperties OptionAProperties { get; set; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.cs new file mode 100644 index 0000000000000..95f3f2f406d99 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.cs @@ -0,0 +1,450 @@ +// 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.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NetworkFabricExternalNetwork 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 GetNetworkFabricExternalNetworkResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricExternalNetwork method. + /// + public partial class NetworkFabricExternalNetworkResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkFabricExternalNetworkExternalNetworksClientDiagnostics; + private readonly ExternalNetworksRestOperations _networkFabricExternalNetworkExternalNetworksRestClient; + private readonly NetworkFabricExternalNetworkData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricExternalNetworkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricExternalNetworkResource(ArmClient client, NetworkFabricExternalNetworkData 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 NetworkFabricExternalNetworkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricExternalNetworkExternalNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricExternalNetworkExternalNetworksApiVersion); + _networkFabricExternalNetworkExternalNetworksRestClient = new ExternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricExternalNetworkExternalNetworksApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/l3IsolationDomains/externalNetworks"; + + /// 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 NetworkFabricExternalNetworkData 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 ExternalNetworks GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricExternalNetworkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements ExternalNetworks GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Get"); + scope.Start(); + try + { + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricExternalNetworkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements ExternalNetworks DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_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 = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 ExternalNetworks DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_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 = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 ExternalNetworks resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_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. + /// ExternalNetwork properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricExternalNetworkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricExternalNetworkOperationSource(Client), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.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; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// API to update certain properties of the ExternalNetworks resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName} + /// + /// + /// Operation Id + /// ExternalNetworks_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. + /// ExternalNetwork properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricExternalNetworkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.Update"); + scope.Start(); + try + { + var response = _networkFabricExternalNetworkExternalNetworksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricExternalNetworkOperationSource(Client), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.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; + } + } + + /// + /// Executes update operation to enable or disable administrative State for externalNetwork. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState + /// + /// + /// Operation Id + /// ExternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Executes update operation to enable or disable administrative State for externalNetwork. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateAdministrativeState + /// + /// + /// Operation Id + /// ExternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricExternalNetworkExternalNetworksRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Static Route BFD for external Network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// ExternalNetworks_UpdateStaticRouteBfdAdministrativeState + /// + /// + /// + /// 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> UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricExternalNetworkExternalNetworksRestClient.UpdateStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Static Route BFD for external Network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/externalNetworks/{externalNetworkName}/updateStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// ExternalNetworks_UpdateStaticRouteBfdAdministrativeState + /// + /// + /// + /// 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 UpdateStaticRouteBfdAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricExternalNetworkExternalNetworksClientDiagnostics.CreateScope("NetworkFabricExternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricExternalNetworkExternalNetworksRestClient.UpdateStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricExternalNetworkExternalNetworksClientDiagnostics, Pipeline, _networkFabricExternalNetworkExternalNetworksRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityCollection.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityCollection.cs index d6bb7ee8450f6..5424f91e0b30f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityCollection.cs @@ -20,28 +20,28 @@ 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 GetIPCommunities method from an instance of . + /// 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 GetNetworkFabricIPCommunities method from an instance of . /// - public partial class IPCommunityCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricIPCommunityCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _ipCommunityIPCommunitiesClientDiagnostics; - private readonly IpCommunitiesRestOperations _ipCommunityIPCommunitiesRestClient; + private readonly ClientDiagnostics _networkFabricIPCommunityIPCommunitiesClientDiagnostics; + private readonly IpCommunitiesRestOperations _networkFabricIPCommunityIPCommunitiesRestClient; - /// Initializes a new instance of the class for mocking. - protected IPCommunityCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPCommunityCollection() { } - /// Initializes a new instance of the class. + /// 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 IPCommunityCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPCommunityCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipCommunityIPCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPCommunityResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(IPCommunityResource.ResourceType, out string ipCommunityIPCommunitiesApiVersion); - _ipCommunityIPCommunitiesRestClient = new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipCommunityIPCommunitiesApiVersion); + _networkFabricIPCommunityIPCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPCommunityResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricIPCommunityResource.ResourceType, out string networkFabricIPCommunityIPCommunitiesApiVersion); + _networkFabricIPCommunityIPCommunitiesRestClient = new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPCommunityIPCommunitiesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 ipCommunityName, IPCommunityData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ipCommunityName, NetworkFabricIPCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.CreateOrUpdate"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPCommunityOperationSource(Client), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPCommunityOperationSource(Client), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdateAsync /// 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 ipCommunityName, IPCommunityData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ipCommunityName, NetworkFabricIPCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.CreateOrUpdate"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.CreateOrUpdate"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPCommunityOperationSource(Client), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPCommunityOperationSource(Client), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string ipCommunityName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string ipCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.Get"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.Get"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string ipCommu /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string ipCommunityName, CancellationToken cancellationToken = default) + public virtual Response Get(string ipCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.Get"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.Get"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -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 @@ -223,16 +223,16 @@ public virtual Response Get(string ipCommunityName, Cancell /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipCommunityIPCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipCommunityIPCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPCommunityResource(Client, IPCommunityData.DeserializeIPCommunityData(e)), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, "IPCommunityCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPCommunityIPCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPCommunityIPCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPCommunityResource(Client, NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(e)), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, "NetworkFabricIPCommunityCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Implements IpCommunities list by resource group GET method. + /// Implements IP Communities list by resource group GET method. /// /// /// Request Path @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipCommunityIPCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipCommunityIPCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPCommunityResource(Client, IPCommunityData.DeserializeIPCommunityData(e)), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, "IPCommunityCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPCommunityIPCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPCommunityIPCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPCommunityResource(Client, NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(e)), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, "NetworkFabricIPCommunityCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string ipCommunityName, Ca { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.Exists"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.Exists"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string ipCommunityName, CancellationToken c { Argument.AssertNotNullOrEmpty(ipCommunityName, nameof(ipCommunityName)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityCollection.Exists"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityCollection.Exists"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken: cancellationToken); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipCommunityName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string ipCommunityName, CancellationToken c } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityData.cs new file mode 100644 index 0000000000000..72638618e51de --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityData.cs @@ -0,0 +1,60 @@ +// 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 NetworkFabricIPCommunity data model. + /// The IP Community resource definition. + /// + public partial class NetworkFabricIPCommunityData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricIPCommunityData. + /// The location. + public NetworkFabricIPCommunityData(AzureLocation location) : base(location) + { + IPCommunityRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricIPCommunityData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// List of IP Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkFabricIPCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipCommunityRules, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + IPCommunityRules = ipCommunityRules; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// List of IP Community Rules. + public IList IPCommunityRules { get; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.cs similarity index 71% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.cs index 622adf33b84fc..b453c816ce112 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing an IPCommunity 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 GetIPCommunityResource method. - /// Otherwise you can get one from its parent resource using the GetIPCommunity method. + /// A Class representing a NetworkFabricIPCommunity 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 GetNetworkFabricIPCommunityResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricIPCommunity method. /// - public partial class IPCommunityResource : ArmResource + public partial class NetworkFabricIPCommunityResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string ipCommunityName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipCommunities/{ipCommunityName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _ipCommunityIPCommunitiesClientDiagnostics; - private readonly IpCommunitiesRestOperations _ipCommunityIPCommunitiesRestClient; - private readonly IPCommunityData _data; + private readonly ClientDiagnostics _networkFabricIPCommunityIPCommunitiesClientDiagnostics; + private readonly IpCommunitiesRestOperations _networkFabricIPCommunityIPCommunitiesRestClient; + private readonly NetworkFabricIPCommunityData _data; - /// Initializes a new instance of the class for mocking. - protected IPCommunityResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPCommunityResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal IPCommunityResource(ArmClient client, IPCommunityData data) : this(client, data.Id) + internal NetworkFabricIPCommunityResource(ArmClient client, NetworkFabricIPCommunityData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 IPCommunityResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPCommunityResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipCommunityIPCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string ipCommunityIPCommunitiesApiVersion); - _ipCommunityIPCommunitiesRestClient = new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipCommunityIPCommunitiesApiVersion); + _networkFabricIPCommunityIPCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricIPCommunityIPCommunitiesApiVersion); + _networkFabricIPCommunityIPCommunitiesRestClient = new IpCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPCommunityIPCommunitiesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal IPCommunityResource(ArmClient client, ResourceIdentifier id) : base(cli /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual IPCommunityData Data + public virtual NetworkFabricIPCommunityData Data { get { @@ -103,16 +103,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Get"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Get"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -135,16 +135,16 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Get"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Get"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,12 +170,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Delete"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Delete"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Delete"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Delete"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -238,16 +238,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// IP Community properties to update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, IPCommunityPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricIPCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Update"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Update"); scope.Start(); try { - var response = await _ipCommunityIPCommunitiesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPCommunityOperationSource(Client), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPCommunityIPCommunitiesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPCommunityOperationSource(Client), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -276,16 +276,16 @@ public virtual async Task> UpdateAsync(WaitUnt /// IP Community properties to update. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, IPCommunityPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricIPCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.Update"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.Update"); scope.Start(); try { - var response = _ipCommunityIPCommunitiesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPCommunityOperationSource(Client), _ipCommunityIPCommunitiesClientDiagnostics, Pipeline, _ipCommunityIPCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPCommunityIPCommunitiesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPCommunityOperationSource(Client), _networkFabricIPCommunityIPCommunitiesClientDiagnostics, Pipeline, _networkFabricIPCommunityIPCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -314,12 +314,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, IPC /// 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) + 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 = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.AddTag"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.AddTag"); scope.Start(); try { @@ -328,13 +328,13 @@ public virtual async Task> AddTagAsync(string key, 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 _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -368,12 +368,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.AddTag"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.AddTag"); scope.Start(); try { @@ -382,13 +382,13 @@ public virtual Response AddTag(string key, string value, Ca var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -421,11 +421,11 @@ public virtual Response AddTag(string key, string value, Ca /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.SetTags"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.SetTags"); scope.Start(); try { @@ -435,13 +435,13 @@ public virtual async Task> SetTagsAsync(IDictionar 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 _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -470,11 +470,11 @@ public virtual async Task> SetTagsAsync(IDictionar /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.SetTags"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.SetTags"); scope.Start(); try { @@ -484,13 +484,13 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -519,11 +519,11 @@ public virtual Response SetTags(IDictionary /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.RemoveTag"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.RemoveTag"); scope.Start(); try { @@ -532,13 +532,13 @@ public virtual async Task> RemoveTagAsync(string k 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 _ipCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPCommunityIPCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -571,11 +571,11 @@ public virtual async Task> RemoveTagAsync(string k /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipCommunityIPCommunitiesClientDiagnostics.CreateScope("IPCommunityResource.RemoveTag"); + using var scope = _networkFabricIPCommunityIPCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPCommunityResource.RemoveTag"); scope.Start(); try { @@ -584,13 +584,13 @@ public virtual Response RemoveTag(string key, CancellationT var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPCommunityIPCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPCommunityPatch(); + var patch = new NetworkFabricIPCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityCollection.cs similarity index 62% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityCollection.cs index 67cabfc53435a..59136806f695f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityCollection.cs @@ -20,28 +20,28 @@ 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 GetIPExtendedCommunities method from an instance of . + /// 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 GetNetworkFabricIPExtendedCommunities method from an instance of . /// - public partial class IPExtendedCommunityCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricIPExtendedCommunityCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics; - private readonly IpExtendedCommunitiesRestOperations _ipExtendedCommunityIPExtendedCommunitiesRestClient; + private readonly ClientDiagnostics _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics; + private readonly IpExtendedCommunitiesRestOperations _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient; - /// Initializes a new instance of the class for mocking. - protected IPExtendedCommunityCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPExtendedCommunityCollection() { } - /// Initializes a new instance of the class. + /// 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 IPExtendedCommunityCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPExtendedCommunityCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPExtendedCommunityResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(IPExtendedCommunityResource.ResourceType, out string ipExtendedCommunityIPExtendedCommunitiesApiVersion); - _ipExtendedCommunityIPExtendedCommunitiesRestClient = new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipExtendedCommunityIPExtendedCommunitiesApiVersion); + _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPExtendedCommunityResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricIPExtendedCommunityResource.ResourceType, out string networkFabricIPExtendedCommunityIPExtendedCommunitiesApiVersion); + _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient = new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPExtendedCommunityIPExtendedCommunitiesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 ipExtendedCommunityName, IPExtendedCommunityData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.CreateOrUpdate"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPExtendedCommunityOperationSource(Client), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPExtendedCommunityOperationSource(Client), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpd /// 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 ipExtendedCommunityName, IPExtendedCommunityData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.CreateOrUpdate"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.CreateOrUpdate"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPExtendedCommunityOperationSource(Client), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPExtendedCommunityOperationSource(Client), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string ipExtendedCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.Get"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.Get"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public virtual Response Get(string ipExtendedCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.Get"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.Get"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string ipExtendedCommun /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPExtendedCommunityResource(Client, IPExtendedCommunityData.DeserializeIPExtendedCommunityData(e)), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, "IPExtendedCommunityCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPExtendedCommunityResource(Client, NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(e)), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, "NetworkFabricIPExtendedCommunityCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPExtendedCommunityResource(Client, IPExtendedCommunityData.DeserializeIPExtendedCommunityData(e)), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, "IPExtendedCommunityCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPExtendedCommunityResource(Client, NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(e)), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, "NetworkFabricIPExtendedCommunityCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string ipExtendedCommunity { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.Exists"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.Exists"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string ipExtendedCommunityName, Cancellatio { Argument.AssertNotNullOrEmpty(ipExtendedCommunityName, nameof(ipExtendedCommunityName)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityCollection.Exists"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityCollection.Exists"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken: cancellationToken); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipExtendedCommunityName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string ipExtendedCommunityName, Cancellatio } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityData.cs new file mode 100644 index 0000000000000..7f78a0cf7c795 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityData.cs @@ -0,0 +1,66 @@ +// 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 NetworkFabricIPExtendedCommunity data model. + /// The IP Extended Community resource definition. + /// + public partial class NetworkFabricIPExtendedCommunityData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricIPExtendedCommunityData. + /// The location. + /// List of IP Extended Community Rules. + /// is null. + public NetworkFabricIPExtendedCommunityData(AzureLocation location, IEnumerable ipExtendedCommunityRules) : base(location) + { + Argument.AssertNotNull(ipExtendedCommunityRules, nameof(ipExtendedCommunityRules)); + + IPExtendedCommunityRules = ipExtendedCommunityRules.ToList(); + } + + /// Initializes a new instance of NetworkFabricIPExtendedCommunityData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// List of IP Extended Community Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkFabricIPExtendedCommunityData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipExtendedCommunityRules, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + IPExtendedCommunityRules = ipExtendedCommunityRules; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// List of IP Extended Community Rules. + public IList IPExtendedCommunityRules { get; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.cs similarity index 69% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.cs index d7bf5db228947..cfa045c8d9500 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPExtendedCommunityResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing an IPExtendedCommunity 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 GetIPExtendedCommunityResource method. - /// Otherwise you can get one from its parent resource using the GetIPExtendedCommunity method. + /// A Class representing a NetworkFabricIPExtendedCommunity 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 GetNetworkFabricIPExtendedCommunityResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricIPExtendedCommunity method. /// - public partial class IPExtendedCommunityResource : ArmResource + public partial class NetworkFabricIPExtendedCommunityResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/{ipExtendedCommunityName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics; - private readonly IpExtendedCommunitiesRestOperations _ipExtendedCommunityIPExtendedCommunitiesRestClient; - private readonly IPExtendedCommunityData _data; + private readonly ClientDiagnostics _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics; + private readonly IpExtendedCommunitiesRestOperations _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient; + private readonly NetworkFabricIPExtendedCommunityData _data; - /// Initializes a new instance of the class for mocking. - protected IPExtendedCommunityResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPExtendedCommunityResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal IPExtendedCommunityResource(ArmClient client, IPExtendedCommunityData data) : this(client, data.Id) + internal NetworkFabricIPExtendedCommunityResource(ArmClient client, NetworkFabricIPExtendedCommunityData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 IPExtendedCommunityResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPExtendedCommunityResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string ipExtendedCommunityIPExtendedCommunitiesApiVersion); - _ipExtendedCommunityIPExtendedCommunitiesRestClient = new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipExtendedCommunityIPExtendedCommunitiesApiVersion); + _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricIPExtendedCommunityIPExtendedCommunitiesApiVersion); + _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient = new IpExtendedCommunitiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPExtendedCommunityIPExtendedCommunitiesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal IPExtendedCommunityResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual IPExtendedCommunityData Data + public virtual NetworkFabricIPExtendedCommunityData Data { get { @@ -103,16 +103,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Get"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Get"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -135,16 +135,16 @@ public virtual async Task> GetAsync(Cancel /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Get"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Get"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,12 +170,12 @@ public virtual Response Get(CancellationToken cance /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Delete"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Delete"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Delete"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Delete"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -238,16 +238,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// IP Extended Community properties to update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, IPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricIPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Update"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Update"); scope.Start(); try { - var response = await _ipExtendedCommunityIPExtendedCommunitiesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPExtendedCommunityOperationSource(Client), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPExtendedCommunityOperationSource(Client), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -276,16 +276,16 @@ public virtual async Task> UpdateAsync /// IP Extended Community properties to update. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, IPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricIPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.Update"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.Update"); scope.Start(); try { - var response = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPExtendedCommunityOperationSource(Client), _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _ipExtendedCommunityIPExtendedCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPExtendedCommunityOperationSource(Client), _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics, Pipeline, _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -314,12 +314,12 @@ public virtual ArmOperation Update(WaitUntil waitUn /// 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) + 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 = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.AddTag"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.AddTag"); scope.Start(); try { @@ -328,13 +328,13 @@ public virtual async Task> AddTagAsync(str 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 _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPExtendedCommunityPatch(); + var patch = new NetworkFabricIPExtendedCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -368,12 +368,12 @@ public virtual async Task> AddTagAsync(str /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.AddTag"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.AddTag"); scope.Start(); try { @@ -382,13 +382,13 @@ public virtual Response AddTag(string key, string v var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPExtendedCommunityPatch(); + var patch = new NetworkFabricIPExtendedCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -421,11 +421,11 @@ public virtual Response AddTag(string key, string v /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.SetTags"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.SetTags"); scope.Start(); try { @@ -435,13 +435,13 @@ public virtual async Task> SetTagsAsync(ID 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 _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPExtendedCommunityPatch(); + var patch = new NetworkFabricIPExtendedCommunityPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -470,11 +470,11 @@ public virtual async Task> SetTagsAsync(ID /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.SetTags"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.SetTags"); scope.Start(); try { @@ -484,13 +484,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.RemoveTag"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.RemoveTag"); scope.Start(); try { @@ -532,13 +532,13 @@ public virtual async Task> RemoveTagAsync( 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 _ipExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPExtendedCommunityPatch(); + var patch = new NetworkFabricIPExtendedCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -571,11 +571,11 @@ public virtual async Task> RemoveTagAsync( /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("IPExtendedCommunityResource.RemoveTag"); + using var scope = _networkFabricIPExtendedCommunityIPExtendedCommunitiesClientDiagnostics.CreateScope("NetworkFabricIPExtendedCommunityResource.RemoveTag"); scope.Start(); try { @@ -584,13 +584,13 @@ public virtual Response RemoveTag(string key, Cance var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPExtendedCommunityIPExtendedCommunitiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPExtendedCommunityResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPExtendedCommunityPatch(); + var patch = new NetworkFabricIPExtendedCommunityPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixCollection.cs similarity index 65% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixCollection.cs index e8f208277b56e..edeb2c620c1cf 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixCollection.cs @@ -20,28 +20,28 @@ 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 GetIPPrefixes method from an instance of . + /// 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 GetNetworkFabricIPPrefixes method from an instance of . /// - public partial class IPPrefixCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricIPPrefixCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _ipPrefixIPPrefixesClientDiagnostics; - private readonly IpPrefixesRestOperations _ipPrefixIPPrefixesRestClient; + private readonly ClientDiagnostics _networkFabricIPPrefixIPPrefixesClientDiagnostics; + private readonly IpPrefixesRestOperations _networkFabricIPPrefixIPPrefixesRestClient; - /// Initializes a new instance of the class for mocking. - protected IPPrefixCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPPrefixCollection() { } - /// Initializes a new instance of the class. + /// 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 IPPrefixCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPPrefixCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipPrefixIPPrefixesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", IPPrefixResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(IPPrefixResource.ResourceType, out string ipPrefixIPPrefixesApiVersion); - _ipPrefixIPPrefixesRestClient = new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipPrefixIPPrefixesApiVersion); + _networkFabricIPPrefixIPPrefixesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricIPPrefixResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricIPPrefixResource.ResourceType, out string networkFabricIPPrefixIPPrefixesApiVersion); + _networkFabricIPPrefixIPPrefixesRestClient = new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPPrefixIPPrefixesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 ipPrefixName, IPPrefixData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ipPrefixName, NetworkFabricIPPrefixData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.CreateOrUpdate"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPPrefixOperationSource(Client), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPPrefixOperationSource(Client), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// 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 ipPrefixName, IPPrefixData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ipPrefixName, NetworkFabricIPPrefixData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.CreateOrUpdate"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.CreateOrUpdate"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPPrefixOperationSource(Client), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPPrefixOperationSource(Client), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string ipPrefixName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string ipPrefixName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.Get"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.Get"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPPrefixResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string ipPrefixNa /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string ipPrefixName, CancellationToken cancellationToken = default) + public virtual Response Get(string ipPrefixName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.Get"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.Get"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPPrefixResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string ipPrefixName, CancellationT /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipPrefixIPPrefixesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipPrefixIPPrefixesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new IPPrefixResource(Client, IPPrefixData.DeserializeIPPrefixData(e)), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, "IPPrefixCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPPrefixIPPrefixesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPPrefixIPPrefixesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPPrefixResource(Client, NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(e)), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, "NetworkFabricIPPrefixCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _ipPrefixIPPrefixesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ipPrefixIPPrefixesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new IPPrefixResource(Client, IPPrefixData.DeserializeIPPrefixData(e)), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, "IPPrefixCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricIPPrefixIPPrefixesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricIPPrefixIPPrefixesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricIPPrefixResource(Client, NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(e)), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, "NetworkFabricIPPrefixCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string ipPrefixName, Cance { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.Exists"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.Exists"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string ipPrefixName, CancellationToken canc { Argument.AssertNotNullOrEmpty(ipPrefixName, nameof(ipPrefixName)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixCollection.Exists"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixCollection.Exists"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken: cancellationToken); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, ipPrefixName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string ipPrefixName, CancellationToken canc } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixData.cs new file mode 100644 index 0000000000000..c8278a1a23216 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixData.cs @@ -0,0 +1,60 @@ +// 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 NetworkFabricIPPrefix data model. + /// The IP Prefix resource definition. + /// + public partial class NetworkFabricIPPrefixData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricIPPrefixData. + /// The location. + public NetworkFabricIPPrefixData(AzureLocation location) : base(location) + { + IPPrefixRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricIPPrefixData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// The list of IP Prefix Rules. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkFabricIPPrefixData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList ipPrefixRules, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? 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; } + /// The list of IP Prefix Rules. + public IList IPPrefixRules { get; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.cs similarity index 72% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.cs index 50d88c2d66522..1faa6a95446c2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/IPPrefixResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing an IPPrefix 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 GetIPPrefixResource method. - /// Otherwise you can get one from its parent resource using the GetIPPrefix method. + /// A Class representing a NetworkFabricIPPrefix 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 GetNetworkFabricIPPrefixResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricIPPrefix method. /// - public partial class IPPrefixResource : ArmResource + public partial class NetworkFabricIPPrefixResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string ipPrefixName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/{ipPrefixName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _ipPrefixIPPrefixesClientDiagnostics; - private readonly IpPrefixesRestOperations _ipPrefixIPPrefixesRestClient; - private readonly IPPrefixData _data; + private readonly ClientDiagnostics _networkFabricIPPrefixIPPrefixesClientDiagnostics; + private readonly IpPrefixesRestOperations _networkFabricIPPrefixIPPrefixesRestClient; + private readonly NetworkFabricIPPrefixData _data; - /// Initializes a new instance of the class for mocking. - protected IPPrefixResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricIPPrefixResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal IPPrefixResource(ArmClient client, IPPrefixData data) : this(client, data.Id) + internal NetworkFabricIPPrefixResource(ArmClient client, NetworkFabricIPPrefixData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 IPPrefixResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricIPPrefixResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _ipPrefixIPPrefixesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string ipPrefixIPPrefixesApiVersion); - _ipPrefixIPPrefixesRestClient = new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ipPrefixIPPrefixesApiVersion); + _networkFabricIPPrefixIPPrefixesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricIPPrefixIPPrefixesApiVersion); + _networkFabricIPPrefixIPPrefixesRestClient = new IpPrefixesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricIPPrefixIPPrefixesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal IPPrefixResource(ArmClient client, ResourceIdentifier id) : base(client /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual IPPrefixData Data + public virtual NetworkFabricIPPrefixData Data { get { @@ -103,16 +103,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Get"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Get"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPPrefixResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -135,16 +135,16 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Get"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Get"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new IPPrefixResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,12 +170,12 @@ public virtual Response Get(CancellationToken cancellationToke /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Delete"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Delete"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Delete"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Delete"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -238,16 +238,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// IP Prefix properties to update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, IPPrefixPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricIPPrefixPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Update"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Update"); scope.Start(); try { - var response = await _ipPrefixIPPrefixesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new IPPrefixOperationSource(Client), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricIPPrefixIPPrefixesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPPrefixOperationSource(Client), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -276,16 +276,16 @@ public virtual async Task> UpdateAsync(WaitUntil /// IP Prefix properties to update. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, IPPrefixPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricIPPrefixPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.Update"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.Update"); scope.Start(); try { - var response = _ipPrefixIPPrefixesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new IPPrefixOperationSource(Client), _ipPrefixIPPrefixesClientDiagnostics, Pipeline, _ipPrefixIPPrefixesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricIPPrefixIPPrefixesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricIPPrefixOperationSource(Client), _networkFabricIPPrefixIPPrefixesClientDiagnostics, Pipeline, _networkFabricIPPrefixIPPrefixesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -314,12 +314,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, IPPref /// 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) + 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 = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.AddTag"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.AddTag"); scope.Start(); try { @@ -328,13 +328,13 @@ public virtual async Task> AddTagAsync(string key, st 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 _ipPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPPrefixPatch(); + var patch = new NetworkFabricIPPrefixPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -368,12 +368,12 @@ public virtual async Task> AddTagAsync(string key, st /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.AddTag"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.AddTag"); scope.Start(); try { @@ -382,13 +382,13 @@ public virtual Response AddTag(string key, string value, Cance var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPPrefixPatch(); + var patch = new NetworkFabricIPPrefixPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -421,11 +421,11 @@ public virtual Response AddTag(string key, string value, Cance /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.SetTags"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.SetTags"); scope.Start(); try { @@ -435,13 +435,13 @@ public virtual async Task> SetTagsAsync(IDictionary> SetTagsAsync(IDictionary The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.SetTags"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.SetTags"); scope.Start(); try { @@ -484,13 +484,13 @@ public virtual Response SetTags(IDictionary ta var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPPrefixPatch(); + var patch = new NetworkFabricIPPrefixPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -519,11 +519,11 @@ public virtual Response SetTags(IDictionary ta /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.RemoveTag"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.RemoveTag"); scope.Start(); try { @@ -532,13 +532,13 @@ public virtual async Task> RemoveTagAsync(string key, 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 _ipPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new IPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricIPPrefixIPPrefixesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new IPPrefixPatch(); + var patch = new NetworkFabricIPPrefixPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -571,11 +571,11 @@ public virtual async Task> RemoveTagAsync(string key, /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _ipPrefixIPPrefixesClientDiagnostics.CreateScope("IPPrefixResource.RemoveTag"); + using var scope = _networkFabricIPPrefixIPPrefixesClientDiagnostics.CreateScope("NetworkFabricIPPrefixResource.RemoveTag"); scope.Start(); try { @@ -584,13 +584,13 @@ public virtual Response RemoveTag(string key, CancellationToke var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _ipPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new IPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricIPPrefixIPPrefixesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricIPPrefixResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new IPPrefixPatch(); + var patch = new NetworkFabricIPPrefixPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkCollection.cs similarity index 61% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkCollection.cs index c2a864bdadf03..c1c0543dfc0d8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/InternalNetworkCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkCollection.cs @@ -19,28 +19,28 @@ 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 GetInternalNetworks method from an instance of . + /// 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 GetNetworkFabricInternalNetworks method from an instance of . /// - public partial class InternalNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricInternalNetworkCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _internalNetworkClientDiagnostics; - private readonly InternalNetworksRestOperations _internalNetworkRestClient; + private readonly ClientDiagnostics _networkFabricInternalNetworkInternalNetworksClientDiagnostics; + private readonly InternalNetworksRestOperations _networkFabricInternalNetworkInternalNetworksRestClient; - /// Initializes a new instance of the class for mocking. - protected InternalNetworkCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternalNetworkCollection() { } - /// Initializes a new instance of the class. + /// 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 InternalNetworkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricInternalNetworkCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _internalNetworkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", InternalNetworkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(InternalNetworkResource.ResourceType, out string internalNetworkApiVersion); - _internalNetworkRestClient = new InternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, internalNetworkApiVersion); + _networkFabricInternalNetworkInternalNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricInternalNetworkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricInternalNetworkResource.ResourceType, out string networkFabricInternalNetworkInternalNetworksApiVersion); + _networkFabricInternalNetworkInternalNetworksRestClient = new InternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternalNetworkInternalNetworksApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -48,8 +48,8 @@ internal InternalNetworkCollection(ArmClient client, ResourceIdentifier id) : ba internal static void ValidateResourceId(ResourceIdentifier id) { - if (id.ResourceType != L3IsolationDomainResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, L3IsolationDomainResource.ResourceType), nameof(id)); + if (id.ResourceType != NetworkFabricL3IsolationDomainResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetworkFabricL3IsolationDomainResource.ResourceType), nameof(id)); } /// @@ -66,22 +66,22 @@ 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. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string internalNetworkName, InternalNetworkData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string internalNetworkName, NetworkFabricInternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.CreateOrUpdate"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _internalNetworkRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternalNetworkOperationSource(Client), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -107,22 +107,22 @@ 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. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string internalNetworkName, InternalNetworkData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string internalNetworkName, NetworkFabricInternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.CreateOrUpdate"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.CreateOrUpdate"); scope.Start(); try { - var response = _internalNetworkRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new InternalNetworkOperationSource(Client), _internalNetworkClientDiagnostics, Pipeline, _internalNetworkRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternalNetworkOperationSource(Client), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -147,22 +147,22 @@ 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. - public virtual async Task> GetAsync(string internalNetworkName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string internalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.Get"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.Get"); scope.Start(); try { - var response = await _internalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new InternalNetworkResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternalNetworkResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -184,22 +184,22 @@ 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. - public virtual Response Get(string internalNetworkName, CancellationToken cancellationToken = default) + public virtual Response Get(string internalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.Get"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.Get"); scope.Start(); try { - var response = _internalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken); + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new InternalNetworkResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternalNetworkResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -217,17 +217,17 @@ public virtual Response Get(string internalNetworkName, /// /// /// Operation Id - /// InternalNetworks_List + /// InternalNetworks_ListByL3IsolationDomain /// /// /// /// 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) + /// 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); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new InternalNetworkResource(Client, InternalNetworkData.DeserializeInternalNetworkData(e)), _internalNetworkClientDiagnostics, Pipeline, "InternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricInternalNetworkInternalNetworksRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternalNetworkInternalNetworksRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternalNetworkResource(Client, NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(e)), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, "NetworkFabricInternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -239,17 +239,17 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Operation Id - /// InternalNetworks_List + /// InternalNetworks_ListByL3IsolationDomain /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// 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); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new InternalNetworkResource(Client, InternalNetworkData.DeserializeInternalNetworkData(e)), _internalNetworkClientDiagnostics, Pipeline, "InternalNetworkCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricInternalNetworkInternalNetworksRestClient.CreateListByL3IsolationDomainRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternalNetworkInternalNetworksRestClient.CreateListByL3IsolationDomainNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternalNetworkResource(Client, NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(e)), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, "NetworkFabricInternalNetworkCollection.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. @@ -273,11 +273,11 @@ public virtual async Task> ExistsAsync(string internalNetworkName { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.Exists"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.Exists"); scope.Start(); try { - var response = await _internalNetworkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -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. @@ -308,11 +308,11 @@ public virtual Response Exists(string internalNetworkName, CancellationTok { Argument.AssertNotNullOrEmpty(internalNetworkName, nameof(internalNetworkName)); - using var scope = _internalNetworkClientDiagnostics.CreateScope("InternalNetworkCollection.Exists"); + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkCollection.Exists"); scope.Start(); try { - var response = _internalNetworkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken: cancellationToken); + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, internalNetworkName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -322,7 +322,7 @@ public virtual Response Exists(string internalNetworkName, CancellationTok } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -332,7 +332,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkData.cs new file mode 100644 index 0000000000000..d4ec30a56ff43 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkData.cs @@ -0,0 +1,112 @@ +// 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 NetworkFabricInternalNetwork data model. + /// Defines the Internal Network resource. + /// + public partial class NetworkFabricInternalNetworkData : ResourceData + { + /// Initializes a new instance of NetworkFabricInternalNetworkData. + /// Vlan identifier. Example: 1001. + public NetworkFabricInternalNetworkData(int vlanId) + { + ConnectedIPv4Subnets = new ChangeTrackingList(); + ConnectedIPv6Subnets = new ChangeTrackingList(); + VlanId = vlanId; + } + + /// Initializes a new instance of NetworkFabricInternalNetworkData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Switch configuration description. + /// Maximum transmission unit. Default value is 1500. + /// 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. + internal NetworkFabricInternalNetworkData(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, StaticRouteConfigurationExtension? extension, int vlanId, InternalNetworkBgpConfiguration bgpConfiguration, InternalNetworkStaticRouteConfiguration staticRouteConfiguration, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData) + { + Annotation = annotation; + Mtu = mtu; + ConnectedIPv4Subnets = connectedIPv4Subnets; + ConnectedIPv6Subnets = connectedIPv6Subnets; + ImportRoutePolicyId = importRoutePolicyId; + ExportRoutePolicyId = exportRoutePolicyId; + 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 of Connected IPv4 Subnets. + public IList ConnectedIPv4Subnets { get; } + /// List of connected IPv6 Subnets. + public IList ConnectedIPv6Subnets { 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 StaticRouteConfigurationExtension? Extension { get; set; } + /// Vlan identifier. Example: 1001. + public int VlanId { get; set; } + /// BGP configuration properties. + public InternalNetworkBgpConfiguration BgpConfiguration { get; set; } + /// Static Route Configuration properties. + public InternalNetworkStaticRouteConfiguration StaticRouteConfiguration { get; set; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.cs new file mode 100644 index 0000000000000..141c54b1022b0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.cs @@ -0,0 +1,526 @@ +// 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.ManagedNetworkFabric.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A Class representing a NetworkFabricInternalNetwork 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 GetNetworkFabricInternalNetworkResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricInternalNetwork method. + /// + public partial class NetworkFabricInternalNetworkResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkFabricInternalNetworkInternalNetworksClientDiagnostics; + private readonly InternalNetworksRestOperations _networkFabricInternalNetworkInternalNetworksRestClient; + private readonly NetworkFabricInternalNetworkData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternalNetworkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricInternalNetworkResource(ArmClient client, NetworkFabricInternalNetworkData 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 NetworkFabricInternalNetworkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricInternalNetworkInternalNetworksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricInternalNetworkInternalNetworksApiVersion); + _networkFabricInternalNetworkInternalNetworksRestClient = new InternalNetworksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternalNetworkInternalNetworksApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/l3IsolationDomains/internalNetworks"; + + /// 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 NetworkFabricInternalNetworkData 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 a InternalNetworks. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternalNetworkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a InternalNetworks. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Get"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternalNetworkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements InternalNetworks DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_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 = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, 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 InternalNetworks DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_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 = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a InternalNetworks. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_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. + /// InternalNetwork properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricInternalNetworkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternalNetworkOperationSource(Client), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.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; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a InternalNetworks. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName} + /// + /// + /// Operation Id + /// InternalNetworks_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. + /// InternalNetwork properties to update. Only annotations are supported. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricInternalNetworkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.Update"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternalNetworkOperationSource(Client), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.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; + } + } + + /// + /// Update Administrative state of InternalNetworks on resources referred by their resource ids. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Administrative state of InternalNetworks on resources referred by their resource ids. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update BGP state for internalNetwork. Allowed only on edge devices. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateBgpAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.UpdateBgpAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update BGP state for internalNetwork. Allowed only on edge devices. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateBgpAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateBgpAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.UpdateBgpAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateBgpAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Static Route BFD administrative state for internalNetwork. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_UpdateStaticRouteBfdAdministrativeState + /// + /// + /// + /// 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> UpdateStaticRouteBfdAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricInternalNetworkInternalNetworksRestClient.UpdateStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Static Route BFD administrative state for internalNetwork. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}/internalNetworks/{internalNetworkName}/updateStaticRouteBfdAdministrativeState + /// + /// + /// Operation Id + /// InternalNetworks_UpdateStaticRouteBfdAdministrativeState + /// + /// + /// + /// 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 UpdateStaticRouteBfdAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricInternalNetworkInternalNetworksClientDiagnostics.CreateScope("NetworkFabricInternalNetworkResource.UpdateStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricInternalNetworkInternalNetworksRestClient.UpdateStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricInternalNetworkInternalNetworksClientDiagnostics, Pipeline, _networkFabricInternalNetworkInternalNetworksRestClient.CreateUpdateStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayCollection.cs new file mode 100644 index 0000000000000..218b337ed53b5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayCollection.cs @@ -0,0 +1,259 @@ +// 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 GetNetworkFabricInternetGateways method from an instance of . + /// + public partial class NetworkFabricInternetGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkFabricInternetGatewayInternetGatewaysClientDiagnostics; + private readonly InternetGatewaysRestOperations _networkFabricInternetGatewayInternetGatewaysRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternetGatewayCollection() + { + } + + /// 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 NetworkFabricInternetGatewayCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricInternetGatewayInternetGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricInternetGatewayResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricInternetGatewayResource.ResourceType, out string networkFabricInternetGatewayInternetGatewaysApiVersion); + _networkFabricInternetGatewayInternetGatewaysRestClient = new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternetGatewayInternetGatewaysApiVersion); +#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 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 = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayCollection.Get"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayInternetGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayResource(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 = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayCollection.Get"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayInternetGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayResource(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) => _networkFabricInternetGatewayInternetGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternetGatewayInternetGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayResource(Client, NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(e)), _networkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, "NetworkFabricInternetGatewayCollection.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) => _networkFabricInternetGatewayInternetGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternetGatewayInternetGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayResource(Client, NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(e)), _networkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, "NetworkFabricInternetGatewayCollection.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 = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayCollection.Exists"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayInternetGatewaysRestClient.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 = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayCollection.Exists"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayInternetGatewaysRestClient.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/NetworkFabricInternetGatewayData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayData.cs new file mode 100644 index 0000000000000..f91d6b851cc1e --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayData.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Net; +using Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkFabricInternetGateway data model. + /// The Internet Gateway resource definition. + /// + public partial class NetworkFabricInternetGatewayData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricInternetGatewayData. + /// The location. + /// Gateway Type of the resource. + /// ARM Resource ID of the Network Fabric Controller. + /// is null. + public NetworkFabricInternetGatewayData(AzureLocation location, InternetGatewayType typePropertiesType, ResourceIdentifier networkFabricControllerId) : base(location) + { + Argument.AssertNotNull(networkFabricControllerId, nameof(networkFabricControllerId)); + + TypePropertiesType = typePropertiesType; + NetworkFabricControllerId = networkFabricControllerId; + } + + /// Initializes a new instance of NetworkFabricInternetGatewayData. + /// 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 NetworkFabricInternetGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ResourceIdentifier internetGatewayRuleId, IPAddress ipv4Address, int? port, InternetGatewayType typePropertiesType, ResourceIdentifier networkFabricControllerId, NetworkFabricProvisioningState? 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 IPAddress IPv4Address { get; } + /// Port number of Internet Gateway. + public int? Port { get; } + /// Gateway Type of the resource. + public InternetGatewayType TypePropertiesType { get; set; } + /// ARM Resource ID of the Network Fabric Controller. + public ResourceIdentifier NetworkFabricControllerId { get; set; } + /// Provisioning state of resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.cs similarity index 58% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.cs index 4a5a57b1a0b0b..f9d03c329b8dc 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/AccessControlListResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.cs @@ -20,60 +20,60 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing an AccessControlList 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 GetAccessControlListResource method. - /// Otherwise you can get one from its parent resource using the GetAccessControlList method. + /// A Class representing a NetworkFabricInternetGateway 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 GetNetworkFabricInternetGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricInternetGateway method. /// - public partial class AccessControlListResource : ArmResource + public partial class NetworkFabricInternetGatewayResource : ArmResource { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accessControlListName) + /// 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/accessControlLists/{accessControlListName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _accessControlListClientDiagnostics; - private readonly AccessControlListsRestOperations _accessControlListRestClient; - private readonly AccessControlListData _data; + private readonly ClientDiagnostics _networkFabricInternetGatewayInternetGatewaysClientDiagnostics; + private readonly InternetGatewaysRestOperations _networkFabricInternetGatewayInternetGatewaysRestClient; + private readonly NetworkFabricInternetGatewayData _data; - /// Initializes a new instance of the class for mocking. - protected AccessControlListResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternetGatewayResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal AccessControlListResource(ArmClient client, AccessControlListData data) : this(client, data.Id) + internal NetworkFabricInternetGatewayResource(ArmClient client, NetworkFabricInternetGatewayData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 AccessControlListResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricInternetGatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _accessControlListClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string accessControlListApiVersion); - _accessControlListRestClient = new AccessControlListsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, accessControlListApiVersion); + _networkFabricInternetGatewayInternetGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricInternetGatewayInternetGatewaysApiVersion); + _networkFabricInternetGatewayInternetGatewaysRestClient = new InternetGatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternetGatewayInternetGatewaysApiVersion); #if DEBUG ValidateResourceId(Id); #endif } /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/accessControlLists"; + 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 AccessControlListData Data + public virtual NetworkFabricInternetGatewayData Data { get { @@ -90,29 +90,29 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Implements Access Control List GET method. + /// Implements Gateway GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Get"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.Get"); scope.Start(); try { - var response = await _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricInternetGatewayInternetGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -122,29 +122,29 @@ public virtual async Task> GetAsync(Cancella } /// - /// Implements Access Control List GET method. + /// Implements Gateway GET method. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Get"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.Get"); scope.Start(); try { - var response = _accessControlListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricInternetGatewayInternetGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -154,99 +154,35 @@ public virtual Response Get(CancellationToken cancell } /// - /// Implements Access Control List DELETE method. + /// Execute patch on Network Fabric Service Internet Gateway. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Delete + /// 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. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Delete"); - scope.Start(); - try - { - var response = await _accessControlListRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Implements Access Control List DELETE method. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} - /// - /// - /// Operation Id - /// AccessControlLists_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 = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Delete"); - scope.Start(); - try - { - var response = _accessControlListRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// API to update certain properties of the Access Control List resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} - /// - /// - /// Operation Id - /// AccessControlLists_Update - /// - /// - /// - /// Access Control List properties to update. + /// API to update certain properties of the L2 Isolation Domain resource.. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(AccessControlListPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricInternetGatewayPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Update"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.Update"); scope.Start(); 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 response = await _networkFabricInternetGatewayInternetGatewaysRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayOperationSource(Client), _networkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, _networkFabricInternetGatewayInternetGatewaysRestClient.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) { @@ -256,31 +192,35 @@ public virtual async Task> UpdateAsync(Acces } /// - /// API to update certain properties of the Access Control List resource. + /// Execute patch on Network Fabric Service Internet Gateway. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Update + /// InternetGateways_Update /// /// /// - /// Access Control List properties to 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 Response Update(AccessControlListPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricInternetGatewayPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.Update"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.Update"); scope.Start(); try { - var response = _accessControlListRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new AccessControlListResource(Client, response.Value), response.GetRawResponse()); + var response = _networkFabricInternetGatewayInternetGatewaysRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayOperationSource(Client), _networkFabricInternetGatewayInternetGatewaysClientDiagnostics, Pipeline, _networkFabricInternetGatewayInternetGatewaysRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -294,11 +234,11 @@ public virtual Response Update(AccessControlListPatch /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// @@ -306,12 +246,12 @@ public virtual Response Update(AccessControlListPatch /// 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) + 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 = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.AddTag"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.AddTag"); scope.Start(); try { @@ -320,20 +260,20 @@ public virtual async Task> AddTagAsync(strin 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 _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricInternetGatewayInternetGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AccessControlListPatch(); + var patch = new NetworkFabricInternetGatewayPatch(); foreach (var tag in current.Tags) { 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) @@ -348,11 +288,11 @@ public virtual async Task> AddTagAsync(strin /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// @@ -360,12 +300,12 @@ public virtual async Task> AddTagAsync(strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.AddTag"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.AddTag"); scope.Start(); try { @@ -374,20 +314,20 @@ public virtual Response AddTag(string key, string val var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _accessControlListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new AccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricInternetGatewayInternetGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AccessControlListPatch(); + var patch = new NetworkFabricInternetGatewayPatch(); foreach (var tag in current.Tags) { 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) @@ -402,22 +342,22 @@ public virtual Response AddTag(string key, string val /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.SetTags"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.SetTags"); scope.Start(); try { @@ -427,16 +367,16 @@ public virtual async Task> SetTagsAsync(IDic 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 _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricInternetGatewayInternetGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AccessControlListPatch(); + var patch = new NetworkFabricInternetGatewayPatch(); 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) @@ -451,22 +391,22 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// 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) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.SetTags"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.SetTags"); scope.Start(); try { @@ -476,16 +416,16 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.RemoveTag"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.RemoveTag"); scope.Start(); try { @@ -524,20 +464,20 @@ public virtual async Task> RemoveTagAsync(st 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 _accessControlListRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new AccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricInternetGatewayInternetGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AccessControlListPatch(); + var patch = new NetworkFabricInternetGatewayPatch(); foreach (var tag in current.Tags) { 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) @@ -552,22 +492,22 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/accessControlLists/{accessControlListName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/internetGateways/{internetGatewayName} /// /// /// Operation Id - /// AccessControlLists_Get + /// InternetGateways_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _accessControlListClientDiagnostics.CreateScope("AccessControlListResource.RemoveTag"); + using var scope = _networkFabricInternetGatewayInternetGatewaysClientDiagnostics.CreateScope("NetworkFabricInternetGatewayResource.RemoveTag"); scope.Start(); try { @@ -576,20 +516,20 @@ public virtual Response RemoveTag(string key, Cancell var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _accessControlListRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new AccessControlListResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricInternetGatewayInternetGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricInternetGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AccessControlListPatch(); + var patch = new NetworkFabricInternetGatewayPatch(); foreach (var tag in current.Tags) { 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/NetworkFabricInternetGatewayRuleCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleCollection.cs new file mode 100644 index 0000000000000..0332b551ab5f9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleCollection.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 GetNetworkFabricInternetGatewayRules method from an instance of . + /// + public partial class NetworkFabricInternetGatewayRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics; + private readonly InternetGatewayRulesRestOperations _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternetGatewayRuleCollection() + { + } + + /// 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 NetworkFabricInternetGatewayRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricInternetGatewayRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricInternetGatewayRuleResource.ResourceType, out string networkFabricInternetGatewayRuleInternetGatewayRulesApiVersion); + _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient = new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternetGatewayRuleInternetGatewayRulesApiVersion); +#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, NetworkFabricInternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayRuleOperationSource(Client), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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, NetworkFabricInternetGatewayRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(internetGatewayRuleName, nameof(internetGatewayRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayRuleOperationSource(Client), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.Get"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.Get"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, internetGatewayRuleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(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) => _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayRuleResource(Client, NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(e)), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, "NetworkFabricInternetGatewayRuleCollection.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) => _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricInternetGatewayRuleResource(Client, NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(e)), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, "NetworkFabricInternetGatewayRuleCollection.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleCollection.Exists"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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/NetworkFabricInternetGatewayRuleData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleData.cs new file mode 100644 index 0000000000000..7343dde1cdfc5 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleData.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 NetworkFabricInternetGatewayRule data model. + /// The Internet Gateway Rule resource definition. + /// + public partial class NetworkFabricInternetGatewayRuleData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricInternetGatewayRuleData. + /// The location. + /// Rules for the InternetGateways. + /// is null. + public NetworkFabricInternetGatewayRuleData(AzureLocation location, InternetGatewayRules ruleProperties) : base(location) + { + Argument.AssertNotNull(ruleProperties, nameof(ruleProperties)); + + RuleProperties = ruleProperties; + InternetGatewayIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricInternetGatewayRuleData. + /// 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 NetworkFabricInternetGatewayRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, InternetGatewayRules ruleProperties, NetworkFabricProvisioningState? 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 InternetGatewayRules RuleProperties { get; set; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// List of Internet Gateway resource Id. + public IReadOnlyList InternetGatewayIds { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.cs new file mode 100644 index 0000000000000..9706348fc9440 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.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 NetworkFabricInternetGatewayRule 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 GetNetworkFabricInternetGatewayRuleResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricInternetGatewayRule method. + /// + public partial class NetworkFabricInternetGatewayRuleResource : 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 _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics; + private readonly InternetGatewayRulesRestOperations _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient; + private readonly NetworkFabricInternetGatewayRuleData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricInternetGatewayRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricInternetGatewayRuleResource(ArmClient client, NetworkFabricInternetGatewayRuleData 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 NetworkFabricInternetGatewayRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricInternetGatewayRuleInternetGatewayRulesApiVersion); + _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient = new InternetGatewayRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricInternetGatewayRuleInternetGatewayRulesApiVersion); +#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 NetworkFabricInternetGatewayRuleData 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Get"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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, NetworkFabricInternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayRuleOperationSource(Client), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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, NetworkFabricInternetGatewayRulePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.Update"); + scope.Start(); + try + { + var response = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricInternetGatewayRuleOperationSource(Client), _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics, Pipeline, _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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 = _networkFabricInternetGatewayRuleInternetGatewayRulesClientDiagnostics.CreateScope("NetworkFabricInternetGatewayRuleResource.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 = _networkFabricInternetGatewayRuleInternetGatewayRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricInternetGatewayRuleResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricInternetGatewayRulePatch(); + 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/L2IsolationDomainCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainCollection.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainCollection.cs index 4d8d0198af67d..7f603a2bc69db 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainCollection.cs @@ -20,28 +20,28 @@ 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 GetL2IsolationDomains method from an instance of . + /// 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 GetNetworkFabricL2IsolationDomains method from an instance of . /// - public partial class L2IsolationDomainCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricL2IsolationDomainCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _l2IsolationDomainClientDiagnostics; - private readonly L2IsolationDomainsRestOperations _l2IsolationDomainRestClient; + private readonly ClientDiagnostics _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics; + private readonly L2IsolationDomainsRestOperations _networkFabricL2IsolationDomainL2IsolationDomainsRestClient; - /// Initializes a new instance of the class for mocking. - protected L2IsolationDomainCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricL2IsolationDomainCollection() { } - /// Initializes a new instance of the class. + /// 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 L2IsolationDomainCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricL2IsolationDomainCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _l2IsolationDomainClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", L2IsolationDomainResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(L2IsolationDomainResource.ResourceType, out string l2IsolationDomainApiVersion); - _l2IsolationDomainRestClient = new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, l2IsolationDomainApiVersion); + _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricL2IsolationDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricL2IsolationDomainResource.ResourceType, out string networkFabricL2IsolationDomainL2IsolationDomainsApiVersion); + _networkFabricL2IsolationDomainL2IsolationDomainsRestClient = new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricL2IsolationDomainL2IsolationDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 l2IsolationDomainName, L2IsolationDomainData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string l2IsolationDomainName, NetworkFabricL2IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.CreateOrUpdate"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new L2IsolationDomainOperationSource(Client), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL2IsolationDomainOperationSource(Client), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdat /// 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 l2IsolationDomainName, L2IsolationDomainData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string l2IsolationDomainName, NetworkFabricL2IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.CreateOrUpdate"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.CreateOrUpdate"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new L2IsolationDomainOperationSource(Client), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL2IsolationDomainOperationSource(Client), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string l2IsolationDomainName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.Get"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.Get"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string l /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string l2IsolationDomainName, CancellationToken cancellationToken = default) + public virtual Response Get(string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.Get"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.Get"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string l2IsolationDomainN /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _l2IsolationDomainRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _l2IsolationDomainRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new L2IsolationDomainResource(Client, L2IsolationDomainData.DeserializeL2IsolationDomainData(e)), _l2IsolationDomainClientDiagnostics, Pipeline, "L2IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL2IsolationDomainResource(Client, NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(e)), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, "NetworkFabricL2IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _l2IsolationDomainRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _l2IsolationDomainRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new L2IsolationDomainResource(Client, L2IsolationDomainData.DeserializeL2IsolationDomainData(e)), _l2IsolationDomainClientDiagnostics, Pipeline, "L2IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL2IsolationDomainResource(Client, NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(e)), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, "NetworkFabricL2IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string l2IsolationDomainNa { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.Exists"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.Exists"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string l2IsolationDomainName, CancellationT { Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainCollection.Exists"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainCollection.Exists"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken: cancellationToken); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l2IsolationDomainName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string l2IsolationDomainName, CancellationT } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainData.cs new file mode 100644 index 0000000000000..ff31d9473a5cc --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainData.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 NetworkFabricL2IsolationDomain data model. + /// The L2 Isolation Domain resource definition. + /// + public partial class NetworkFabricL2IsolationDomainData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricL2IsolationDomainData. + /// The location. + /// ARM Resource ID of the Network Fabric. + /// Vlan Identifier of the Network Fabric. Example: 501. + /// is null. + public NetworkFabricL2IsolationDomainData(AzureLocation location, ResourceIdentifier networkFabricId, int vlanId) : base(location) + { + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + NetworkFabricId = networkFabricId; + VlanId = vlanId; + } + + /// Initializes a new instance of NetworkFabricL2IsolationDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// 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 NetworkFabricL2IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, ResourceIdentifier networkFabricId, int vlanId, int? mtu, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + NetworkFabricId = networkFabricId; + VlanId = vlanId; + Mtu = mtu; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// 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; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.cs similarity index 62% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.cs index 4cff2ee8094e7..0c702dec40e94 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L2IsolationDomainResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing a L2IsolationDomain 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 GetL2IsolationDomainResource method. - /// Otherwise you can get one from its parent resource using the GetL2IsolationDomain method. + /// A Class representing a NetworkFabricL2IsolationDomain 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 GetNetworkFabricL2IsolationDomainResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricL2IsolationDomain method. /// - public partial class L2IsolationDomainResource : ArmResource + public partial class NetworkFabricL2IsolationDomainResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l2IsolationDomainName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l2IsolationDomains/{l2IsolationDomainName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _l2IsolationDomainClientDiagnostics; - private readonly L2IsolationDomainsRestOperations _l2IsolationDomainRestClient; - private readonly L2IsolationDomainData _data; + private readonly ClientDiagnostics _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics; + private readonly L2IsolationDomainsRestOperations _networkFabricL2IsolationDomainL2IsolationDomainsRestClient; + private readonly NetworkFabricL2IsolationDomainData _data; - /// Initializes a new instance of the class for mocking. - protected L2IsolationDomainResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricL2IsolationDomainResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal L2IsolationDomainResource(ArmClient client, L2IsolationDomainData data) : this(client, data.Id) + internal NetworkFabricL2IsolationDomainResource(ArmClient client, NetworkFabricL2IsolationDomainData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 L2IsolationDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricL2IsolationDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _l2IsolationDomainClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string l2IsolationDomainApiVersion); - _l2IsolationDomainRestClient = new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, l2IsolationDomainApiVersion); + _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricL2IsolationDomainL2IsolationDomainsApiVersion); + _networkFabricL2IsolationDomainL2IsolationDomainsRestClient = new L2IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricL2IsolationDomainL2IsolationDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal L2IsolationDomainResource(ArmClient client, ResourceIdentifier id) : ba /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual L2IsolationDomainData Data + public virtual NetworkFabricL2IsolationDomainData Data { get { @@ -103,16 +103,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Get"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Get"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -135,16 +135,16 @@ public virtual async Task> GetAsync(Cancella /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Get"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Get"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,12 +170,12 @@ public virtual Response Get(CancellationToken cancell /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Delete"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Delete"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Delete"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Delete"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -238,16 +238,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// 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, L2IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricL2IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Update"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Update"); scope.Start(); try { - var response = await _l2IsolationDomainRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new L2IsolationDomainOperationSource(Client), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL2IsolationDomainOperationSource(Client), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -276,16 +276,16 @@ public virtual async Task> UpdateAsync(W /// API to update certain properties of the L2 Isolation Domain resource.. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, L2IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricL2IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.Update"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.Update"); scope.Start(); try { - var response = _l2IsolationDomainRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new L2IsolationDomainOperationSource(Client), _l2IsolationDomainClientDiagnostics, Pipeline, _l2IsolationDomainRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL2IsolationDomainOperationSource(Client), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -311,21 +311,21 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// 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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.UpdateAdministrativeState"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.UpdateAdministrativeState"); scope.Start(); 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 response = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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) @@ -349,97 +349,21 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// 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 = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.UpdateAdministrativeState"); - scope.Start(); - 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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ClearArpTable(WaitUntil waitUntil, EnableDisableOnResources body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.ClearArpTable"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.UpdateAdministrativeState"); 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 response = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.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 _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.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 = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.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 = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.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 = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.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 _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.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 = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.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 = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.CreateCommitConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -610,12 +526,12 @@ public virtual ArmOperation> GetArpEntries(Wa /// 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) + 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 = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.AddTag"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.AddTag"); scope.Start(); try { @@ -624,13 +540,13 @@ public virtual async Task> AddTagAsync(strin 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 _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L2IsolationDomainPatch(); + var patch = new NetworkFabricL2IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -664,12 +580,12 @@ public virtual async Task> AddTagAsync(strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.AddTag"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.AddTag"); scope.Start(); try { @@ -678,13 +594,13 @@ public virtual Response AddTag(string key, string val var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _l2IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new L2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new L2IsolationDomainPatch(); + var patch = new NetworkFabricL2IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -717,11 +633,11 @@ public virtual Response AddTag(string key, string val /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.SetTags"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.SetTags"); scope.Start(); try { @@ -731,13 +647,13 @@ public virtual async Task> SetTagsAsync(IDic 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 _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L2IsolationDomainPatch(); + var patch = new NetworkFabricL2IsolationDomainPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -766,11 +682,11 @@ public virtual async Task> SetTagsAsync(IDic /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.SetTags"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.SetTags"); scope.Start(); try { @@ -780,13 +696,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.RemoveTag"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.RemoveTag"); scope.Start(); try { @@ -828,13 +744,13 @@ public virtual async Task> RemoveTagAsync(st 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 _l2IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L2IsolationDomainPatch(); + var patch = new NetworkFabricL2IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -867,11 +783,11 @@ public virtual async Task> RemoveTagAsync(st /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _l2IsolationDomainClientDiagnostics.CreateScope("L2IsolationDomainResource.RemoveTag"); + using var scope = _networkFabricL2IsolationDomainL2IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL2IsolationDomainResource.RemoveTag"); scope.Start(); try { @@ -880,13 +796,13 @@ public virtual Response RemoveTag(string key, Cancell var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _l2IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new L2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricL2IsolationDomainL2IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricL2IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new L2IsolationDomainPatch(); + var patch = new NetworkFabricL2IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainCollection.cs similarity index 63% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainCollection.cs index 222b6275148e1..af1b790829e1b 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainCollection.cs @@ -20,28 +20,28 @@ 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 GetL3IsolationDomains method from an instance of . + /// 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 GetNetworkFabricL3IsolationDomains method from an instance of . /// - public partial class L3IsolationDomainCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricL3IsolationDomainCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _l3IsolationDomainClientDiagnostics; - private readonly L3IsolationDomainsRestOperations _l3IsolationDomainRestClient; + private readonly ClientDiagnostics _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics; + private readonly L3IsolationDomainsRestOperations _networkFabricL3IsolationDomainL3IsolationDomainsRestClient; - /// Initializes a new instance of the class for mocking. - protected L3IsolationDomainCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricL3IsolationDomainCollection() { } - /// Initializes a new instance of the class. + /// 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 L3IsolationDomainCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricL3IsolationDomainCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _l3IsolationDomainClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", L3IsolationDomainResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(L3IsolationDomainResource.ResourceType, out string l3IsolationDomainApiVersion); - _l3IsolationDomainRestClient = new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, l3IsolationDomainApiVersion); + _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricL3IsolationDomainResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricL3IsolationDomainResource.ResourceType, out string networkFabricL3IsolationDomainL3IsolationDomainsApiVersion); + _networkFabricL3IsolationDomainL3IsolationDomainsRestClient = new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricL3IsolationDomainL3IsolationDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 l3IsolationDomainName, L3IsolationDomainData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string l3IsolationDomainName, NetworkFabricL3IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.CreateOrUpdate"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new L3IsolationDomainOperationSource(Client), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL3IsolationDomainOperationSource(Client), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdat /// 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 l3IsolationDomainName, L3IsolationDomainData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string l3IsolationDomainName, NetworkFabricL3IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.CreateOrUpdate"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.CreateOrUpdate"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new L3IsolationDomainOperationSource(Client), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL3IsolationDomainOperationSource(Client), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string l3IsolationDomainName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.Get"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.Get"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string l /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string l3IsolationDomainName, CancellationToken cancellationToken = default) + public virtual Response Get(string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.Get"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.Get"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string l3IsolationDomainN /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _l3IsolationDomainRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _l3IsolationDomainRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new L3IsolationDomainResource(Client, L3IsolationDomainData.DeserializeL3IsolationDomainData(e)), _l3IsolationDomainClientDiagnostics, Pipeline, "L3IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL3IsolationDomainResource(Client, NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(e)), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, "NetworkFabricL3IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _l3IsolationDomainRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _l3IsolationDomainRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new L3IsolationDomainResource(Client, L3IsolationDomainData.DeserializeL3IsolationDomainData(e)), _l3IsolationDomainClientDiagnostics, Pipeline, "L3IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricL3IsolationDomainResource(Client, NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(e)), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, "NetworkFabricL3IsolationDomainCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string l3IsolationDomainNa { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.Exists"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.Exists"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string l3IsolationDomainName, CancellationT { Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainCollection.Exists"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainCollection.Exists"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken: cancellationToken); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, l3IsolationDomainName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string l3IsolationDomainName, CancellationT } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainData.cs new file mode 100644 index 0000000000000..e085f093b89c4 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainData.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 Azure.Core; +using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ManagedNetworkFabric +{ + /// + /// A class representing the NetworkFabricL3IsolationDomain data model. + /// The L3 Isolation Domain resource definition. + /// + public partial class NetworkFabricL3IsolationDomainData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricL3IsolationDomainData. + /// The location. + /// ARM Resource ID of the Network Fabric. + /// is null. + public NetworkFabricL3IsolationDomainData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) + { + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + NetworkFabricId = networkFabricId; + } + + /// Initializes a new instance of NetworkFabricL3IsolationDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Advertise Connected Subnets. Ex: "True" | "False". + /// Advertise Static Routes. Ex: "True" | "False". + /// Aggregate route configurations. + /// Connected Subnet RoutePolicy. + /// ARM Resource ID of the Network Fabric. + /// Configuration state of the resource. + /// Provisioning state of the resource. + /// Administrative state of the resource. + internal NetworkFabricL3IsolationDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, RedistributeConnectedSubnet? redistributeConnectedSubnets, RedistributeStaticRoute? redistributeStaticRoutes, AggregateRouteConfiguration aggregateRouteConfiguration, ConnectedSubnetRoutePolicy connectedSubnetRoutePolicy, ResourceIdentifier networkFabricId, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + RedistributeConnectedSubnets = redistributeConnectedSubnets; + RedistributeStaticRoutes = redistributeStaticRoutes; + AggregateRouteConfiguration = aggregateRouteConfiguration; + ConnectedSubnetRoutePolicy = connectedSubnetRoutePolicy; + NetworkFabricId = networkFabricId; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// 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; } + /// Aggregate route configurations. + public AggregateRouteConfiguration AggregateRouteConfiguration { get; set; } + /// Connected Subnet RoutePolicy. + public ConnectedSubnetRoutePolicy ConnectedSubnetRoutePolicy { get; set; } + /// ARM Resource ID of the Network Fabric. + public ResourceIdentifier NetworkFabricId { get; set; } + /// Configuration state of the resource. + public NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.cs similarity index 62% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.cs index 578dc22f27f09..9cd47592c9514 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/L3IsolationDomainResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.cs @@ -20,46 +20,46 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing a L3IsolationDomain 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 GetL3IsolationDomainResource method. - /// Otherwise you can get one from its parent resource using the GetL3IsolationDomain method. + /// A Class representing a NetworkFabricL3IsolationDomain 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 GetNetworkFabricL3IsolationDomainResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricL3IsolationDomain method. /// - public partial class L3IsolationDomainResource : ArmResource + public partial class NetworkFabricL3IsolationDomainResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string l3IsolationDomainName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/l3IsolationDomains/{l3IsolationDomainName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _l3IsolationDomainClientDiagnostics; - private readonly L3IsolationDomainsRestOperations _l3IsolationDomainRestClient; - private readonly L3IsolationDomainData _data; + private readonly ClientDiagnostics _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics; + private readonly L3IsolationDomainsRestOperations _networkFabricL3IsolationDomainL3IsolationDomainsRestClient; + private readonly NetworkFabricL3IsolationDomainData _data; - /// Initializes a new instance of the class for mocking. - protected L3IsolationDomainResource() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricL3IsolationDomainResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal L3IsolationDomainResource(ArmClient client, L3IsolationDomainData data) : this(client, data.Id) + internal NetworkFabricL3IsolationDomainResource(ArmClient client, NetworkFabricL3IsolationDomainData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 L3IsolationDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricL3IsolationDomainResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _l3IsolationDomainClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string l3IsolationDomainApiVersion); - _l3IsolationDomainRestClient = new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, l3IsolationDomainApiVersion); + _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricL3IsolationDomainL3IsolationDomainsApiVersion); + _networkFabricL3IsolationDomainL3IsolationDomainsRestClient = new L3IsolationDomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricL3IsolationDomainL3IsolationDomainsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -73,7 +73,7 @@ internal L3IsolationDomainResource(ArmClient client, ResourceIdentifier id) : ba /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual L3IsolationDomainData Data + public virtual NetworkFabricL3IsolationDomainData Data { get { @@ -89,11 +89,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of InternalNetworkResources in the L3IsolationDomain. - /// An object representing collection of InternalNetworkResources and their operations over a InternalNetworkResource. - public virtual InternalNetworkCollection GetInternalNetworks() + /// Gets a collection of NetworkFabricInternalNetworkResources in the NetworkFabricL3IsolationDomain. + /// An object representing collection of NetworkFabricInternalNetworkResources and their operations over a NetworkFabricInternalNetworkResource. + public virtual NetworkFabricInternalNetworkCollection GetNetworkFabricInternalNetworks() { - return GetCachedClient(Client => new InternalNetworkCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricInternalNetworkCollection(Client, Id)); } /// @@ -109,14 +109,14 @@ 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. [ForwardsClientCalls] - public virtual async Task> GetInternalNetworkAsync(string internalNetworkName, CancellationToken cancellationToken = default) + public virtual async Task> GetNetworkFabricInternalNetworkAsync(string internalNetworkName, CancellationToken cancellationToken = default) { - return await GetInternalNetworks().GetAsync(internalNetworkName, cancellationToken).ConfigureAwait(false); + return await GetNetworkFabricInternalNetworks().GetAsync(internalNetworkName, cancellationToken).ConfigureAwait(false); } /// @@ -132,21 +132,21 @@ 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. [ForwardsClientCalls] - public virtual Response GetInternalNetwork(string internalNetworkName, CancellationToken cancellationToken = default) + public virtual Response GetNetworkFabricInternalNetwork(string internalNetworkName, CancellationToken cancellationToken = default) { - return GetInternalNetworks().Get(internalNetworkName, cancellationToken); + return GetNetworkFabricInternalNetworks().Get(internalNetworkName, cancellationToken); } - /// Gets a collection of ExternalNetworkResources in the L3IsolationDomain. - /// An object representing collection of ExternalNetworkResources and their operations over a ExternalNetworkResource. - public virtual ExternalNetworkCollection GetExternalNetworks() + /// Gets a collection of NetworkFabricExternalNetworkResources in the NetworkFabricL3IsolationDomain. + /// An object representing collection of NetworkFabricExternalNetworkResources and their operations over a NetworkFabricExternalNetworkResource. + public virtual NetworkFabricExternalNetworkCollection GetNetworkFabricExternalNetworks() { - return GetCachedClient(Client => new ExternalNetworkCollection(Client, Id)); + return GetCachedClient(Client => new NetworkFabricExternalNetworkCollection(Client, Id)); } /// @@ -162,14 +162,14 @@ 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. [ForwardsClientCalls] - public virtual async Task> GetExternalNetworkAsync(string externalNetworkName, CancellationToken cancellationToken = default) + public virtual async Task> GetNetworkFabricExternalNetworkAsync(string externalNetworkName, CancellationToken cancellationToken = default) { - return await GetExternalNetworks().GetAsync(externalNetworkName, cancellationToken).ConfigureAwait(false); + return await GetNetworkFabricExternalNetworks().GetAsync(externalNetworkName, cancellationToken).ConfigureAwait(false); } /// @@ -185,14 +185,14 @@ 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. [ForwardsClientCalls] - public virtual Response GetExternalNetwork(string externalNetworkName, CancellationToken cancellationToken = default) + public virtual Response GetNetworkFabricExternalNetwork(string externalNetworkName, CancellationToken cancellationToken = default) { - return GetExternalNetworks().Get(externalNetworkName, cancellationToken); + return GetNetworkFabricExternalNetworks().Get(externalNetworkName, cancellationToken); } /// @@ -209,16 +209,16 @@ public virtual Response GetExternalNetwork(string exter /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Get"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Get"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -241,16 +241,16 @@ public virtual async Task> GetAsync(Cancella /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Get"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Get"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new L3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -276,12 +276,12 @@ public virtual Response Get(CancellationToken cancell /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Delete"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Delete"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -310,12 +310,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Delete"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Delete"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -344,16 +344,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// API to update certain properties of the L3 Isolation Domain resource. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, L3IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricL3IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Update"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Update"); scope.Start(); try { - var response = await _l3IsolationDomainRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new L3IsolationDomainOperationSource(Client), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL3IsolationDomainOperationSource(Client), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -382,16 +382,16 @@ public virtual async Task> UpdateAsync(W /// API to update certain properties of the L3 Isolation Domain resource. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, L3IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricL3IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.Update"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.Update"); scope.Start(); try { - var response = _l3IsolationDomainRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new L3IsolationDomainOperationSource(Client), _l3IsolationDomainClientDiagnostics, Pipeline, _l3IsolationDomainRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricL3IsolationDomainOperationSource(Client), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -417,21 +417,21 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// 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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual async Task UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAdministrativeStateAsync(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.UpdateAdministrativeState"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.UpdateAdministrativeState"); scope.Start(); 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 response = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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) @@ -455,97 +455,21 @@ public virtual async Task UpdateAdministrativeStateAsync(WaitUntil /// /// /// 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 = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.UpdateAdministrativeState"); - scope.Start(); - 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. + /// Request payload. /// The cancellation token to use. - /// is null. - public virtual ArmOperation UpdateOptionBAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation UpdateAdministrativeState(WaitUntil waitUntil, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.UpdateOptionBAdministrativeState"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.UpdateAdministrativeState"); 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 response = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.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 _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.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 = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.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 = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.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 = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.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 _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.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 = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.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 = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics, Pipeline, _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.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) @@ -724,12 +632,12 @@ public virtual ArmOperation ClearNeighborTable(WaitUntil waitUntil, EnableDisabl /// 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) + 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 = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.AddTag"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.AddTag"); scope.Start(); try { @@ -738,13 +646,13 @@ public virtual async Task> AddTagAsync(strin 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 _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L3IsolationDomainPatch(); + var patch = new NetworkFabricL3IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -778,12 +686,12 @@ public virtual async Task> AddTagAsync(strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.AddTag"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.AddTag"); scope.Start(); try { @@ -792,13 +700,13 @@ public virtual Response AddTag(string key, string val var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _l3IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new L3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new L3IsolationDomainPatch(); + var patch = new NetworkFabricL3IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -831,11 +739,11 @@ public virtual Response AddTag(string key, string val /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.SetTags"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.SetTags"); scope.Start(); try { @@ -845,13 +753,13 @@ public virtual async Task> SetTagsAsync(IDic 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 _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L3IsolationDomainPatch(); + var patch = new NetworkFabricL3IsolationDomainPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -880,11 +788,11 @@ public virtual async Task> SetTagsAsync(IDic /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.SetTags"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.SetTags"); scope.Start(); try { @@ -894,13 +802,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.RemoveTag"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.RemoveTag"); scope.Start(); try { @@ -942,13 +850,13 @@ public virtual async Task> RemoveTagAsync(st 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 _l3IsolationDomainRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new L3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new L3IsolationDomainPatch(); + var patch = new NetworkFabricL3IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -981,11 +889,11 @@ public virtual async Task> RemoveTagAsync(st /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _l3IsolationDomainClientDiagnostics.CreateScope("L3IsolationDomainResource.RemoveTag"); + using var scope = _networkFabricL3IsolationDomainL3IsolationDomainsClientDiagnostics.CreateScope("NetworkFabricL3IsolationDomainResource.RemoveTag"); scope.Start(); try { @@ -994,13 +902,13 @@ public virtual Response RemoveTag(string key, Cancell var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _l3IsolationDomainRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new L3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _networkFabricL3IsolationDomainL3IsolationDomainsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricL3IsolationDomainResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new L3IsolationDomainPatch(); + var patch = new NetworkFabricL3IsolationDomainPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupCollection.cs new file mode 100644 index 0000000000000..5556a69851e3a --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupCollection.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 GetNetworkFabricNeighborGroups method from an instance of . + /// + public partial class NetworkFabricNeighborGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkFabricNeighborGroupNeighborGroupsClientDiagnostics; + private readonly NeighborGroupsRestOperations _networkFabricNeighborGroupNeighborGroupsRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricNeighborGroupCollection() + { + } + + /// 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 NetworkFabricNeighborGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricNeighborGroupNeighborGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricNeighborGroupResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricNeighborGroupResource.ResourceType, out string networkFabricNeighborGroupNeighborGroupsApiVersion); + _networkFabricNeighborGroupNeighborGroupsRestClient = new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricNeighborGroupNeighborGroupsApiVersion); +#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, NetworkFabricNeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricNeighborGroupOperationSource(Client), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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, NetworkFabricNeighborGroupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neighborGroupName, nameof(neighborGroupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricNeighborGroupOperationSource(Client), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.Get"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricNeighborGroupResource(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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.Get"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, neighborGroupName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricNeighborGroupResource(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) => _networkFabricNeighborGroupNeighborGroupsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricNeighborGroupNeighborGroupsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricNeighborGroupResource(Client, NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(e)), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, "NetworkFabricNeighborGroupCollection.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) => _networkFabricNeighborGroupNeighborGroupsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricNeighborGroupNeighborGroupsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricNeighborGroupResource(Client, NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(e)), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, "NetworkFabricNeighborGroupCollection.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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.Exists"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupCollection.Exists"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.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/NetworkFabricNeighborGroupData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupData.cs new file mode 100644 index 0000000000000..936bc4130c8a9 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupData.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 NetworkFabricNeighborGroup data model. + /// Defines the Neighbor Group. + /// + public partial class NetworkFabricNeighborGroupData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricNeighborGroupData. + /// The location. + public NetworkFabricNeighborGroupData(AzureLocation location) : base(location) + { + NetworkTapIds = new ChangeTrackingList(); + NetworkTapRuleIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of NetworkFabricNeighborGroupData. + /// 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 NetworkFabricNeighborGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, NeighborGroupDestination destination, IReadOnlyList networkTapIds, IReadOnlyList networkTapRuleIds, NetworkFabricProvisioningState? 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 NetworkFabricProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.cs new file mode 100644 index 0000000000000..97336ef68192f --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.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 NetworkFabricNeighborGroup 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 GetNetworkFabricNeighborGroupResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricNeighborGroup method. + /// + public partial class NetworkFabricNeighborGroupResource : 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 _networkFabricNeighborGroupNeighborGroupsClientDiagnostics; + private readonly NeighborGroupsRestOperations _networkFabricNeighborGroupNeighborGroupsRestClient; + private readonly NetworkFabricNeighborGroupData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricNeighborGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricNeighborGroupResource(ArmClient client, NetworkFabricNeighborGroupData 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 NetworkFabricNeighborGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricNeighborGroupNeighborGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricNeighborGroupNeighborGroupsApiVersion); + _networkFabricNeighborGroupNeighborGroupsRestClient = new NeighborGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricNeighborGroupNeighborGroupsApiVersion); +#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 NetworkFabricNeighborGroupData 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricNeighborGroupResource(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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Get"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricNeighborGroupResource(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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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, NetworkFabricNeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricNeighborGroupNeighborGroupsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricNeighborGroupOperationSource(Client), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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, NetworkFabricNeighborGroupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.Update"); + scope.Start(); + try + { + var response = _networkFabricNeighborGroupNeighborGroupsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricNeighborGroupOperationSource(Client), _networkFabricNeighborGroupNeighborGroupsClientDiagnostics, Pipeline, _networkFabricNeighborGroupNeighborGroupsRestClient.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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 _networkFabricNeighborGroupNeighborGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 = _networkFabricNeighborGroupNeighborGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 _networkFabricNeighborGroupNeighborGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 = _networkFabricNeighborGroupNeighborGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 _networkFabricNeighborGroupNeighborGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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 = _networkFabricNeighborGroupNeighborGroupsClientDiagnostics.CreateScope("NetworkFabricNeighborGroupResource.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 = _networkFabricNeighborGroupNeighborGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricNeighborGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricNeighborGroupPatch(); + 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/NetworkFabricResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.cs index 03e171ef7d0eb..032b8574ed3ab 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 DeviceUpdateCommonPostActionResultOperationSource(), _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 DeviceUpdateCommonPostActionResultOperationSource(), _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 DeviceUpdateCommonPostActionResultOperationSource(), _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 DeviceUpdateCommonPostActionResultOperationSource(), _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, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Upgrade"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.Upgrade"); + scope.Start(); + try + { + var response = _networkFabricRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 StateUpdateCommonPostActionResultOperationSource(), _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 StateUpdateCommonPostActionResultOperationSource(), _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateWorkloadManagementBfdConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpdateWorkloadManagementBfdConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateWorkloadManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateWorkloadManagementBfdConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.UpdateWorkloadManagementBfdConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateWorkloadManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateInfraManagementBfdConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.UpdateInfraManagementBfdConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateInfraManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.UpdateInfraManagementBfdConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.UpdateInfraManagementBfdConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateUpdateInfraManagementBfdConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, ValidateConfigurationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, ValidateConfigurationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricClientDiagnostics.CreateScope("NetworkFabricResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricClientDiagnostics, Pipeline, _networkFabricRestClient.CreateValidateConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 ValidateConfigurationResultOperationSource(), _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 ValidateConfigurationResultOperationSource(), _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 StateUpdateCommonPostActionResultOperationSource(), _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 StateUpdateCommonPostActionResultOperationSource(), _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/RoutePolicyCollection.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyCollection.cs similarity index 64% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyCollection.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyCollection.cs index 629e88552fc0d..2cd12cb8dddac 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyCollection.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyCollection.cs @@ -20,28 +20,28 @@ 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 GetRoutePolicies method from an instance of . + /// 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 GetNetworkFabricRoutePolicies method from an instance of . /// - public partial class RoutePolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class NetworkFabricRoutePolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _routePolicyClientDiagnostics; - private readonly RoutePoliciesRestOperations _routePolicyRestClient; + private readonly ClientDiagnostics _networkFabricRoutePolicyRoutePoliciesClientDiagnostics; + private readonly RoutePoliciesRestOperations _networkFabricRoutePolicyRoutePoliciesRestClient; - /// Initializes a new instance of the class for mocking. - protected RoutePolicyCollection() + /// Initializes a new instance of the class for mocking. + protected NetworkFabricRoutePolicyCollection() { } - /// Initializes a new instance of the class. + /// 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 RoutePolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkFabricRoutePolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _routePolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", RoutePolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RoutePolicyResource.ResourceType, out string routePolicyApiVersion); - _routePolicyRestClient = new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, routePolicyApiVersion); + _networkFabricRoutePolicyRoutePoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", NetworkFabricRoutePolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkFabricRoutePolicyResource.ResourceType, out string networkFabricRoutePolicyRoutePoliciesApiVersion); + _networkFabricRoutePolicyRoutePoliciesRestClient = new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricRoutePolicyRoutePoliciesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,17 +72,17 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// 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 routePolicyName, RoutePolicyData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string routePolicyName, NetworkFabricRoutePolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.CreateOrUpdate"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _routePolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new RoutePolicyOperationSource(Client), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricRoutePolicyOperationSource(Client), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,17 +113,17 @@ public virtual async Task> CreateOrUpdateAsync /// 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 routePolicyName, RoutePolicyData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string routePolicyName, NetworkFabricRoutePolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.CreateOrUpdate"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.CreateOrUpdate"); scope.Start(); try { - var response = _routePolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new RoutePolicyOperationSource(Client), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricRoutePolicyOperationSource(Client), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -152,18 +152,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string routePolicyName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string routePolicyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.Get"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.Get"); scope.Start(); try { - var response = await _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken).ConfigureAwait(false); + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RoutePolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -189,18 +189,18 @@ public virtual async Task> GetAsync(string routePo /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string routePolicyName, CancellationToken cancellationToken = default) + public virtual Response Get(string routePolicyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.Get"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.Get"); scope.Start(); try { - var response = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken); + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RoutePolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -223,12 +223,12 @@ public virtual Response Get(string routePolicyName, Cancell /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _routePolicyRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _routePolicyRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RoutePolicyResource(Client, RoutePolicyData.DeserializeRoutePolicyData(e)), _routePolicyClientDiagnostics, Pipeline, "RoutePolicyCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricRoutePolicyRoutePoliciesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricRoutePolicyRoutePoliciesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricRoutePolicyResource(Client, NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(e)), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, "NetworkFabricRoutePolicyCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -245,12 +245,12 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _routePolicyRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _routePolicyRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RoutePolicyResource(Client, RoutePolicyData.DeserializeRoutePolicyData(e)), _routePolicyClientDiagnostics, Pipeline, "RoutePolicyCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkFabricRoutePolicyRoutePoliciesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkFabricRoutePolicyRoutePoliciesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkFabricRoutePolicyResource(Client, NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(e)), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, "NetworkFabricRoutePolicyCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -274,11 +274,11 @@ public virtual async Task> ExistsAsync(string routePolicyName, Ca { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.Exists"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.Exists"); scope.Start(); try { - var response = await _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -309,11 +309,11 @@ public virtual Response Exists(string routePolicyName, CancellationToken c { Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyCollection.Exists"); + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyCollection.Exists"); scope.Start(); try { - var response = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken: cancellationToken); + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, routePolicyName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -323,7 +323,7 @@ public virtual Response Exists(string routePolicyName, CancellationToken c } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -333,7 +333,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyData.cs new file mode 100644 index 0000000000000..97d61245d7c79 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyData.cs @@ -0,0 +1,74 @@ +// 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 NetworkFabricRoutePolicy data model. + /// The RoutePolicy resource definition. + /// + public partial class NetworkFabricRoutePolicyData : TrackedResourceData + { + /// Initializes a new instance of NetworkFabricRoutePolicyData. + /// The location. + /// Arm Resource ID of Network Fabric. + /// is null. + public NetworkFabricRoutePolicyData(AzureLocation location, ResourceIdentifier networkFabricId) : base(location) + { + Argument.AssertNotNull(networkFabricId, nameof(networkFabricId)); + + Statements = new ChangeTrackingList(); + NetworkFabricId = networkFabricId; + } + + /// Initializes a new instance of NetworkFabricRoutePolicyData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Switch configuration description. + /// Route Policy statements. + /// 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 NetworkFabricRoutePolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string annotation, IList statements, ResourceIdentifier networkFabricId, AddressFamilyType? addressFamilyType, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? administrativeState) : base(id, name, resourceType, systemData, tags, location) + { + Annotation = annotation; + Statements = statements; + NetworkFabricId = networkFabricId; + AddressFamilyType = addressFamilyType; + ConfigurationState = configurationState; + ProvisioningState = provisioningState; + AdministrativeState = administrativeState; + } + + /// Switch configuration description. + public string Annotation { get; set; } + /// Route Policy statements. + public IList Statements { get; } + /// 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 NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? AdministrativeState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.cs new file mode 100644 index 0000000000000..30c97acb0cbd7 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.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 NetworkFabricRoutePolicy 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 GetNetworkFabricRoutePolicyResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkFabricRoutePolicy method. + /// + public partial class NetworkFabricRoutePolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string routePolicyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkFabricRoutePolicyRoutePoliciesClientDiagnostics; + private readonly RoutePoliciesRestOperations _networkFabricRoutePolicyRoutePoliciesRestClient; + private readonly NetworkFabricRoutePolicyData _data; + + /// Initializes a new instance of the class for mocking. + protected NetworkFabricRoutePolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkFabricRoutePolicyResource(ArmClient client, NetworkFabricRoutePolicyData 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 NetworkFabricRoutePolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkFabricRoutePolicyRoutePoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkFabricRoutePolicyRoutePoliciesApiVersion); + _networkFabricRoutePolicyRoutePoliciesRestClient = new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkFabricRoutePolicyRoutePoliciesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ManagedNetworkFabric/routePolicies"; + + /// 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 NetworkFabricRoutePolicyData 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 Route Policy GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Get"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Route Policy GET method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Get"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Implements Route Policy DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Delete"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 Route Policy DELETE method. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Delete"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(_networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 Route Policy resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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. + /// Route Policy properties to update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkFabricRoutePolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Update"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricRoutePolicyOperationSource(Client), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 Route Policy resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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. + /// Route Policy properties to update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkFabricRoutePolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.Update"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new NetworkFabricRoutePolicyOperationSource(Client), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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; + } + } + + /// + /// 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.ValidateConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.ValidateConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.ValidateConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new ValidateConfigurationResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.CommitConfiguration"); + scope.Start(); + try + { + var response = await _networkFabricRoutePolicyRoutePoliciesRestClient.CommitConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.CommitConfiguration"); + scope.Start(); + try + { + var response = _networkFabricRoutePolicyRoutePoliciesRestClient.CommitConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkFabricRoutePolicyRoutePoliciesClientDiagnostics, Pipeline, _networkFabricRoutePolicyRoutePoliciesRestClient.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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 _networkFabricRoutePolicyRoutePoliciesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/routePolicies/{routePolicyName} + /// + /// + /// Operation Id + /// RoutePolicies_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 = _networkFabricRoutePolicyRoutePoliciesClientDiagnostics.CreateScope("NetworkFabricRoutePolicyResource.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 = _networkFabricRoutePolicyRoutePoliciesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new NetworkFabricRoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new NetworkFabricRoutePolicyPatch(); + 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/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..dd1ae6a2ee56e 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, NetworkFabricSkuType? typePropertiesType, int? maxComputeRacks, int? maximumServerCount, IReadOnlyList supportedVersions, string details, NetworkFabricProvisioningState? 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 NetworkFabricSkuType? 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. - public ProvisioningState? ProvisioningState { get; } + /// 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 NetworkFabricProvisioningState? 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/NetworkInterfaceData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs deleted file mode 100644 index 530773dca9725..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkInterfaceData.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing the NetworkInterface data model. - /// Defines the NetworkInterface resource. - /// - public partial class NetworkInterfaceData : ResourceData - { - /// Initializes a new instance of NetworkInterfaceData. - public NetworkInterfaceData() - { - } - - /// Initializes a new instance of NetworkInterfaceData. - /// The id. - /// The name. - /// 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. - /// 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) - { - Annotation = annotation; - PhysicalIdentifier = physicalIdentifier; - AdministrativeState = administrativeState; - ProvisioningState = provisioningState; - ConnectedTo = connectedTo; - InterfaceType = interfaceType; - IPv4Address = ipv4Address; - IPv6Address = ipv6Address; - } - - /// Switch configuration description. - public string Annotation { get; set; } - /// physicalIdentifier 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. - public string ConnectedTo { get; } - /// The Interface Type. Example: Management/Data. - public InterfaceType? InterfaceType { get; } - /// ipv4Address. - public string IPv4Address { get; } - /// ipv6Address. - public string IPv6Address { get; } - } -} 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..2a7a6d0f77e24 --- /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, NetworkFabricProvisioningState? 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 NetworkFabricProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs similarity index 66% rename from sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs rename to sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs index 44bd5710eea5a..0b7e6877df8e6 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyResource.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.cs @@ -20,60 +20,60 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { /// - /// A Class representing a RoutePolicy 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 GetRoutePolicyResource method. - /// Otherwise you can get one from its parent resource using the GetRoutePolicy method. + /// 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 RoutePolicyResource : ArmResource + public partial class NetworkPacketBrokerResource : ArmResource { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string routePolicyName) + /// 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/routePolicies/{routePolicyName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _routePolicyClientDiagnostics; - private readonly RoutePoliciesRestOperations _routePolicyRestClient; - private readonly RoutePolicyData _data; + private readonly ClientDiagnostics _networkPacketBrokerClientDiagnostics; + private readonly NetworkPacketBrokersRestOperations _networkPacketBrokerRestClient; + private readonly NetworkPacketBrokerData _data; - /// Initializes a new instance of the class for mocking. - protected RoutePolicyResource() + /// Initializes a new instance of the class for mocking. + protected NetworkPacketBrokerResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal RoutePolicyResource(ArmClient client, RoutePolicyData data) : this(client, data.Id) + internal NetworkPacketBrokerResource(ArmClient client, NetworkPacketBrokerData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 RoutePolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal NetworkPacketBrokerResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _routePolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ManagedNetworkFabric", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string routePolicyApiVersion); - _routePolicyRestClient = new RoutePoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, routePolicyApiVersion); + _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/routePolicies"; + 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 RoutePolicyData Data + public virtual NetworkPacketBrokerData Data { get { @@ -90,29 +90,29 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Implements Route Policy GET method. + /// Retrieves details of this Network Packet Broker. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Get"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Get"); scope.Start(); try { - var response = await _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + 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 RoutePolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -122,29 +122,29 @@ public virtual async Task> GetAsync(CancellationTo } /// - /// Implements Route Policy GET method. + /// Retrieves details of this Network Packet Broker. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Get"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Get"); scope.Start(); try { - var response = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _networkPacketBrokerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RoutePolicyResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new NetworkPacketBrokerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -154,15 +154,15 @@ public virtual Response Get(CancellationToken cancellationT } /// - /// Implements Route Policy DELETE method. + /// Deletes Network Packet Broker. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Delete + /// NetworkPacketBrokers_Delete /// /// /// @@ -170,12 +170,12 @@ public virtual Response Get(CancellationToken cancellationT /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Delete"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Delete"); scope.Start(); try { - var response = await _routePolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(_routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + 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; @@ -188,15 +188,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Implements Route Policy DELETE method. + /// Deletes Network Packet Broker. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Delete + /// NetworkPacketBrokers_Delete /// /// /// @@ -204,12 +204,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Delete"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Delete"); scope.Start(); try { - var response = _routePolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(_routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + 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; @@ -222,32 +222,32 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// API to update certain properties of the Route Policy resource. + /// API to update certain properties of the Network Packet Broker resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Update + /// 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. - /// Route Policy properties to update. + /// Network Packet Broker properties to update. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RoutePolicyPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Update"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Update"); scope.Start(); try { - var response = await _routePolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new ManagedNetworkFabricArmOperation(new RoutePolicyOperationSource(Client), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + 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; @@ -260,32 +260,32 @@ public virtual async Task> UpdateAsync(WaitUnt } /// - /// API to update certain properties of the Route Policy resource. + /// API to update certain properties of the Network Packet Broker resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Update + /// 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. - /// Route Policy properties to update. + /// Network Packet Broker properties to update. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RoutePolicyPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NetworkPacketBrokerPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.Update"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.Update"); scope.Start(); try { - var response = _routePolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new ManagedNetworkFabricArmOperation(new RoutePolicyOperationSource(Client), _routePolicyClientDiagnostics, Pipeline, _routePolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + 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; @@ -302,11 +302,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Rou /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// @@ -314,12 +314,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Rou /// 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) + 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 = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.AddTag"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.AddTag"); scope.Start(); try { @@ -328,13 +328,13 @@ public virtual async Task> AddTagAsync(string key, 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 _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + var patch = new NetworkPacketBrokerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -356,11 +356,11 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// @@ -368,12 +368,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.AddTag"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.AddTag"); scope.Start(); try { @@ -382,13 +382,13 @@ public virtual Response AddTag(string key, string value, Ca var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + var patch = new NetworkPacketBrokerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -410,22 +410,22 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// 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) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.SetTags"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.SetTags"); scope.Start(); try { @@ -435,13 +435,13 @@ public virtual async Task> SetTagsAsync(IDictionar 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 _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + 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()); @@ -459,22 +459,22 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// 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) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.SetTags"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.SetTags"); scope.Start(); try { @@ -484,13 +484,13 @@ public virtual Response SetTags(IDictionary var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + var patch = new NetworkPacketBrokerPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -508,22 +508,22 @@ public virtual Response SetTags(IDictionary /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.RemoveTag"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.RemoveTag"); scope.Start(); try { @@ -532,13 +532,13 @@ public virtual async Task> RemoveTagAsync(string k 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 _routePolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + var patch = new NetworkPacketBrokerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -560,22 +560,22 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/networkPacketBrokers/{networkPacketBrokerName} /// /// /// Operation Id - /// RoutePolicies_Get + /// NetworkPacketBrokers_Get /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _routePolicyClientDiagnostics.CreateScope("RoutePolicyResource.RemoveTag"); + using var scope = _networkPacketBrokerClientDiagnostics.CreateScope("NetworkPacketBrokerResource.RemoveTag"); scope.Start(); try { @@ -584,13 +584,13 @@ public virtual Response RemoveTag(string key, CancellationT var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _routePolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new RoutePolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + 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 RoutePolicyPatch(); + var patch = new NetworkPacketBrokerPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackData.cs index 873fe2e427869..cd4a824647b53 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, NetworkFabricProvisioningState? 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 ProvisioningState? ProvisioningState { get; } + 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 NetworkFabricProvisioningState? 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..b570218eb8d24 --- /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, NetworkTapPollingType? pollingType, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? 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 NetworkTapPollingType? PollingType { get; set; } + /// Gets the configurations state of the resource. + public NetworkFabricConfigurationState? 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 NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. Example -Enabled/Disabled. + public NetworkFabricAdministrativeState? 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..0b8923e1c8e81 --- /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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkTapRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkTapClientDiagnostics.CreateScope("NetworkTapResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkTapRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new DeviceUpdateCommonPostActionResultOperationSource(), _networkTapClientDiagnostics, Pipeline, _networkTapRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 StateUpdateCommonPostActionResultOperationSource(), _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 StateUpdateCommonPostActionResultOperationSource(), _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..f61906d91f1b3 --- /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, NetworkFabricConfigurationType? configurationType, Uri tapRulesUri, IList matchConfigurations, IList dynamicMatchConfigurations, ResourceIdentifier networkTapId, PollingIntervalInSecond? pollingIntervalInSeconds, DateTimeOffset? lastSyncedOn, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? 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 NetworkFabricConfigurationType? 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 ResourceIdentifier 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 NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? 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..70641b3d23ded --- /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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkTapRuleRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkTapRuleClientDiagnostics.CreateScope("NetworkTapRuleResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkTapRuleRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkTapRuleClientDiagnostics, Pipeline, _networkTapRuleRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).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 StateUpdateCommonPostActionResultOperationSource(), _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 StateUpdateCommonPostActionResultOperationSource(), _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 ValidateConfigurationResultOperationSource(), _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 ValidateConfigurationResultOperationSource(), _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..d028f7b9396e7 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(NetworkFabricBooleanValue 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, NetworkFabricBooleanValue useOptionB, Layer2Configuration layer2Configuration, NetworkToNetworkInterconnectOptionBLayer3Configuration optionBLayer3Configuration, NpbStaticRouteConfiguration npbStaticRouteConfiguration, ImportRoutePolicyInformation importRoutePolicy, ExportRoutePolicyInformation exportRoutePolicy, ResourceIdentifier egressAclId, ResourceIdentifier ingressAclId, NetworkFabricConfigurationState? configurationState, NetworkFabricProvisioningState? provisioningState, NetworkFabricAdministrativeState? 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 NetworkFabricBooleanValue 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 ProvisioningState? ProvisioningState { get; } + public NetworkToNetworkInterconnectOptionBLayer3Configuration 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 NetworkFabricConfigurationState? ConfigurationState { get; } + /// Provisioning state of the resource. + public NetworkFabricProvisioningState? ProvisioningState { get; } + /// Administrative state of the resource. + public NetworkFabricAdministrativeState? 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..06e61ac081b69 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateNpbStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = await _networkToNetworkInterconnectRestClient.UpdateNpbStaticRouteBfdAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateNpbStaticRouteBfdAdministrativeState"); + scope.Start(); + try + { + var response = _networkToNetworkInterconnectRestClient.UpdateNpbStaticRouteBfdAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = await _networkToNetworkInterconnectRestClient.UpdateAdministrativeStateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _networkToNetworkInterconnectClientDiagnostics.CreateScope("NetworkToNetworkInterconnectResource.UpdateAdministrativeState"); + scope.Start(); + try + { + var response = _networkToNetworkInterconnectRestClient.UpdateAdministrativeState(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ManagedNetworkFabricArmOperation(new StateUpdateCommonPostActionResultOperationSource(), _networkToNetworkInterconnectClientDiagnostics, Pipeline, _networkToNetworkInterconnectRestClient.CreateUpdateAdministrativeStateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).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..1ad856fe3ca27 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/AccessControlListsRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, NetworkFabricAccessControlListData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -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, NetworkFabricAccessControlListData 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, NetworkFabricAccessControlListData 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,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -162,26 +154,26 @@ public async Task> GetAsync(string subscriptionI { case 200: { - AccessControlListData value = default; + NetworkFabricAccessControlListData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); + value = NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AccessControlListData)null, message.Response); + return Response.FromValue((NetworkFabricAccessControlListData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string accessControlListName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -193,19 +185,19 @@ public Response Get(string subscriptionId, string resourc { case 200: { - AccessControlListData value = default; + NetworkFabricAccessControlListData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListData.DeserializeAccessControlListData(document.RootElement); + value = NetworkFabricAccessControlListData.DeserializeNetworkFabricAccessControlListData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((AccessControlListData)null, message.Response); + return Response.FromValue((NetworkFabricAccessControlListData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, AccessControlListPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, NetworkFabricAccessControlListPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -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, NetworkFabricAccessControlListPatch 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, NetworkFabricAccessControlListPatch 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,12 +365,12 @@ 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. /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -397,9 +381,9 @@ public async Task> ListByResourceGroupAsy { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -408,12 +392,12 @@ 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. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,9 +408,9 @@ public Response ListByResourceGroup(string subscri { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -452,11 +436,11 @@ 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. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -466,9 +450,9 @@ public async Task> ListBySubscriptionAsyn { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -477,11 +461,11 @@ 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. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -491,9 +475,9 @@ public Response ListBySubscription(string subscrip { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -501,6 +485,227 @@ public Response ListBySubscription(string subscrip } } + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string accessControlListName, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, accessControlListName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accessControlListName, nameof(accessControlListName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, accessControlListName, content); + _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,12 +722,12 @@ 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. /// 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) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -534,9 +739,9 @@ public async Task> ListByResourceGroupNex { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -546,12 +751,12 @@ 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. /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -563,9 +768,9 @@ public Response ListByResourceGroupNextPage(string { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -589,11 +794,11 @@ 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. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -604,9 +809,9 @@ public async Task> ListBySubscriptionNext { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -616,11 +821,11 @@ 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. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -631,9 +836,9 @@ public Response ListBySubscriptionNextPage(string { case 200: { - AccessControlListsListResult value = default; + AccessControlListsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccessControlListsListResult.DeserializeAccessControlListsListResult(document.RootElement); + value = AccessControlListsResult.DeserializeAccessControlListsResult(document.RootElement); return Response.FromValue(value, message.Response); } default: 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..0f81317d21ba4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/ExternalNetworksRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,15 +64,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -93,15 +93,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -144,14 +144,14 @@ 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. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -164,27 +164,27 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - ExternalNetworkData value = default; + NetworkFabricExternalNetworkData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExternalNetworkData.DeserializeExternalNetworkData(document.RootElement); + value = NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ExternalNetworkData)null, message.Response); + return Response.FromValue((NetworkFabricExternalNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. - public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -197,19 +197,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - ExternalNetworkData value = default; + NetworkFabricExternalNetworkData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExternalNetworkData.DeserializeExternalNetworkData(document.RootElement); + value = NetworkFabricExternalNetworkData.DeserializeNetworkFabricExternalNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ExternalNetworkData)null, message.Response); + return Response.FromValue((NetworkFabricExternalNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,15 +236,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -265,15 +265,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, ExternalNetworkPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, NetworkFabricExternalNetworkPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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) { @@ -450,7 +448,7 @@ public Response List(string subscriptionId, string resourc } } - internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -470,34 +468,35 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. + /// 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 UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -506,275 +505,27 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Executes update operation to enable or disable administrative State 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 UpdateAdministrativeState(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 = CreateUpdateAdministrativeStateRequest(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 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 ID 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. + /// 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 ClearIPv6NeighborsAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - 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); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -782,7 +533,7 @@ public Response ClearIPv6Neighbors(string subscriptionId, string resourceGroupNa } } - internal HttpMessage CreateClearArpEntriesRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, EnableDisableOnResources body) + internal HttpMessage CreateUpdateStaticRouteBfdAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string externalNetworkName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -797,39 +548,40 @@ 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"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. + /// 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 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, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -837,27 +589,28 @@ 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the External Network. + /// 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 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, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateClearArpEntriesRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, externalNetworkName, content); _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..c6f2b1388281a 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternalNetworksRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,15 +64,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -93,15 +93,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -144,14 +144,14 @@ 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. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -164,27 +164,27 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - InternalNetworkData value = default; + NetworkFabricInternalNetworkData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = InternalNetworkData.DeserializeInternalNetworkData(document.RootElement); + value = NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((InternalNetworkData)null, message.Response); + return Response.FromValue((NetworkFabricInternalNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. - public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -197,19 +197,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - InternalNetworkData value = default; + NetworkFabricInternalNetworkData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = InternalNetworkData.DeserializeInternalNetworkData(document.RootElement); + value = NetworkFabricInternalNetworkData.DeserializeNetworkFabricInternalNetworkData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((InternalNetworkData)null, message.Response); + return Response.FromValue((NetworkFabricInternalNetworkData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,15 +236,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -265,15 +265,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, InternalNetworkPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, NetworkFabricInternalNetworkPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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) { @@ -450,7 +448,7 @@ public Response List(string subscriptionId, string resourc } } - internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -470,34 +468,35 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -506,26 +505,27 @@ 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -533,7 +533,7 @@ public Response UpdateAdministrativeState(string subscriptionId, string resource } } - internal HttpMessage CreateUpdateBgpAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateBgpAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -553,34 +553,35 @@ internal HttpMessage CreateUpdateBgpAdministrativeStateRequest(string subscripti 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 UpdateBgpAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateBgpAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -589,275 +590,27 @@ public async Task UpdateBgpAdministrativeStateAsync(string subscriptio } /// Update BGP state for internalNetwork. Allowed only on edge devices. - /// 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 UpdateBgpAdministrativeState(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 = CreateUpdateBgpAdministrativeStateRequest(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 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 ID 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 ClearArpEntriesAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response UpdateBgpAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - 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); + using var message = CreateUpdateBgpAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); _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 CreateUpdateBfdForStaticRouteAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateStaticRouteBfdAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, string internalNetworkName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -880,39 +633,40 @@ 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"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 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, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateBfdForStaticRouteAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -920,27 +674,28 @@ 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// Name of the Internal Network. + /// 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 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, UpdateAdministrativeStateContent content, 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)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateBfdForStaticRouteAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, body); + using var message = CreateUpdateStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, internalNetworkName, content); _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..613fdce6ee1eb --- /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, NetworkFabricInternetGatewayRuleData 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, NetworkFabricInternetGatewayRuleData 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, NetworkFabricInternetGatewayRuleData 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: + { + NetworkFabricInternetGatewayRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricInternetGatewayRuleData)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: + { + NetworkFabricInternetGatewayRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkFabricInternetGatewayRuleData.DeserializeNetworkFabricInternetGatewayRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricInternetGatewayRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string internetGatewayRuleName, NetworkFabricInternetGatewayRulePatch 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, NetworkFabricInternetGatewayRulePatch 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, NetworkFabricInternetGatewayRulePatch 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..31fe7ed327b49 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/InternetGatewaysRestOperations.cs @@ -0,0 +1,480 @@ +// 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 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: + { + NetworkFabricInternetGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricInternetGatewayData)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: + { + NetworkFabricInternetGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkFabricInternetGatewayData.DeserializeNetworkFabricInternetGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricInternetGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string internetGatewayName, NetworkFabricInternetGatewayPatch 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, NetworkFabricInternetGatewayPatch 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, NetworkFabricInternetGatewayPatch 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 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..a8ee0575a47bd 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpCommunitiesRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipCommunityName, IPCommunityData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 ipCommunityName, IPCommunityData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 ipCommunityName, IPCommunityData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipCommunityName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - IPCommunityData value = default; + NetworkFabricIPCommunityData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IPCommunityData.DeserializeIPCommunityData(document.RootElement); + value = NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPCommunityData)null, message.Response); + return Response.FromValue((NetworkFabricIPCommunityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string ipCommunityName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string ipCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - IPCommunityData value = default; + NetworkFabricIPCommunityData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IPCommunityData.DeserializeIPCommunityData(document.RootElement); + value = NetworkFabricIPCommunityData.DeserializeNetworkFabricIPCommunityData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPCommunityData)null, message.Response); + return Response.FromValue((NetworkFabricIPCommunityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipCommunityName, IPCommunityPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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. /// 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 ipCommunityName, IPCommunityPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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. /// 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 ipCommunityName, IPCommunityPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string ipCommunityName, NetworkFabricIPCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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..78ddf1cc46c47 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpExtendedCommunitiesRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, IPExtendedCommunityData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 ipExtendedCommunityName, IPExtendedCommunityData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 ipExtendedCommunityName, IPExtendedCommunityData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptio { case 200: { - IPExtendedCommunityData value = default; + NetworkFabricIPExtendedCommunityData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IPExtendedCommunityData.DeserializeIPExtendedCommunityData(document.RootElement); + value = NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPExtendedCommunityData)null, message.Response); + return Response.FromValue((NetworkFabricIPExtendedCommunityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resou { case 200: { - IPExtendedCommunityData value = default; + NetworkFabricIPExtendedCommunityData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IPExtendedCommunityData.DeserializeIPExtendedCommunityData(document.RootElement); + value = NetworkFabricIPExtendedCommunityData.DeserializeNetworkFabricIPExtendedCommunityData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPExtendedCommunityData)null, message.Response); + return Response.FromValue((NetworkFabricIPExtendedCommunityData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, IPExtendedCommunityPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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. /// 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 ipExtendedCommunityName, IPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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. /// 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 ipExtendedCommunityName, IPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string ipExtendedCommunityName, NetworkFabricIPExtendedCommunityPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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..682269f3707af 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/IpPrefixesRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipPrefixName, IPPrefixData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 ipPrefixName, IPPrefixData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 ipPrefixName, IPPrefixData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipPrefixName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string ipPrefixName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptionId, string { case 200: { - IPPrefixData value = default; + NetworkFabricIPPrefixData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = IPPrefixData.DeserializeIPPrefixData(document.RootElement); + value = NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPPrefixData)null, message.Response); + return Response.FromValue((NetworkFabricIPPrefixData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string ipPrefixName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string ipPrefixName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resourceGroupNam { case 200: { - IPPrefixData value = default; + NetworkFabricIPPrefixData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = IPPrefixData.DeserializeIPPrefixData(document.RootElement); + value = NetworkFabricIPPrefixData.DeserializeNetworkFabricIPPrefixData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((IPPrefixData)null, message.Response); + return Response.FromValue((NetworkFabricIPPrefixData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipPrefixName, IPPrefixPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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. /// 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 ipPrefixName, IPPrefixPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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. /// 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 ipPrefixName, IPPrefixPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string ipPrefixName, NetworkFabricIPPrefixPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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..1126acdcf8f52 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L2IsolationDomainsRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, L2IsolationDomainData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 l2IsolationDomainName, L2IsolationDomainData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 l2IsolationDomainName, L2IsolationDomainData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptionI { case 200: { - L2IsolationDomainData value = default; + NetworkFabricL2IsolationDomainData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = L2IsolationDomainData.DeserializeL2IsolationDomainData(document.RootElement); + value = NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((L2IsolationDomainData)null, message.Response); + return Response.FromValue((NetworkFabricL2IsolationDomainData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resourc { case 200: { - L2IsolationDomainData value = default; + NetworkFabricL2IsolationDomainData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = L2IsolationDomainData.DeserializeL2IsolationDomainData(document.RootElement); + value = NetworkFabricL2IsolationDomainData.DeserializeNetworkFabricL2IsolationDomainData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((L2IsolationDomainData)null, message.Response); + return Response.FromValue((NetworkFabricL2IsolationDomainData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, L2IsolationDomainPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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.. /// 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 l2IsolationDomainName, L2IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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.. /// 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 l2IsolationDomainName, L2IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, NetworkFabricL2IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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; @@ -347,7 +345,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string l } } - internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -365,32 +363,33 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the L2 Isolation Domain. + /// 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 UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -399,101 +398,25 @@ 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. - /// 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 l2IsolationDomainName, UpdateAdministrativeState 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 = CreateUpdateAdministrativeStateRequest(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 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. + /// Name of the L2 Isolation Domain. + /// 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 ClearArpTable(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, EnableDisableOnResources body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string l2IsolationDomainName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l2IsolationDomainName, nameof(l2IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateClearArpTableRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l2IsolationDomainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -501,7 +424,7 @@ public Response ClearArpTable(string subscriptionId, string resourceGroupName, s } } - 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..0615e60a0e386 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/L3IsolationDomainsRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, L3IsolationDomainData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 l3IsolationDomainName, L3IsolationDomainData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 l3IsolationDomainName, L3IsolationDomainData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptionI { case 200: { - L3IsolationDomainData value = default; + NetworkFabricL3IsolationDomainData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = L3IsolationDomainData.DeserializeL3IsolationDomainData(document.RootElement); + value = NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((L3IsolationDomainData)null, message.Response); + return Response.FromValue((NetworkFabricL3IsolationDomainData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resourc { case 200: { - L3IsolationDomainData value = default; + NetworkFabricL3IsolationDomainData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = L3IsolationDomainData.DeserializeL3IsolationDomainData(document.RootElement); + value = NetworkFabricL3IsolationDomainData.DeserializeNetworkFabricL3IsolationDomainData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((L3IsolationDomainData)null, message.Response); + return Response.FromValue((NetworkFabricL3IsolationDomainData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, L3IsolationDomainPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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. /// 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 l3IsolationDomainName, L3IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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. /// 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 l3IsolationDomainName, L3IsolationDomainPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, NetworkFabricL3IsolationDomainPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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. @@ -487,7 +485,7 @@ public Response ListBySubscription(string subscrip } } - internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -505,32 +503,33 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the L3 Isolation Domain. + /// 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 UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -539,101 +538,25 @@ public async Task UpdateAdministrativeStateAsync(string subscriptionId } /// Enables racks for this Isolation Domain. - /// 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 UpdateAdministrativeState(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 = CreateUpdateAdministrativeStateRequest(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 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 ID 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. + /// 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 UpdateOptionBAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string l3IsolationDomainName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(l3IsolationDomainName, nameof(l3IsolationDomainName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateOptionBAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, l3IsolationDomainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -641,7 +564,7 @@ public Response UpdateOptionBAdministrativeState(string subscriptionId, string r } } - 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..e4c2cc41b1e68 --- /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, NetworkFabricNeighborGroupData 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, NetworkFabricNeighborGroupData 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, NetworkFabricNeighborGroupData 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: + { + NetworkFabricNeighborGroupData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricNeighborGroupData)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: + { + NetworkFabricNeighborGroupData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkFabricNeighborGroupData.DeserializeNetworkFabricNeighborGroupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkFabricNeighborGroupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string neighborGroupName, NetworkFabricNeighborGroupPatch 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, NetworkFabricNeighborGroupPatch 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, NetworkFabricNeighborGroupPatch 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..8a3e841135696 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, NetworkDeviceRebootContent content) { 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _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, NetworkDeviceRebootContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName, content); 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, NetworkDeviceRebootContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateRebootRequest(subscriptionId, resourceGroupName, networkDeviceName, content); _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, UpdateDeviceAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -638,108 +648,38 @@ 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"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the SKU version of the Network Device resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// 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) - { - 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); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the SKU version of the Network Device resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of the NetworkDevice. - /// 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) - { - 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"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Generate Support Package for the given Network Device. - /// 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 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) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateDeviceAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateSupportPackageRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -747,23 +687,26 @@ public async Task GenerateSupportPackageAsync(string subscriptionId, s } } - /// Generate Support Package for the given Network Device. - /// 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 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) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkDeviceName, UpdateDeviceAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGenerateSupportPackageRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, content); _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, NetworkFabricUpdateVersionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -784,108 +727,38 @@ 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"); request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); 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. - /// 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) - { - 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); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update PDU power cycle 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. - /// 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) - { - 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. + /// 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 GetStatusAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, CancellationToken cancellationToken = default) + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkDeviceName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -893,23 +766,26 @@ public async Task GetStatusAsync(string subscriptionId, string resourc } } - /// Get the running status 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 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) + public Response Upgrade(string subscriptionId, string resourceGroupName, string networkDeviceName, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetStatusRequest(subscriptionId, resourceGroupName, networkDeviceName); + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkDeviceName, content); _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..4b3e74be422c3 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, NetworkFabricUpdateVersionContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkFabricName, content); + 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, NetworkFabricUpdateVersionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, networkFabricName, content); + _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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateWorkloadManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateWorkloadManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + _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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateInfraManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateInfraManagementBfdConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + _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, ValidateConfigurationContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, ValidateConfigurationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + 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, ValidateConfigurationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkFabricName, nameof(networkFabricName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateValidateConfigurationRequest(subscriptionId, resourceGroupName, networkFabricName, content); + _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..2d473dc42d513 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfaceData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfaceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,15 +64,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfaceData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -93,15 +93,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfaceData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -144,14 +144,14 @@ 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. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -164,27 +164,27 @@ public async Task> GetAsync(string subscriptionId { case 200: { - NetworkInterfaceData value = default; + NetworkDeviceInterfaceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkInterfaceData.DeserializeNetworkInterfaceData(document.RootElement); + value = NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((NetworkInterfaceData)null, message.Response); + return Response.FromValue((NetworkDeviceInterfaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. - public Response Get(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -197,19 +197,19 @@ public Response Get(string subscriptionId, string resource { case 200: { - NetworkInterfaceData value = default; + NetworkDeviceInterfaceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkInterfaceData.DeserializeNetworkInterfaceData(document.RootElement); + value = NetworkDeviceInterfaceData.DeserializeNetworkDeviceInterfaceData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((NetworkInterfaceData)null, message.Response); + return Response.FromValue((NetworkDeviceInterfaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfacePatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfacePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,15 +236,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfacePatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfacePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -265,15 +265,15 @@ 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. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkInterfacePatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, NetworkDeviceInterfacePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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,27 +391,27 @@ 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) { case 200: { - NetworkInterfacesList value = default; + NetworkDeviceInterfacesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkInterfacesList.DeserializeNetworkInterfacesList(document.RootElement); + value = NetworkDeviceInterfacesList.DeserializeNetworkDeviceInterfacesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -422,27 +420,27 @@ 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) { case 200: { - NetworkInterfacesList value = default; + NetworkDeviceInterfacesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkInterfacesList.DeserializeNetworkInterfacesList(document.RootElement); + value = NetworkDeviceInterfacesList.DeserializeNetworkDeviceInterfacesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -450,82 +448,7 @@ 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) + internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeStateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -545,34 +468,35 @@ internal HttpMessage CreateUpdateAdministrativeStateRequest(string subscriptionI 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; _userAgent.Apply(message); return message; } /// 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. - /// Request payload. + /// Name of the Network Device. + /// Name of the Network Interface. + /// 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 UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public async Task UpdateAdministrativeStateAsync(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -581,26 +505,27 @@ 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. - /// Request payload. + /// Name of the Network Device. + /// Name of the Network Interface. + /// 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 UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeState body, CancellationToken cancellationToken = default) + public Response UpdateAdministrativeState(string subscriptionId, string resourceGroupName, string networkDeviceName, string networkInterfaceName, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkDeviceName, nameof(networkDeviceName)); Argument.AssertNotNullOrEmpty(networkInterfaceName, nameof(networkInterfaceName)); - Argument.AssertNotNull(body, nameof(body)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName, body); + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkDeviceName, networkInterfaceName, content); _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,28 +549,28 @@ 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) { case 200: { - NetworkInterfacesList value = default; + NetworkDeviceInterfacesList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NetworkInterfacesList.DeserializeNetworkInterfacesList(document.RootElement); + value = NetworkDeviceInterfacesList.DeserializeNetworkDeviceInterfacesList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -655,28 +580,28 @@ 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) { case 200: { - NetworkInterfacesList value = default; + NetworkDeviceInterfacesList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NetworkInterfacesList.DeserializeNetworkInterfacesList(document.RootElement); + value = NetworkDeviceInterfacesList.DeserializeNetworkDeviceInterfacesList(document.RootElement); return Response.FromValue(value, message.Response); } default: 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..f4d9bfe02e472 --- /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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapRuleName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapRuleName, nameof(networkTapRuleName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapRuleName, content); + _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..b430450f0f4a5 --- /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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkTapName, nameof(networkTapName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkTapName, content); + _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..1c06cae64743b 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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, 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(content, nameof(content)); + + using var message = CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, content); + 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, UpdateAdministrativeStateContent content, 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(content, nameof(content)); + + using var message = CreateUpdateNpbStaticRouteBfdAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, content); + _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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, 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(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, content); + 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, UpdateAdministrativeStateContent content, 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(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, networkFabricName, networkToNetworkInterconnectName, content); + _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..be3d1e135fd1e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RestOperations/RoutePoliciesRestOperations.cs @@ -33,11 +33,11 @@ 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); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string routePolicyName, RoutePolicyData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,14 +62,14 @@ 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. /// 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 routePolicyName, RoutePolicyData data, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -89,14 +89,14 @@ 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. /// 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 routePolicyName, RoutePolicyData data, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,13 +136,13 @@ 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -154,26 +154,26 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - RoutePolicyData value = default; + NetworkFabricRoutePolicyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RoutePolicyData.DeserializeRoutePolicyData(document.RootElement); + value = NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((RoutePolicyData)null, message.Response); + return Response.FromValue((NetworkFabricRoutePolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string routePolicyName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -185,19 +185,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - RoutePolicyData value = default; + NetworkFabricRoutePolicyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RoutePolicyData.DeserializeRoutePolicyData(document.RootElement); + value = NetworkFabricRoutePolicyData.DeserializeNetworkFabricRoutePolicyData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((RoutePolicyData)null, message.Response); + return Response.FromValue((NetworkFabricRoutePolicyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string routePolicyName, RoutePolicyPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -222,14 +222,14 @@ 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. /// 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 routePolicyName, RoutePolicyPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,14 +249,14 @@ 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. /// 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 routePolicyName, RoutePolicyPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string routePolicyName, NetworkFabricRoutePolicyPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -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, UpdateAdministrativeStateContent content) + { + 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 content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, routePolicyName, content); + 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, UpdateAdministrativeStateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(routePolicyName, nameof(routePolicyName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpdateAdministrativeStateRequest(subscriptionId, resourceGroupName, routePolicyName, content); + _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 deleted file mode 100644 index 218aed3c81e0d..0000000000000 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/RoutePolicyData.cs +++ /dev/null @@ -1,58 +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; -using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ManagedNetworkFabric -{ - /// - /// A class representing the RoutePolicy data model. - /// The RoutePolicy resource definition. - /// - 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) - { - Argument.AssertNotNull(statements, nameof(statements)); - - Statements = statements.ToList(); - } - - /// Initializes a new instance of RoutePolicyData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Switch configuration description. - /// 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) - { - Annotation = annotation; - Statements = statements; - ProvisioningState = provisioningState; - } - - /// Switch configuration description. - public string Annotation { get; set; } - /// Route Policy statements. - public IList Statements { get; } - /// Gets the provisioning state of the resource. - public ProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md index c2444ec7c136f..8ca7b6dad0dd2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/autorest.md @@ -7,7 +7,8 @@ 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: https://github.com/Azure/azure-rest-api-specs/blob/0691ac4b0e05c8ca3bde2f8a33f036c12282fa25/specification/managednetworkfabric/resource-manager/readme.md +#tag: package-2023-06-15 output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true @@ -46,18 +47,101 @@ rename-rules: SSO: Sso URI: Uri Etag: ETag|etag + MAT: Mat + RMA: Rma + GRE: Gre + ASN: Asn + TCP: Tcp + UDP: Udp + NPB: Npb + ZTP: Ztp + +rename-mapping: + AccessControlList: NetworkFabricAccessControlList + AccessControlListsListResult: AccessControlListsResult + ExternalNetwork: NetworkFabricExternalNetwork + ExternalNetwork.properties.networkToNetworkInterconnectId: -|arm-id + InternalNetwork: NetworkFabricInternalNetwork + InternetGateway: NetworkFabricInternetGateway + InternetGateway.properties.ipv4Address: -|ip-address + InternetGatewayRule: NetworkFabricInternetGatewayRule + InternetGatewayRule.properties.internetGatewayIds: -|arm-id + IpCommunity: NetworkFabricIpCommunity + IpExtendedCommunity: NetworkFabricIpExtendedCommunity + IpPrefix: NetworkFabricIpPrefix + L2IsolationDomain: NetworkFabricL2IsolationDomain + L3IsolationDomain: NetworkFabricL3IsolationDomain + NeighborGroup: NetworkFabricNeighborGroup + NetworkDevice.properties.managementIpv4Address: -|ip-address + NetworkInterface.properties.ipv4Address: -|ip-address + RoutePolicy: NetworkFabricRoutePolicy + NetworkInterface: NetworkDeviceInterface + Action: InternetGatewayRuleAction + AddressFamilyTypeL: NetworkFabricAddressFamilyType + AdministrativeState: NetworkFabricAdministrativeState + AnnotationResource: AnnotationResourceProperties + BooleanEnumProperty: NetworkFabricBooleanValue + CommonPostActionResponseForDeviceUpdate: DeviceUpdateCommonPostActionResult + CommonPostActionResponseForStateUpdate: StateUpdateCommonPostActionResult + ConfigurationState: NetworkFabricConfigurationState + ConfigurationType: NetworkFabricConfigurationType + Condition: IPPrefixRuleCondition + ControllerServices: NetworkFabricControllerServices + DestinationProperties: NetworkTapDestinationProperties + DestinationType: NetworkTapDestinationType + DeviceAdministrativeState: NetworkDeviceAdministrativeState + DeviceInterfaceProperties: NetworkDeviceInterfaceProperties + EnableDisableOnResources: UpdateAdministrativeStateOnResources + EnableDisableOnResources.resourceIds: -|arm-id + EnableDisableState: AdministrativeEnableState + Encapsulation: IsolationDomainEncapsulationType + EncapsulationType: NetworkTapEncapsulationType + ErrorResponse: NetworkFabricErrorResult + Extension: StaticRouteConfigurationExtension + ExternalNetworkPatchPropertiesOptionAProperties: ExternalNetworkPatchOptionAProperties + ExternalNetworkPropertiesOptionAProperties: ExternalNetworkOptionAProperties + InternalNetworkPropertiesBgpConfiguration: InternalNetworkBgpConfiguration + InternalNetworkPropertiesStaticRouteConfiguration: InternalNetworkStaticRouteConfiguration + IpCommunityIdList.ipCommunityIds: -|arm-id + IpExtendedCommunityIdList.ipExtendedCommunityIds: -|arm-id + GatewayType: InternetGatewayType + FabricSkuType: NetworkFabricSkuType + InterfaceType: NetworkDeviceInterfaceType + IpGroupProperties: MatchConfigurationIPGroupProperties + IPAddressType: NetworkFabricIPAddressType + NeighborGroupDestination.ipv4Addresses: -|ip-address + NetworkDevice.properties.networkRackId: -|arm-id + NetworkFabricController.properties.workloadManagementNetwork: IsWorkloadManagementNetwork + NetworkInterfacePatch: NetworkDeviceInterfacePatch + NetworkInterfacesList: NetworkDeviceInterfacesList + NetworkTapRule.properties.networkTapId: -|arm-id + NetworkToNetworkInterconnectPropertiesOptionBLayer3Configuration: NetworkToNetworkInterconnectOptionBLayer3Configuration + NfcSku: NetworkFabricControllerSKU + PollingType: NetworkTapPollingType + PortCondition: NetworkFabricPortCondition + PortType: NetworkFabricPortType + PrefixType: IPMatchConditionPrefixType + ProvisioningState: NetworkFabricProvisioningState + RebootProperties: NetworkDeviceRebootContent + RebootType: NetworkDeviceRebootType + RuleProperties: InternetGatewayRules + StatementConditionProperties.ipPrefixId: -|arm-id + TerminalServerConfiguration.networkDeviceId: -|arm-id + UpdateAdministrativeState: UpdateAdministrativeStateContent + UpdateDeviceAdministrativeState: UpdateDeviceAdministrativeStateContent + UpdateVersion: NetworkFabricUpdateVersionContent + ValidateAction: NetworkFabricValidateAction + ValidateConfigurationProperties: ValidateConfigurationContent + ValidateConfigurationResponse: ValidateConfigurationResult + VpnConfigurationPatchablePropertiesOptionAProperties: VpnConfigurationPatchableOptionAProperties + VpnConfigurationPropertiesOptionAProperties: VpnConfigurationOptionAProperties directive: - - remove-operation: NetworkDevices_getStaticInterfaceMaps - - remove-operation: NetworkDevices_getDynamicInterfaceMaps - - from: NetworkFabrics.json - where: $.definitions - transform: > - $.Layer3IpPrefixProperties['x-ms-client-name'] = 'NetworkFabricLayer3IpPrefixProperties'; - $.OptionAProperties['x-ms-client-name'] = 'NetworkFabricOptionAProperties'; - $.OptionBProperties['x-ms-client-name'] = 'NetworkFabricOptionBProperties'; - from: NetworkFabricControllers.json where: $.definitions transform: $.ExpressRouteConnectionInformation.required = [ 'expressRouteCircuitId' ]; -``` \ No newline at end of file + # Removing the operations that are not allowed for the end users. + - remove-operation: InternetGateways_Delete + - remove-operation: InternetGateways_Create +``` diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/ManagedNetworkFabricManagementTestEnvironment.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/ManagedNetworkFabricManagementTestEnvironment.cs index ab65368d943c1..d713610487d79 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/ManagedNetworkFabricManagementTestEnvironment.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/ManagedNetworkFabricManagementTestEnvironment.cs @@ -10,31 +10,129 @@ namespace Azure.ResourceManager.ManagedNetworkFabric.Tests public class ManagedNetworkFabricManagementTestEnvironment : TestEnvironment { private TokenCredential _credential; + + /// + /// The name of the resource group to be used for playback tests. Recorded. + /// public string ResourceGroupName => GetRecordedVariable("RESOURCE_GROUP_NAME"); + + /// + /// The name of the resource group that has successufully provisioned NFC to be used for playback tests. Recorded. + /// public string NFCResourceGroupName => GetRecordedVariable("NFC_RESOURCE_GROUP_NAME"); - public string NFCLocation => GetRecordedVariable("NFC_LOCATION"); - public string NetworkFabricControllerName => GetRecordedVariable("Network_Fabric_Controller_Name"); - public string ValidNetworkFabricControllerId => GetRecordedVariable("Valid_Network_Fabric_Controller_Id"); - public string NetworkFabricName => GetRecordedVariable("Network_Fabric_Name"); - public string NetworkFabricNameForPostAction => GetRecordedVariable("Network_Fabric_Name_For_Post_Action"); - public string ValidNetworkFabricName => GetRecordedVariable("Valid_Network_Fabric_Name"); - public string ValidNetworkFabricNameForNNI => GetRecordedVariable("Valid_Network_Fabric_Name_For_NNI"); - public ResourceIdentifier ValidNetworkFabricId => new ResourceIdentifier(GetRecordedVariable("Valid_Network_Fabric_Id")); - public ResourceIdentifier ValidNetworkFabricIdForNNI => new ResourceIdentifier(GetRecordedVariable("Valid_Network_Fabric_Id_For_NNI")); - public string NetworkRackName => GetRecordedVariable("Network_Rack_Name"); - public string NetworkDeviceName => GetRecordedVariable("Network_Device_Name"); - public string NetworkInterfaceName => GetRecordedVariable("Network_Interface_Name"); - public string NetworkToNetworkInterConnectName => GetRecordedVariable("Network_To_Network_InterConnect_Name"); + + /// + /// The ARM ID of the Netowork Fabric Controller that has successufully provisioned to be used for playback tests. Recorded. + /// + public string Provisioned_NFC_ID => GetRecordedVariable("PROVISIONED_NFC_ID"); + + /// + /// The ARM ID of the Netowork Fabric that has successufully provisioned to be used for playback tests. Recorded. + /// + public string Provisioned_NF_ID => GetRecordedVariable("PROVISIONED_NF_ID"); + + /// + /// The ARM ID of the L3Isoltaion Domain to be used for playback tests. Recorded. + /// This ID is used for the creation of the Internal and External Networks. + /// + public string Existing_L3ISD_ID => GetRecordedVariable("EXISTING_L3ISD_ID"); + + /// + /// The ARM ID of the Route Policy to be used for playback tests. Recorded. + /// This ID is used in the creation of the Network To Network Interconnects Resource. + /// + public string ExistingRoutePolicyId => GetRecordedVariable("EXISTING_ROUTEPOLICY_ID"); + + /// + /// The name of the Network Rack to be used for playback tests. Recorded. + /// This is used as the Rack is not created by the user. We use the existing rack to perform other opertions. + /// + public string NetworkRackName => GetRecordedVariable("EXISTING_RACK_NAME"); + + /// + /// The name of the Network Device to be used for playback tests. Recorded. + /// This is used as the Network Device is not created by the user. We use the existing device to perform other opertions. + /// Note: Only the device under not provisioned can be updated. + /// + public string NetworkDeviceNameUnderDeprovisionedNF => GetRecordedVariable("EXISTING_DEVICE_NAME_UNDER_DEPROVISONED_NF"); + + /// + /// The name of the Network Device to be used for playback tests. Recorded. + /// This is used for the Interface Update. + /// + public string NetworkDeviceNameUnderProvisionedNF => GetRecordedVariable("EXISTING_DEVICE_NAME_UNDER_PROVISONED_NF"); + + /// + /// The name of the Network Interface to be used for playback tests. Recorded. + /// This is used as the Network Interface is not created by the user. We use the existing interface to perform other opertions. + /// + public string NetworkInterfaceName => GetRecordedVariable("EXISTING_INTERFACE_NAME"); + + /// + /// The ARM ID of the Network Fabric that is not provisined to be used for playback tests. Recorded. + /// This ID is used create the Network To Network Interconnect Resource. + /// + public string Existing_NotProvisioned_NF_ID => GetRecordedVariable("EXISTING_NOT_PROVISIONED_NF_ID"); + + /// + /// The name of the Network Fabric Controller to be used for playback tests. Recorded. + /// + public string NetworkFabricControllerName => GetRecordedVariable("NFC_NAME"); + + /// + /// The name of the Network Fabric to be used for playback tests. Recorded. + /// + public string NetworkFabricName => GetRecordedVariable("NF_NAME"); + + /// + /// The name of the Network To Network InterConnect to be used for playback tests. Recorded. + /// + public string NetworkToNetworkInterConnectName => GetRecordedVariable("NNI_NAME"); + + /// + /// The name of the IP Prefix to be used for playback tests. Recorded. + /// public string IpPrefixName => GetRecordedVariable("IP_PREFIX_NAME"); + + /// + /// The name of the IP Community to be used for playback tests. Recorded. + /// public string IpCommunityName => GetRecordedVariable("IP_COMMUNITY_NAME"); + + /// + /// The name of the IP Extended Community to be used for playback tests. Recorded. + /// public string IpExtendedCommunityName => GetRecordedVariable("IP_EXTENDED_COMMUNITY_NAME"); + + /// + /// The name of the Route Policy to be used for playback tests. Recorded. + /// public string RoutePolicyName => GetRecordedVariable("ROUTE_POLICY_NAME"); - public string L2IsolationDomainName => GetRecordedVariable("L2_Isolation_Domain_Name"); - public string L3IsolationDomainName => GetRecordedVariable("L3_Isolation_Domain_Name"); - public ResourceIdentifier ValidL3IsolationDomainId => new ResourceIdentifier(GetRecordedVariable("Valid_L3_Isolation_Domain_Id")); - public string ValidL3IsolationDomainName => GetRecordedVariable("Valid_L3_Isolation_Domain_Name"); - public string InternalNetworkName => GetRecordedVariable("Internal_Network_Name"); - public string ExternalNetworkName => GetRecordedVariable("External_Network_Name"); + + /// + /// The name of the L2 Isolation Domain to be used for playback tests. Recorded. + /// + public string L2IsolationDomainName => GetRecordedVariable("L2ISD_NAME"); + + /// + /// The name of the L3 Isolation Domain to be used for playback tests. Recorded. + /// + public string L3IsolationDomainName => GetRecordedVariable("L3ISD_NAME"); + + /// + /// The name of the Internal Network to be used for playback tests. Recorded. + /// + public string InternalNetworkName => GetRecordedVariable("INTERNAL_NETWORK_NAME"); + + /// + /// The name of the External Network to be used for playback tests. Recorded. + /// + public string ExternalNetworkName => GetRecordedVariable("EXTERNAL_NETWORK_NAME"); + + /// + /// The name of the External Network to be used for playback tests. Recorded. + /// + public string InternetGatewayName => GetRecordedVariable("INTERNET_GATEWAY_NAME"); // Support using the Default Credential created by Azure CLI so // that we don't have to support creating a service principal, etc. to run these tests. diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/ExternalNetworkTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/ExternalNetworkTests.cs index b06c677b33e6c..c7b8c1971ef46 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/ExternalNetworkTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/ExternalNetworkTests.cs @@ -1,16 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; - using Azure.Core; using Azure.Core.TestFramework; using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; using NUnit.Framework; namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario @@ -25,69 +20,79 @@ public ExternalNetworkTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task ExternalNetworks() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - ResourceIdentifier validL3IsolationDomainId = TestEnvironment.ValidL3IsolationDomainId; - string l3IsolationDomainName = TestEnvironment.ValidL3IsolationDomainName; - string externalNetworkName = TestEnvironment.ExternalNetworkName; + ResourceIdentifier l3IsolationDomainId = new ResourceIdentifier(TestEnvironment.Existing_L3ISD_ID); + NetworkFabricL3IsolationDomainResource l3IsolationDomain = Client.GetNetworkFabricL3IsolationDomainResource(l3IsolationDomainId); TestContext.Out.WriteLine($"Entered into the ExternalNetwork tests...."); - TestContext.Out.WriteLine($"Provided ExternalNetwork name : {externalNetworkName}"); + TestContext.Out.WriteLine($"Provided ExternalNetwork name : {TestEnvironment.ExternalNetworkName}"); - L3IsolationDomainResource l3IsolationDomain = Client.GetL3IsolationDomainResource(validL3IsolationDomainId); l3IsolationDomain = await l3IsolationDomain.GetAsync(); - ResourceIdentifier externalNetworkResourceId = ExternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomain.Data.Name, externalNetworkName); + ResourceIdentifier externalNetworkResourceId = NetworkFabricExternalNetworkResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, l3IsolationDomain.Data.Name, TestEnvironment.ExternalNetworkName); TestContext.Out.WriteLine($"externalNetworkResourceId: {externalNetworkResourceId}"); - ExternalNetworkResource externalNetwork = Client.GetExternalNetworkResource(externalNetworkResourceId); + NetworkFabricExternalNetworkResource externalNetwork = Client.GetNetworkFabricExternalNetworkResource(externalNetworkResourceId); TestContext.Out.WriteLine($"ExternalNetwork Test started....."); - ExternalNetworkCollection collection = l3IsolationDomain.GetExternalNetworks(); + NetworkFabricExternalNetworkCollection collection = l3IsolationDomain.GetNetworkFabricExternalNetworks(); // Create TestContext.Out.WriteLine($"PUT started....."); - ExternalNetworkData data = new ExternalNetworkData(PeeringOption.OptionA) + NetworkFabricExternalNetworkData data = new NetworkFabricExternalNetworkData(PeeringOption.OptionA) { - OptionBProperties = new OptionBProperties() + Annotation = "annotation", + OptionBProperties = new L3OptionBProperties() { - ImportRouteTargets = - { - "65541:2001" - }, - ExportRouteTargets = + RouteTargets = new RouteTargetInformation() { - "65531:2001" + ImportIPv4RouteTargets = + { + "65046:10039" + }, + ImportIPv6RouteTargets = + { + "65046:10039" + }, + ExportIPv4RouteTargets = + { + "65046:10039" + }, + ExportIPv6RouteTargets = + { + "65046:10039" + }, }, }, - OptionAProperties = new ExternalNetworkPropertiesOptionAProperties() + OptionAProperties = new ExternalNetworkOptionAProperties() { Mtu = 1500, - VlanId = 524, - PeerASN = 65047, - BfdConfiguration = new BfdConfiguration(), - PrimaryIPv4Prefix = "172.23.1.0/31", + VlanId = 1001, + PeerAsn = 65047, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + PrimaryIPv4Prefix = "10.1.1.0/30", PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/127", - SecondaryIPv4Prefix = "172.23.1.2/31", + SecondaryIPv4Prefix = "10.1.1.4/30", SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/127", }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName", }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, externalNetworkName, data); - ExternalNetworkResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, externalNetworkName); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.ExternalNetworkName, data); + NetworkFabricExternalNetworkResource createResult = lro.Value; + Assert.AreEqual(createResult.Data.Name, TestEnvironment.ExternalNetworkName); // Get TestContext.Out.WriteLine($"GET started....."); - ExternalNetworkResource getResult = await externalNetwork.GetAsync(); + NetworkFabricExternalNetworkResource getResult = await externalNetwork.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, externalNetworkName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.ExternalNetworkName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - await foreach (ExternalNetworkResource item in collection.GetAllAsync()) + var listByResourceGroup = new List(); + await foreach (NetworkFabricExternalNetworkResource item in collection.GetAllAsync()) { listByResourceGroup.Add(item); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternalNetworkTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternalNetworkTests.cs index 6714de6ef5cef..36c22609c8075 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternalNetworkTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternalNetworkTests.cs @@ -1,16 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Azure.Core; using Azure.Core.TestFramework; using Azure.ResourceManager.ManagedNetworkFabric.Models; -using Azure.ResourceManager.Resources; using NUnit.Framework; namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario @@ -25,109 +21,88 @@ public InternalNetworkTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task InternalNetworks() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - ResourceIdentifier validL3IsolationDomainId = TestEnvironment.ValidL3IsolationDomainId; - string l3IsolationDomainName = TestEnvironment.ValidL3IsolationDomainName; - string internalNetworkName = TestEnvironment.InternalNetworkName; - + ResourceIdentifier l3IsolationDomainId = new ResourceIdentifier(TestEnvironment.Existing_L3ISD_ID); + NetworkFabricL3IsolationDomainResource l3IsolationDomain = Client.GetNetworkFabricL3IsolationDomainResource(l3IsolationDomainId); TestContext.Out.WriteLine($"Entered into the InternalNetwork tests...."); - TestContext.Out.WriteLine($"Provided InternalNetworks name : {internalNetworkName}"); + TestContext.Out.WriteLine($"Provided InternalNetworks name : {TestEnvironment.InternalNetworkName}"); - L3IsolationDomainResource l3IsolationDomain = Client.GetL3IsolationDomainResource(validL3IsolationDomainId); l3IsolationDomain = await l3IsolationDomain.GetAsync(); - ResourceIdentifier internalNetworkResourceId = InternalNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomain.Data.Name, internalNetworkName); + ResourceIdentifier internalNetworkResourceId = NetworkFabricInternalNetworkResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, l3IsolationDomain.Data.Name, TestEnvironment.InternalNetworkName); TestContext.Out.WriteLine($"internalNetworkResourceId: {internalNetworkResourceId}"); - InternalNetworkResource internalNetwork = Client.GetInternalNetworkResource(internalNetworkResourceId); + NetworkFabricInternalNetworkResource internalNetwork = Client.GetNetworkFabricInternalNetworkResource(internalNetworkResourceId); TestContext.Out.WriteLine($"InternalNetwork Test started....."); - InternalNetworkCollection collection = l3IsolationDomain.GetInternalNetworks(); + NetworkFabricInternalNetworkCollection collection = l3IsolationDomain.GetNetworkFabricInternalNetworks(); // Create TestContext.Out.WriteLine($"PUT started....."); - InternalNetworkData data = new InternalNetworkData(501) + NetworkFabricInternalNetworkData data = new NetworkFabricInternalNetworkData(755) { + Annotation = "annotation", Mtu = 1500, ConnectedIPv4Subnets = { - new ConnectedSubnet() - { - Prefix = "10.1.1.1/24", - } - }, - ConnectedIPv6Subnets = - { - new ConnectedSubnet() + new ConnectedSubnet("100.0.0.0/24") { - Prefix = "2fff::/59", + Annotation = "annotation", } }, - StaticRouteConfiguration = new StaticRouteConfiguration() + IsMonitoringEnabled = IsMonitoringEnabled.True, + Extension = StaticRouteConfigurationExtension.NoExtension, + BgpConfiguration = new InternalNetworkBgpConfiguration() { - BfdConfiguration = new BfdConfiguration(), - IPv4Routes = + BfdConfiguration = new BfdConfiguration() { - new StaticRouteProperties("10.0.0.1/28",new string[] - { - "10.1.0.1" - }) + IntervalInMilliSeconds = 300, + Multiplier = 5, }, - IPv6Routes = - { - new StaticRouteProperties("2fff::/59",new string[] - { - "3ffe::" - }) - }, - }, - BgpConfiguration = new BgpConfiguration(6) - { - BfdConfiguration = new BfdConfiguration(), - DefaultRouteOriginate = BooleanEnumProperty.True, - AllowAS = 1, + DefaultRouteOriginate = NetworkFabricBooleanValue.True, + AllowAS = 10, AllowASOverride = AllowASOverride.Enable, + PeerAsn = 61234, IPv4ListenRangePrefixes = { - "10.1.1.0/28" - }, - IPv6ListenRangePrefixes = - { - "2fff::/59" + "100.0.0.0/25" }, IPv4NeighborAddress = { new NeighborAddress() { - Address = "10.1.1.0", + Address = "100.0.0.10", } }, - IPv6NeighborAddress = + Annotation = "annotation", + }, + StaticRouteConfiguration = new InternalNetworkStaticRouteConfiguration() + { + Extension = StaticRouteConfigurationExtension.NoExtension, + BfdConfiguration = new BfdConfiguration() { - new NeighborAddress() - { - Address = "2fff::", - } + IntervalInMilliSeconds = 300, + Multiplier = 15, + }, + IPv4Routes = + { + new StaticRouteProperties("100.0.0.0/24",new string[] { "20.0.0.1" }) }, }, - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, internalNetworkName, data); - InternalNetworkResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, internalNetworkName); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.InternalNetworkName, data); + NetworkFabricInternalNetworkResource createResult = lro.Value; + Assert.AreEqual(createResult.Data.Name, TestEnvironment.InternalNetworkName); // Get TestContext.Out.WriteLine($"GET started....."); - InternalNetworkResource getResult = await internalNetwork.GetAsync(); + NetworkFabricInternalNetworkResource getResult = await internalNetwork.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, internalNetworkName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.InternalNetworkName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - await foreach (InternalNetworkResource item in collection.GetAllAsync()) + var listByResourceGroup = new List(); + await foreach (NetworkFabricInternalNetworkResource item in collection.GetAllAsync()) { listByResourceGroup.Add(item); } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternetGatewayTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternetGatewayTests.cs new file mode 100644 index 0000000000000..e554ed6b886d0 --- /dev/null +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/InternetGatewayTests.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario +{ + public class InternetGatewayTests : ManagedNetworkFabricManagementTestBase + { + public InternetGatewayTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) { } + public InternetGatewayTests(bool isAsync) : base(isAsync) { } + + [Test] + [RecordedTest] + [AsyncOnly] + public async Task InternetGateways_List() + { + TestContext.Out.WriteLine($"Entered into the InternetGateway tests...."); + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName); + ResourceGroupResource resourceGroupResource = Client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this InternetGatewayResource + NetworkFabricInternetGatewayCollection collection = resourceGroupResource.GetNetworkFabricInternetGateways(); + + // invoke the operation and iterate over the result + await foreach (NetworkFabricInternetGatewayResource item in collection.GetAllAsync()) + { + NetworkFabricInternetGatewayData resourceData = item.Data; + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpCommunityTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpCommunityTests.cs index 43f6ecd7c2d5c..6ccd66444344e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpCommunityTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpCommunityTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -20,77 +19,63 @@ public IpCommunityTests(bool isAsync) : base(isAsync) { } [Test] [RecordedTest] [AsyncOnly] - public async Task IpCommunities() + public async Task IpCommunitiesCRUD() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string ipCommunityName = TestEnvironment.IpCommunityName; + TestContext.Out.WriteLine($"Entered into the IP Community tests...."); + TestContext.Out.WriteLine($"Provided IP CommunityName name : {TestEnvironment.IpCommunityName}"); - TestContext.Out.WriteLine($"Entered into the IpCommunity tests...."); - TestContext.Out.WriteLine($"Provided IpCommunityName name : {ipCommunityName}"); - - ResourceIdentifier ipCommunityResourceId = IPCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipCommunityName); + ResourceIdentifier ipCommunityResourceId = NetworkFabricIPCommunityResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.IpCommunityName); TestContext.Out.WriteLine($"IpCommunityResourceId: {ipCommunityResourceId}"); // Get the collection of this IpCommunity - IPCommunityCollection collection = ResourceGroupResource.GetIPCommunities(); + NetworkFabricIPCommunityCollection collection = ResourceGroupResource.GetNetworkFabricIPCommunities(); TestContext.Out.WriteLine($"IpCommunity Test started....."); // Create TestContext.Out.WriteLine($"PUT started....."); - IPCommunityData data = new IPCommunityData(new AzureLocation(TestEnvironment.Location)) + NetworkFabricIPCommunityData data = new NetworkFabricIPCommunityData(new AzureLocation(TestEnvironment.Location)) { - Annotation = "annotationValue", - Action = CommunityActionType.Permit, - WellKnownCommunities = - { - WellKnownCommunity.Internet,WellKnownCommunity.LocalAS,WellKnownCommunity.NoExport,WellKnownCommunity.GShut - }, - CommunityMembers = + Annotation = "annotation", + IPCommunityRules = { - "1234:5678" + new IPCommunityRule( CommunityActionType.Permit, 4155123341, new string[] { "1:1" }) + { + WellKnownCommunities = + { + WellKnownCommunity.Internet + }, + } }, Tags = { - ["key2814"] = "", + ["keyId"] = "KeyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipCommunityName, data); - IPCommunityResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, ipCommunityName); - - IPCommunityResource ipCommunity = Client.GetIPCommunityResource(ipCommunityResourceId); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.IpCommunityName, data); + NetworkFabricIPCommunityResource createResult = lro.Value; + NetworkFabricIPCommunityResource ipCommunity = Client.GetNetworkFabricIPCommunityResource(ipCommunityResourceId); + Assert.AreEqual(createResult.Data.Name, TestEnvironment.IpCommunityName); // Get TestContext.Out.WriteLine($"GET started....."); - IPCommunityResource getResult = await ipCommunity.GetAsync(); + NetworkFabricIPCommunityResource getResult = await ipCommunity.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, ipCommunityName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.IpCommunityName); - // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - IPCommunityCollection collectionOp = ResourceGroupResource.GetIPCommunities(); - await foreach (IPCommunityResource item in collectionOp.GetAllAsync()) + var listByResourceGroup = new List(); + NetworkFabricIPCommunityCollection collectionOp = ResourceGroupResource.GetNetworkFabricIPCommunities(); + await foreach (NetworkFabricIPCommunityResource item in collectionOp.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (IPCommunityResource item in DefaultSubscription.GetIPCommunitiesAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); - // Delete TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await ipCommunity.DeleteAsync(WaitUntil.Completed); + ArmOperation deleteResponse = await ipCommunity.DeleteAsync(WaitUntil.Completed); Assert.IsTrue(deleteResponse.HasCompleted); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpExtendedCommunityTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpExtendedCommunityTests.cs index 331da83745bc8..84f2c8479d0e4 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpExtendedCommunityTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpExtendedCommunityTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -22,68 +21,49 @@ public IpExtendedCommunityTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task IpExtendedCommunities() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string IpExtendedCommunityName = TestEnvironment.IpExtendedCommunityName; + TestContext.Out.WriteLine($"Provided IpExtendedCommunityName name : {TestEnvironment.IpExtendedCommunityName}"); - TestContext.Out.WriteLine($"Entered into the IpExtendedCommunity tests...."); - TestContext.Out.WriteLine($"Provided IpExtendedCommunityName name : {IpExtendedCommunityName}"); - - ResourceIdentifier ipExtendedCommunityResourceId = IPExtendedCommunityResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, IpExtendedCommunityName); + ResourceIdentifier ipExtendedCommunityResourceId = NetworkFabricIPExtendedCommunityResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.IpExtendedCommunityName); TestContext.Out.WriteLine($"ipExtendedCommunityResourceId: {ipExtendedCommunityResourceId}"); // Get the collection of this IpExtendedCommunity - IPExtendedCommunityCollection collection = ResourceGroupResource.GetIPExtendedCommunities(); + NetworkFabricIPExtendedCommunityCollection collection = ResourceGroupResource.GetNetworkFabricIPExtendedCommunities(); TestContext.Out.WriteLine($"IpExtendedCommunityTest started....."); // Create TestContext.Out.WriteLine($"PUT started....."); - IPExtendedCommunityData data = new IPExtendedCommunityData(new AzureLocation(TestEnvironment.Location)) + NetworkFabricIPExtendedCommunityData data = new NetworkFabricIPExtendedCommunityData(new AzureLocation(TestEnvironment.Location), new IPExtendedCommunityRule[] { new IPExtendedCommunityRule(CommunityActionType.Permit, 4155123341, new string[] { "1234:2345" }) }) { - Annotation = "annotationValue", - Action = CommunityActionType.Permit, - RouteTargets = - { - "1234:5678" - }, + Annotation = "annotation", Tags = { - ["key5054"] = "key", + ["keyID"] = "KeyValue", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, IpExtendedCommunityName, data); - IPExtendedCommunityResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, IpExtendedCommunityName); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.IpExtendedCommunityName, data); + NetworkFabricIPExtendedCommunityResource createResult = lro.Value; + Assert.AreEqual(createResult.Data.Name, TestEnvironment.IpExtendedCommunityName); - IPExtendedCommunityResource ipExtendedCommunity = Client.GetIPExtendedCommunityResource(ipExtendedCommunityResourceId); + NetworkFabricIPExtendedCommunityResource ipExtendedCommunity = Client.GetNetworkFabricIPExtendedCommunityResource(ipExtendedCommunityResourceId); // Get TestContext.Out.WriteLine($"GET started....."); - IPExtendedCommunityResource getResult = await ipExtendedCommunity.GetAsync(); + NetworkFabricIPExtendedCommunityResource getResult = await ipExtendedCommunity.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, IpExtendedCommunityName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.IpExtendedCommunityName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - IPExtendedCommunityCollection collectionOp = ResourceGroupResource.GetIPExtendedCommunities(); - await foreach (IPExtendedCommunityResource item in collectionOp.GetAllAsync()) + var listByResourceGroup = new List(); + NetworkFabricIPExtendedCommunityCollection collectionOp = ResourceGroupResource.GetNetworkFabricIPExtendedCommunities(); + await foreach (NetworkFabricIPExtendedCommunityResource item in collectionOp.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (IPExtendedCommunityResource item in DefaultSubscription.GetIPExtendedCommunitiesAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); - // Delete TestContext.Out.WriteLine($"DELETE started....."); var deleteResponse = await ipExtendedCommunity.DeleteAsync(WaitUntil.Completed); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpPrefixTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpPrefixTests.cs index 7571f185243e4..1b2419ed1c4c2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpPrefixTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/IpPrefixTests.cs @@ -22,71 +22,57 @@ public IpPrefixTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task IpPrefixes() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string ipPrefixName = TestEnvironment.IpPrefixName; - TestContext.Out.WriteLine($"Entered into the IpPrefix tests...."); - TestContext.Out.WriteLine($"Provided IpPrefixName name : {ipPrefixName}"); + TestContext.Out.WriteLine($"Provided IpPrefixName name : {TestEnvironment.IpPrefixName}"); - ResourceIdentifier ipPrefixResourceId = IPPrefixResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, ipPrefixName); + ResourceIdentifier ipPrefixResourceId = NetworkFabricIPPrefixResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.IpPrefixName); TestContext.Out.WriteLine($"IpPrefixResourceId: {ipPrefixResourceId}"); // Get the collection of this IpPrefix - IPPrefixCollection collection = ResourceGroupResource.GetIPPrefixes(); + NetworkFabricIPPrefixCollection collection = ResourceGroupResource.GetNetworkFabricIPPrefixes(); TestContext.Out.WriteLine($"IpPrefix Test started....."); // Create TestContext.Out.WriteLine($"PUT started....."); - IPPrefixData data = - new IPPrefixData(new AzureLocation(TestEnvironment.Location), new IPPrefixPropertiesIPPrefixRulesItem[] + NetworkFabricIPPrefixData data = new NetworkFabricIPPrefixData(new AzureLocation(TestEnvironment.Location)) + { + Annotation = "annotation", + IPPrefixRules = { - new IPPrefixPropertiesIPPrefixRulesItem(CommunityActionType.Permit,12,"1.1.1.0/24") + new IPPrefixRule(CommunityActionType.Permit, 4155123341,"10.10.10.10/30") { - Condition = Condition.EqualTo, - SubnetMaskLength = 24, + Condition = IPPrefixRuleCondition.GreaterThanOrEqualTo, + SubnetMaskLength = "31", } - }) + }, + Tags = { - Annotation = "annotationValue", - Tags = - { - ["key6404"] = "", - }, - }; - - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ipPrefixName, data); - IPPrefixResource createResult = lro.Value; - Assert.AreEqual(ipPrefixName, createResult.Data.Name); + ["keyID"] = "KeyValue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.IpPrefixName, data); + NetworkFabricIPPrefixResource createResult = lro.Value; + Assert.AreEqual(TestEnvironment.IpPrefixName, createResult.Data.Name); - IPPrefixResource ipPrefix = Client.GetIPPrefixResource(ipPrefixResourceId); + NetworkFabricIPPrefixResource ipPrefix = Client.GetNetworkFabricIPPrefixResource(ipPrefixResourceId); // Get TestContext.Out.WriteLine($"GET started....."); - IPPrefixResource getResult = await ipPrefix.GetAsync(); + NetworkFabricIPPrefixResource getResult = await ipPrefix.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(ipPrefixName, getResult.Data.Name); + Assert.AreEqual(TestEnvironment.IpPrefixName, getResult.Data.Name); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - IPPrefixCollection collectionOp = ResourceGroupResource.GetIPPrefixes(); - await foreach (IPPrefixResource item in collectionOp.GetAllAsync()) + var listByResourceGroup = new List(); + NetworkFabricIPPrefixCollection collectionOp = ResourceGroupResource.GetNetworkFabricIPPrefixes(); + await foreach (NetworkFabricIPPrefixResource item in collectionOp.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (IPPrefixResource item in DefaultSubscription.GetIPPrefixesAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); - // Delete TestContext.Out.WriteLine($"DELETE started....."); var deleteResponse = await ipPrefix.DeleteAsync(WaitUntil.Completed); diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L2IsolationDomainTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L2IsolationDomainTests.cs index c646c50cf78e1..7bccf155bdf5f 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L2IsolationDomainTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L2IsolationDomainTests.cs @@ -9,7 +9,7 @@ using Azure.ResourceManager.Resources; using NUnit.Framework; -namespace Azure.ResourceManager.ManagedNetworkFabric.Tests +namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario { public class L2IsolationDomainTests : ManagedNetworkFabricManagementTestBase { @@ -21,19 +21,15 @@ public L2IsolationDomainTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task L2IsolationDomains() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkFabricId = TestEnvironment.ValidNetworkFabricId; - string l2IsolationDomainName= TestEnvironment.L2IsolationDomainName; - // get the collection of this L2Isolation - var collection = ResourceGroupResource.GetL2IsolationDomains(); + + NetworkFabricL2IsolationDomainCollection collection = ResourceGroupResource.GetNetworkFabricL2IsolationDomains(); TestContext.Out.WriteLine($"Entered into the L2Isolation Domain tests...."); - TestContext.Out.WriteLine($"Provided NetworkFabric Id : {networkFabricId}"); + TestContext.Out.WriteLine($"Provided NetworkFabric Id : {TestEnvironment.Provisioned_NF_ID}"); - ResourceIdentifier l2DomainResourceId = L2IsolationDomainResource.CreateResourceIdentifier(subscriptionId, ResourceGroupResource.Id.Name, l2IsolationDomainName); + ResourceIdentifier l2DomainResourceId = NetworkFabricL2IsolationDomainResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, ResourceGroupResource.Id.Name, TestEnvironment.L2IsolationDomainName); TestContext.Out.WriteLine($"l2DomainResourceId: {l2DomainResourceId}"); @@ -41,58 +37,54 @@ public async Task L2IsolationDomains() // Create TestContext.Out.WriteLine($"PUT started....."); - L2IsolationDomainData data = new L2IsolationDomainData(new AzureLocation(TestEnvironment.Location)) + NetworkFabricL2IsolationDomainData data = new NetworkFabricL2IsolationDomainData(new AzureLocation(TestEnvironment.Location), new ResourceIdentifier(TestEnvironment.Provisioned_NF_ID), 1000) { - NetworkFabricId = networkFabricId, - VlanId = 501, - Mtu = 1500, + Annotation = "annotation", + Mtu = 7000, + Tags = + { + ["keyID"] = "keyValue", + }, }; - ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l2IsolationDomainName, data); - Assert.AreEqual(createResult.Value.Data.Name, l2IsolationDomainName); - L2IsolationDomainResource l2IsolationDomain = Client.GetL2IsolationDomainResource(l2DomainResourceId); + ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.L2IsolationDomainName, data); + Assert.AreEqual(createResult.Value.Data.Name, TestEnvironment.L2IsolationDomainName); + + NetworkFabricL2IsolationDomainResource l2IsolationDomain = Client.GetNetworkFabricL2IsolationDomainResource(l2DomainResourceId); // Get TestContext.Out.WriteLine($"GET started....."); - L2IsolationDomainResource getResult = await l2IsolationDomain.GetAsync(); + NetworkFabricL2IsolationDomainResource getResult = await l2IsolationDomain.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, l2IsolationDomainName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.L2IsolationDomainName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - L2IsolationDomainCollection collectionOp = ResourceGroupResource.GetL2IsolationDomains(); - await foreach (L2IsolationDomainResource item in collectionOp.GetAllAsync()) + var listByResourceGroup = new List(); + NetworkFabricL2IsolationDomainCollection collectionOp = ResourceGroupResource.GetNetworkFabricL2IsolationDomains(); + await foreach (NetworkFabricL2IsolationDomainResource item in collectionOp.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (L2IsolationDomainResource item in DefaultSubscription.GetL2IsolationDomainsAsync()) - { - listBySubscription.Add(item); - } - Assert.IsNotEmpty(listBySubscription); - // Update Admin State TestContext.Out.WriteLine($"POST started....."); - UpdateAdministrativeState body = new UpdateAdministrativeState() + UpdateAdministrativeStateContent triggerEnable = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Enable, + State = AdministrativeEnableState.Enable }; - await l2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); + ArmOperation test = await l2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, triggerEnable); - body = new UpdateAdministrativeState() + UpdateAdministrativeStateContent triggerDisable = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Disable, + State = AdministrativeEnableState.Disable }; - await l2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); + test = await l2IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Completed, triggerDisable); // Delete TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await l2IsolationDomain.DeleteAsync(WaitUntil.Completed); + ArmOperation deleteResponse = await l2IsolationDomain.DeleteAsync(WaitUntil.Completed); Assert.IsTrue(deleteResponse.HasCompleted); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L3IsolationDomainTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L3IsolationDomainTests.cs index 134480f73c310..09de97896bffa 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L3IsolationDomainTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/L3IsolationDomainTests.cs @@ -1,15 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Core.TestFramework; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ManagedNetworkFabric; using Azure.ResourceManager.ManagedNetworkFabric.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -26,98 +21,80 @@ public L3IsolationDomainTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task L3IsolationDomains() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkFabricId = TestEnvironment.ValidNetworkFabricId; - string l3IsolationDomainName = TestEnvironment.L3IsolationDomainName; - TestContext.Out.WriteLine($"Entered into the L3IsolationDomain tests...."); - TestContext.Out.WriteLine($"Provided L3IsolationDomains name : {l3IsolationDomainName}"); + TestContext.Out.WriteLine($"Provided L3IsolationDomains name : {TestEnvironment.L3IsolationDomainName}"); - ResourceIdentifier l3IsolationDomainResourceId = L3IsolationDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, l3IsolationDomainName); + ResourceIdentifier l3IsolationDomainResourceId = NetworkFabricL3IsolationDomainResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.L3IsolationDomainName); TestContext.Out.WriteLine($"l3IsolationDomainResourceId: {l3IsolationDomainResourceId}"); TestContext.Out.WriteLine($"L3IsolationDomains Test started....."); - L3IsolationDomainCollection collection = ResourceGroupResource.GetL3IsolationDomains(); + NetworkFabricL3IsolationDomainCollection collection = ResourceGroupResource.GetNetworkFabricL3IsolationDomains(); // Create TestContext.Out.WriteLine($"PUT started....."); - L3IsolationDomainData data = new L3IsolationDomainData(new AzureLocation("eastus")) + NetworkFabricL3IsolationDomainData data = new NetworkFabricL3IsolationDomainData(new AzureLocation(TestEnvironment.Location), new ResourceIdentifier(TestEnvironment.Provisioned_NF_ID)) { + Annotation = "annotation", RedistributeConnectedSubnets = RedistributeConnectedSubnet.True, RedistributeStaticRoutes = RedistributeStaticRoute.False, AggregateRouteConfiguration = new AggregateRouteConfiguration() { IPv4Routes = { - new AggregateRoute() - { - Prefix = "10.0.0.1/27", - } + new AggregateRoute("10.0.0.0/24") }, IPv6Routes = { - new AggregateRoute() - { - Prefix = "2fff::/59", - } - } + new AggregateRoute("3FFE:FFFF:0:CD30::a0/29") + }, }, - ConnectedSubnetRoutePolicy = new L3IsolationDomainPatchPropertiesConnectedSubnetRoutePolicy() + Tags = { - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", + ["keyID"] = "KeyValue", }, - NetworkFabricId = networkFabricId }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, l3IsolationDomainName, data); - L3IsolationDomainResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, l3IsolationDomainName); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.L3IsolationDomainName, data); + NetworkFabricL3IsolationDomainResource createResult = lro.Value; + Assert.AreEqual(createResult.Data.Name, TestEnvironment.L3IsolationDomainName); - L3IsolationDomainResource l3IsolationDomain = Client.GetL3IsolationDomainResource(l3IsolationDomainResourceId); + NetworkFabricL3IsolationDomainResource l3IsolationDomain = Client.GetNetworkFabricL3IsolationDomainResource(l3IsolationDomainResourceId); // Get TestContext.Out.WriteLine($"GET started....."); - L3IsolationDomainResource getResult = await l3IsolationDomain.GetAsync(); + NetworkFabricL3IsolationDomainResource getResult = await l3IsolationDomain.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, l3IsolationDomainName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.L3IsolationDomainName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - await foreach (L3IsolationDomainResource item in collection.GetAllAsync()) + var listByResourceGroup = new List(); + await foreach (NetworkFabricL3IsolationDomainResource item in collection.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (L3IsolationDomainResource item in DefaultSubscription.GetL3IsolationDomainsAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); + // Delete + TestContext.Out.WriteLine($"DELETE started....."); + ArmOperation deleteResponse = await l3IsolationDomain.DeleteAsync(WaitUntil.Completed); + Assert.IsTrue(deleteResponse.HasCompleted); // Update Admin State + NetworkFabricL3IsolationDomainResource l3IsolationDomainForPostAction = Client.GetNetworkFabricL3IsolationDomainResource(new ResourceIdentifier(TestEnvironment.Existing_L3ISD_ID)); TestContext.Out.WriteLine($"POST started....."); - UpdateAdministrativeState body = new UpdateAdministrativeState() + + UpdateAdministrativeStateContent content = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Enable, + State = AdministrativeEnableState.Enable, }; - await l3IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Started, body); + await l3IsolationDomainForPostAction.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); - body = new UpdateAdministrativeState() + content = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Disable, + State = AdministrativeEnableState.Disable, }; - await l3IsolationDomain.UpdateAdministrativeStateAsync(WaitUntil.Started, body); - - // Delete - TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await l3IsolationDomain.DeleteAsync(WaitUntil.Completed); - Assert.IsTrue(deleteResponse.HasCompleted); + await l3IsolationDomainForPostAction.UpdateAdministrativeStateAsync(WaitUntil.Completed, content); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkDeviceTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkDeviceTests.cs index 83f2bc6f2987d..a228e9f93a0bb 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkDeviceTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkDeviceTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -22,14 +21,10 @@ public NetworkDeviceTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task NetworkDevices() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkDeviceName = TestEnvironment.NetworkDeviceName; - TestContext.Out.WriteLine($"Entered into the NetworkDevice tests...."); - TestContext.Out.WriteLine($"Provided networkDevice name : {networkDeviceName}"); + TestContext.Out.WriteLine($"Provided networkDevice name : {TestEnvironment.NetworkDeviceNameUnderDeprovisionedNF}"); - ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); + ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.NetworkDeviceNameUnderDeprovisionedNF); TestContext.Out.WriteLine($"networkDeviceResourceId: {networkDeviceResourceId}"); TestContext.Out.WriteLine($"NetworkDevice Test started....."); @@ -42,7 +37,7 @@ public async Task NetworkDevices() TestContext.Out.WriteLine($"GET started....."); NetworkDeviceResource getResult = await device.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkDeviceName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkDeviceNameUnderDeprovisionedNF); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); @@ -53,15 +48,6 @@ public async Task NetworkDevices() } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (NetworkDeviceResource item in DefaultSubscription.GetNetworkDevicesAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); - // Update Serial Number NetworkDevicePatch patch = new NetworkDevicePatch() { @@ -71,6 +57,7 @@ public async Task NetworkDevices() }; ArmOperation lro = await device.UpdateAsync(WaitUntil.Completed, patch); NetworkDeviceResource result = lro.Value; + Assert.AreEqual(result.Data.SerialNumber, patch.SerialNumber); } } -} \ No newline at end of file +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricControllerTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricControllerTests.cs index cb89a79284a7a..74e38b840227c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricControllerTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricControllerTests.cs @@ -5,16 +5,16 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.TestFramework; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.ManagedNetworkFabric.Models; +using Azure.ResourceManager.Resources; using NUnit.Framework; -namespace Azure.ResourceManager.ManagedNetworkFabric.Tests +namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario { public class NetworkFabricControllerTests : ManagedNetworkFabricManagementTestBase { - public NetworkFabricControllerTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) {} - public NetworkFabricControllerTests(bool isAsync) : base(isAsync) {} + public NetworkFabricControllerTests(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) { } + public NetworkFabricControllerTests(bool isAsync) : base(isAsync) { } /// /// The test takes nearly one hour to complete the process. So max time 3600000ms = 1hr. @@ -25,58 +25,55 @@ public NetworkFabricControllerTests(bool isAsync) : base(isAsync) {} [AsyncOnly] public async Task NetworkFabricControllers() { - ResourceGroupResource NFCResourceGroupResource = null; - var resourceGroupId = ResourceGroupResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.NFCResourceGroupName); - NFCResourceGroupResource = Client.GetResourceGroupResource(resourceGroupId); - - NetworkFabricControllerCollection collection = NFCResourceGroupResource.GetNetworkFabricControllers(); + NetworkFabricControllerCollection collection = ResourceGroupResource.GetNetworkFabricControllers(); - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.NFCResourceGroupName; - string networkFabricControllerName = TestEnvironment.NetworkFabricControllerName; - - TestContext.Out.WriteLine($"Entered into the NetworkFabricController tests...."); - TestContext.Out.WriteLine($"Provided subscription-Id : {subscriptionId}"); - TestContext.Out.WriteLine($"Provided resourceGroup : {resourceGroupName}"); - TestContext.Out.WriteLine($"Provided NetworkFabricController : {networkFabricControllerName}"); - - ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(subscriptionId, NFCResourceGroupResource.Id.Name, networkFabricControllerName); + ResourceIdentifier networkFabricControllerResourceId = NetworkFabricControllerResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.NetworkFabricControllerName); TestContext.Out.WriteLine($"networkFabricControllerId: {networkFabricControllerResourceId}"); - ResourceIdentifier deleteNetworkFabricControllerId = new ResourceIdentifier("/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/networkFabricControllers/nfa-tool-ts-sdk-nfc1-062023"); TestContext.Out.WriteLine($"NFC Test started....."); NetworkFabricControllerResource networkFabricController = Client.GetNetworkFabricControllerResource(networkFabricControllerResourceId); - NetworkFabricControllerResource deleteNetworkFabricController = Client.GetNetworkFabricControllerResource(deleteNetworkFabricControllerId); - // Create - TestContext.Out.WriteLine($"PUT started....."); - NetworkFabricControllerData data = new NetworkFabricControllerData(new AzureLocation(TestEnvironment.NFCLocation)) + #region NFC Create Test + + TestContext.Out.WriteLine($"NFC create started....."); + NetworkFabricControllerData data = new NetworkFabricControllerData(new AzureLocation(TestEnvironment.Location)) { + Annotation = "annotation", InfrastructureExpressRouteConnections = { - new ExpressRouteConnectionInformation("/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) { - ExpressRouteAuthorizationKey = "asdghjklf" + ExpressRouteAuthorizationKey = "1234ABCD-0A1B-1234-5678-123456ABCDEF", } }, WorkloadExpressRouteConnections = { - new ExpressRouteConnectionInformation("/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName") + new ExpressRouteConnectionInformation(new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")) { - ExpressRouteAuthorizationKey = "asdghjklf" + ExpressRouteAuthorizationKey = "1234ABCD-0A1B-1234-5678-123456ABCDEF", } }, - IPv4AddressSpace = "172.253.0.0/19" + ManagedResourceGroupConfiguration = new ManagedResourceGroupConfiguration() + { + Name = "managedResourceGroupName", + Location = new AzureLocation("eastus"), + }, + IsWorkloadManagementNetworkEnabled = IsWorkloadManagementNetworkEnabled.True, + IPv4AddressSpace = "172.253.0.0/19", + IPv6AddressSpace = "::/60", + NfcSku = NetworkFabricControllerSKU.Standard, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkFabricControllerName, data); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.NetworkFabricControllerName, data); + + #endregion // Get - TestContext.Out.WriteLine($"GET started....."); + TestContext.Out.WriteLine($"NFC GET started....."); NetworkFabricControllerResource getResult = await networkFabricController.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkFabricControllerName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkFabricControllerName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); @@ -86,16 +83,9 @@ public async Task NetworkFabricControllers() listByResourceGroup.Add(item); } - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (var item in DefaultSubscription.GetNetworkFabricControllersAsync()) - { - listBySubscription.Add(item); - } - // Delete TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await networkFabricController.DeleteAsync(WaitUntil.Completed); + ArmOperation deleteResponse = await networkFabricController.DeleteAsync(WaitUntil.Completed); Assert.IsTrue(deleteResponse.HasCompleted); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricTests.cs index 340c40e8cf201..11c1d7264e9d9 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkFabricTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -9,7 +10,7 @@ using Azure.ResourceManager.Resources; using NUnit.Framework; -namespace Azure.ResourceManager.ManagedNetworkFabric.Tests +namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario { public class NetworkFabricTests : ManagedNetworkFabricManagementTestBase { @@ -21,77 +22,137 @@ public NetworkFabricTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task NetworkFabrics() { - NetworkFabricCollection collection = ResourceGroupResource.GetNetworkFabrics(); + NetworkFabricCollection collection = ResourceGroupResource.GetNetworkFabrics(); - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkFabricControllerId = TestEnvironment.ValidNetworkFabricControllerId; - string networkFabricName = TestEnvironment.NetworkFabricName; - string networkFabricNameForPostAction = TestEnvironment.NetworkFabricNameForPostAction; + TestContext.Out.WriteLine($"Entered into the Network Fabric tests...."); - TestContext.Out.WriteLine($"Entered into the NetworkFabric tests...."); - - TestContext.Out.WriteLine($"Provided NetworkFabricControllerId : {networkFabricControllerId}"); - TestContext.Out.WriteLine($"Provided NetworkFabric name : {networkFabricName}"); - ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricName); - ResourceIdentifier networkFabricResourceIdForPostAction = NetworkFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkFabricNameForPostAction); + TestContext.Out.WriteLine($"Provided NetworkFabricControllerId : {TestEnvironment.Provisioned_NFC_ID}"); + TestContext.Out.WriteLine($"Provided NetworkFabric name : {TestEnvironment.NetworkFabricName}"); + ResourceIdentifier networkFabricResourceId = NetworkFabricResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.NetworkFabricName); TestContext.Out.WriteLine($"networkFabricId: {networkFabricResourceId}"); + NetworkFabricResource networkFabric = Client.GetNetworkFabricResource(networkFabricResourceId); TestContext.Out.WriteLine($"Test started....."); - // Create + #region Network Fabric create TestContext.Out.WriteLine($"PUT started....."); - NetworkFabricData data = new NetworkFabricData(new AzureLocation(TestEnvironment.Location)) - { - NetworkFabricSku = "fab1", - RackCount = 3, - ServerCountPerRack = 7, - IPv4Prefix = "10.1.0.0/19", - FabricASN = 20, - NetworkFabricControllerId = networkFabricControllerId, - TerminalServerConfiguration = new TerminalServerConfiguration() + NetworkFabricData data = new NetworkFabricData( + new AzureLocation(TestEnvironment.Location), + "fab3", + new ResourceIdentifier(TestEnvironment.Provisioned_NFC_ID), + 7, + "10.18.0.0/19", + 29249, + new TerminalServerConfiguration() { + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.13/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", Username = "username", - Password = "****", - SerialNumber = "1234", - PrimaryIPv4Prefix = "172.31.0.0/30", - SecondaryIPv4Prefix = "172.31.0.20/30" + Password = "xxxx", + SerialNumber = "123456", }, - ManagementNetworkConfiguration = new ManagementNetworkConfiguration( - new VpnConfigurationProperties(PeeringOption.OptionB) - { - OptionBProperties = new NetworkFabricOptionBProperties(new string[] + new ManagementNetworkConfigurationProperties( + new VpnConfigurationProperties(PeeringOption.OptionA) { - "65541:2001" + OptionBProperties = new OptionBProperties() + { + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = + { + "65046:10039" + }, + ImportIPv6RouteTargets = + { + "65046:10039" + }, + ExportIPv4RouteTargets = + { + "65046:10039" + }, + ExportIPv6RouteTargets = + { + "65046:10039" + }, + }, + }, + OptionAProperties = new VpnConfigurationOptionAProperties() + { + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "20.0.0.13/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", + Mtu = 1501, + VlanId = 3001, + PeerAsn = 1235, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 10, + }, + }, }, - new string[] + new VpnConfigurationProperties(PeeringOption.OptionA) { - "65541:2001" - }) - }, - new VpnConfigurationProperties(PeeringOption.OptionB) + OptionBProperties = new OptionBProperties() + { + RouteTargets = new RouteTargetInformation() + { + ImportIPv4RouteTargets = + { + "65046:10039" + }, + ImportIPv6RouteTargets = + { + "65046:10039" + }, + ExportIPv4RouteTargets = + { + "65046:10039" + }, + ExportIPv6RouteTargets = + { + "65046:10039" + }, + }, + }, + OptionAProperties = new VpnConfigurationOptionAProperties() + { + PrimaryIPv4Prefix = "10.0.0.14/30", + PrimaryIPv6Prefix = "2FFE:FFFF:0:CD30::a7/127", + SecondaryIPv4Prefix = "10.0.0.15/30", + SecondaryIPv6Prefix = "2FFE:FFFF:0:CD30::ac/127", + Mtu = 1500, + VlanId = 3000, + PeerAsn = 61234, + BfdConfiguration = new BfdConfiguration() + { + IntervalInMilliSeconds = 300, + Multiplier = 5, + }, + }, + } + )) + { + Annotation = "annotation", + RackCount = 2, + IPv6Prefix = "3FFE:FFFF:0:CD40::/59", + Tags = { - OptionBProperties = new NetworkFabricOptionBProperties(new string[] - { - "65541:2001" - }, - new string[] - { - "65541:2001" - }) - }) + ["keyID"] = "keyValue", + }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkFabricName, data); - - NetworkFabricResource networkFabric = Client.GetNetworkFabricResource(networkFabricResourceId); - NetworkFabricResource networkFabricForPostAction = Client.GetNetworkFabricResource(networkFabricResourceIdForPostAction); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.NetworkFabricName, data); + #endregion // Get TestContext.Out.WriteLine($"GET started....."); NetworkFabricResource getResult = await networkFabric.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkFabricName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkFabricName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); @@ -102,25 +163,20 @@ public async Task NetworkFabrics() } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (NetworkFabricResource item in DefaultSubscription.GetNetworkFabricsAsync()) - { - listBySubscription.Add(item); - } - Assert.IsNotEmpty(listBySubscription); - // provision TestContext.Out.WriteLine($"POST - Provision started....."); - var provisionResponse = networkFabricForPostAction.ProvisionAsync(WaitUntil.Completed); + ArmOperation triggerProvision = await networkFabric.ProvisionAsync(WaitUntil.Completed); + DeviceUpdateCommonPostActionResult triggerProvisionResult = triggerProvision.Value; + Console.WriteLine(triggerProvisionResult); // Deprovision TestContext.Out.WriteLine($"POST - Deprovision started....."); - var deProvisionResponse = await networkFabricForPostAction.DeprovisionAsync(WaitUntil.Completed); + ArmOperation deProvisionResponse = await networkFabric.DeprovisionAsync(WaitUntil.Completed); + Console.WriteLine(triggerProvisionResult); // Delete TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await networkFabric.DeleteAsync(WaitUntil.Completed); + ArmOperation deleteResponse = await networkFabric.DeleteAsync(WaitUntil.Completed); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkInterfaceTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkInterfaceTests.cs index c4e0a3f31e37d..13517e6e5f8f8 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkInterfaceTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkInterfaceTests.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading.Tasks; using Azure.Core; @@ -25,55 +23,51 @@ public NetworkInterfaceTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task NetworkInterfaces() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkDeviceName = TestEnvironment.NetworkDeviceName; - string networkInterfaceName = TestEnvironment.NetworkInterfaceName; - TestContext.Out.WriteLine($"Entered into the NetworkInterface tests...."); - TestContext.Out.WriteLine($"Provided NetworkInterface name : {networkInterfaceName}"); + TestContext.Out.WriteLine($"Provided NetworkInterface name : {TestEnvironment.NetworkInterfaceName}"); - ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkDeviceName); + ResourceIdentifier networkDeviceResourceId = NetworkDeviceResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.NetworkDeviceNameUnderProvisionedNF); NetworkDeviceResource networkDevice = Client.GetNetworkDeviceResource(networkDeviceResourceId); networkDevice = await networkDevice.GetAsync(); - ResourceIdentifier networkInterfaceId = NetworkInterfaceResource.CreateResourceIdentifier(subscriptionId, ResourceGroupResource.Id.Name, networkDeviceName, networkInterfaceName); + ResourceIdentifier networkInterfaceId = NetworkDeviceInterfaceResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, ResourceGroupResource.Id.Name, TestEnvironment.NetworkDeviceNameUnderProvisionedNF, TestEnvironment.NetworkInterfaceName); TestContext.Out.WriteLine($"networkInterfaceId: {networkInterfaceId}"); - NetworkInterfaceResource networkInterface = Client.GetNetworkInterfaceResource(networkInterfaceId); + NetworkDeviceInterfaceResource networkInterface = Client.GetNetworkDeviceInterfaceResource(networkInterfaceId); TestContext.Out.WriteLine($"NetworkInterface Test started....."); - NetworkInterfaceCollection collection = networkDevice.GetNetworkInterfaces(); - // Get TestContext.Out.WriteLine($"GET started....."); - NetworkInterfaceResource getResult = await networkInterface.GetAsync(); + NetworkDeviceInterfaceResource getResult = await networkInterface.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkInterfaceName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkInterfaceName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - NetworkInterfaceCollection collectionOp = networkDevice.GetNetworkInterfaces(); - await foreach (NetworkInterfaceResource item in collectionOp.GetAllAsync()) + var listByResourceGroup = new List(); + NetworkDeviceInterfaceCollection collectionOp = networkDevice.GetNetworkDeviceInterfaces(); + await foreach (NetworkDeviceInterfaceResource item in collectionOp.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - // Update Admin State - TestContext.Out.WriteLine($"POST started....."); - UpdateAdministrativeState body = new UpdateAdministrativeState() + UpdateAdministrativeStateContent cotnent = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Disable, + State = AdministrativeEnableState.Disable }; - await networkInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); - body = new UpdateAdministrativeState() + ArmOperation disableAdminStateResponse = await networkInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, cotnent); + StateUpdateCommonPostActionResult result = disableAdminStateResponse.Value; + TestContext.WriteLine($"Succeeded: {result}"); + + cotnent = new UpdateAdministrativeStateContent() { - State = AdministrativeState.Enable, + State = AdministrativeEnableState.Enable }; - await networkInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, body); + ArmOperation enableAdminStateResponse = await networkInterface.UpdateAdministrativeStateAsync(WaitUntil.Completed, cotnent); + result = enableAdminStateResponse.Value; + TestContext.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkRackTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkRackTests.cs index 786fe89434764..513409eee7f59 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkRackTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkRackTests.cs @@ -22,14 +22,10 @@ public NetworkRackTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task NetworkRacks() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string networkRackName = TestEnvironment.NetworkRackName; - TestContext.Out.WriteLine($"Entered into the NetworkRack tests...."); - TestContext.Out.WriteLine($"Provided networkRack name : {networkRackName}"); + TestContext.Out.WriteLine($"Provided networkRack name : {TestEnvironment.NetworkRackName}"); - ResourceIdentifier networkRackResourceId = NetworkRackResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkRackName); + ResourceIdentifier networkRackResourceId = NetworkRackResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.NetworkRackName); TestContext.Out.WriteLine($"networkRackResourceId: {networkRackResourceId}"); TestContext.Out.WriteLine($"NetworkRack Test started....."); @@ -42,7 +38,7 @@ public async Task NetworkRacks() TestContext.Out.WriteLine($"GET started....."); NetworkRackResource getResult = await rack.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkRackName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkRackName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); @@ -52,15 +48,6 @@ public async Task NetworkRacks() listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (NetworkRackResource item in DefaultSubscription.GetNetworkRacksAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); } } -} \ No newline at end of file +} diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkToNetworkInterconnectTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkToNetworkInterconnectTests.cs index 99ba4340ea7e5..670e0c6f7f822 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkToNetworkInterconnectTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/NetworkToNetworkInterconnectTests.cs @@ -9,7 +9,7 @@ using Azure.ResourceManager.Resources; using NUnit.Framework; -namespace Azure.ResourceManager.ManagedNetworkFabric.Tests +namespace Azure.ResourceManager.ManagedNetworkFabric.Tests.Scenario { public class NetworkToNetworkInterconnectTests : ManagedNetworkFabricManagementTestBase { @@ -22,18 +22,17 @@ public NetworkToNetworkInterconnectTests(bool isAsync) : base(isAsync) { } public async Task NetworkToNetworkInterconnects() { string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - ResourceIdentifier validNetworkFabricId = TestEnvironment.ValidNetworkFabricIdForNNI; - string networkFabricName = TestEnvironment.ValidNetworkFabricNameForNNI; - string networkToNetworkInterconnectName= TestEnvironment.NetworkToNetworkInterConnectName; + ResourceIdentifier networkFabricId = new ResourceIdentifier(TestEnvironment.Existing_NotProvisioned_NF_ID); + + string networkFabricName = networkFabricId.Name; TestContext.Out.WriteLine($"Entered into the NetworkToNetworkInterConnects tests...."); TestContext.Out.WriteLine($"Provided NetworkFabric name : {networkFabricName}"); - NetworkFabricResource networkFabric = Client.GetNetworkFabricResource(validNetworkFabricId); + NetworkFabricResource networkFabric = Client.GetNetworkFabricResource(networkFabricId); networkFabric = await networkFabric.GetAsync(); - ResourceIdentifier networkToNetworkInterconnectId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, ResourceGroupResource.Id.Name, networkFabricName, networkToNetworkInterconnectName); + ResourceIdentifier networkToNetworkInterconnectId = NetworkToNetworkInterconnectResource.CreateResourceIdentifier(subscriptionId, ResourceGroupResource.Id.Name, networkFabricName, TestEnvironment.NetworkToNetworkInterConnectName); TestContext.Out.WriteLine($"networkToNetworkInterconnectId: {networkToNetworkInterconnectId}"); NetworkToNetworkInterconnectResource nni = Client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectId); @@ -41,30 +40,40 @@ public async Task NetworkToNetworkInterconnects() NetworkToNetworkInterconnectCollection collection = networkFabric.GetNetworkToNetworkInterconnects(); + #region NNI create Test // Create TestContext.Out.WriteLine($"PUT started....."); - NetworkToNetworkInterconnectData data = new NetworkToNetworkInterconnectData() + + NetworkToNetworkInterconnectData data = new NetworkToNetworkInterconnectData(NetworkFabricBooleanValue.True) { - IsManagementType = BooleanEnumProperty.True, - UseOptionB = BooleanEnumProperty.False, - Layer2Configuration = new Layer2Configuration(1500) + NniType = NniType.CE, + IsManagementType = IsManagementType.True, + Layer2Configuration = new Layer2Configuration() + { + Mtu = 1500 + }, + OptionBLayer3Configuration = new NetworkToNetworkInterconnectOptionBLayer3Configuration() { - PortCount = 10, + PeerAsn = 61234, + VlanId = 1234, + PrimaryIPv4Prefix = "10.0.0.12/30", + PrimaryIPv6Prefix = "4FFE:FFFF:0:CD30::a8/127", + SecondaryIPv4Prefix = "40.0.0.14/30", + SecondaryIPv6Prefix = "6FFE:FFFF:0:CD30::ac/127", }, - Layer3Configuration = new Layer3Configuration() + ImportRoutePolicy = new ImportRoutePolicyInformation() { - ImportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName1", - ExportRoutePolicyId = "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/routePolicies/routePolicyName2", - PeerASN = 50272, - VlanId = 2064, - PrimaryIPv4Prefix = "172.31.0.0/31", - PrimaryIPv6Prefix = "3FFE:FFFF:0:CD30::a0/126", - SecondaryIPv4Prefix = "172.31.0.20/31", - SecondaryIPv6Prefix = "3FFE:FFFF:0:CD30::a4/126", + ImportIPv4RoutePolicyId = new ResourceIdentifier(TestEnvironment.ExistingRoutePolicyId), }, + ExportRoutePolicy = new ExportRoutePolicyInformation() + { + ExportIPv4RoutePolicyId = new ResourceIdentifier(TestEnvironment.ExistingRoutePolicyId), + } }; - ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, networkToNetworkInterconnectName, data); - Assert.AreEqual(createResult.Value.Data.Name, networkToNetworkInterconnectName); + ArmOperation createResult = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.NetworkToNetworkInterConnectName, data); + Assert.AreEqual(createResult.Value.Data.Name, TestEnvironment.NetworkToNetworkInterConnectName); + + #endregion NetworkToNetworkInterconnectResource networkToNetworkInterconnect = Client.GetNetworkToNetworkInterconnectResource(networkToNetworkInterconnectId); @@ -72,10 +81,10 @@ public async Task NetworkToNetworkInterconnects() TestContext.Out.WriteLine($"GET started....."); NetworkToNetworkInterconnectResource getResult = await networkToNetworkInterconnect.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, networkToNetworkInterconnectName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.NetworkToNetworkInterConnectName); // List - TestContext.Out.WriteLine($"GET - List by Resource Group started....."); + TestContext.Out.WriteLine($"GET - List by Fabric started....."); var listByResourceGroup = new List(); NetworkToNetworkInterconnectCollection collectionOp = networkFabric.GetNetworkToNetworkInterconnects(); await foreach (NetworkToNetworkInterconnectResource item in collectionOp.GetAllAsync()) @@ -86,7 +95,7 @@ public async Task NetworkToNetworkInterconnects() // Delete TestContext.Out.WriteLine($"DELETE started....."); - var deleteResponse = await networkToNetworkInterconnect.DeleteAsync(WaitUntil.Completed); + ArmOperation deleteResponse = await networkToNetworkInterconnect.DeleteAsync(WaitUntil.Completed); Assert.IsTrue(deleteResponse.HasCompleted); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/RoutePolicyTests.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/RoutePolicyTests.cs index 7d46b5984ab02..4a7736faf9977 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/RoutePolicyTests.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/tests/Scenario/RoutePolicyTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Threading.Tasks; using Azure.Core; @@ -22,113 +21,66 @@ public RoutePolicyTests(bool isAsync) : base(isAsync) { } [AsyncOnly] public async Task RoutePolicies() { - string subscriptionId = TestEnvironment.SubscriptionId; - string resourceGroupName = TestEnvironment.ResourceGroupName; - string routePolicyName = TestEnvironment.RoutePolicyName; - TestContext.Out.WriteLine($"Entered into the RoutePolicy tests...."); - TestContext.Out.WriteLine($"Provided routePolicyName name : {routePolicyName}"); + TestContext.Out.WriteLine($"Provided TestEnvironment.RoutePolicyName name : {TestEnvironment.RoutePolicyName}"); - ResourceIdentifier routePolicyResourceId = RoutePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, routePolicyName); + ResourceIdentifier routePolicyResourceId = NetworkFabricRoutePolicyResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, TestEnvironment.ResourceGroupName, TestEnvironment.RoutePolicyName); TestContext.Out.WriteLine($"routePolicyResourceId: {routePolicyResourceId}"); TestContext.Out.WriteLine($"RoutePolicy Test started....."); - RoutePolicyCollection collection = ResourceGroupResource.GetRoutePolicies(); + NetworkFabricRoutePolicyCollection collection = ResourceGroupResource.GetNetworkFabricRoutePolicies(); // Create TestContext.Out.WriteLine($"PUT started....."); - RoutePolicyData data = - new RoutePolicyData(new AzureLocation(TestEnvironment.Location), new RoutePolicyStatementProperties[] + + NetworkFabricRoutePolicyData data = new NetworkFabricRoutePolicyData(new AzureLocation(TestEnvironment.Location), new ResourceIdentifier("/subscriptions/1234ABCD-0A1B-1234-5678-123456ABCDEF/resourceGroups/example-rg/providers/Microsoft.ManagedNetworkFabric/networkFabrics/example-fabric")) + { + Annotation = "annotation", + Statements = { - new RoutePolicyStatementProperties(7,new StatementConditionProperties() - { - IPCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipCommunities/nfa-tool-ts-sdk-ipCommunity061623" - }, - IPExtendedCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/nfa-tool-ts-sdk-ipExtendedCommunity061623" - }, - IPPrefixId = "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/nfa-tool-ts-sdk-ipPrefix061623" - }, - new StatementActionProperties(CommunityActionType.Permit) - { - LocalPreference = 20, - IPCommunityProperties = new ActionIPCommunityProperties() + new RoutePolicyStatementProperties( + 7, + new StatementConditionProperties() { - AddIPCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipCommunities/nfa-tool-ts-sdk-ipCommunity061623" - }, - DeleteIPCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipCommunities/nfa-tool-ts-sdk-ipCommunity061623" - }, - SetIPCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipCommunities/nfa-tool-ts-sdk-ipCommunity061623" - } + RoutePolicyConditionType = RoutePolicyConditionType.Or, + IPPrefixId = new ResourceIdentifier("/subscriptions/9531faa8-8c39-4165-b033-48697fe943db/resourceGroups/nfa-tool-ts-clisdktest-GA-nfcrg071323/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/nfa-tool-ts-GA-sdk-ipPrefix071423"), }, - IPExtendedCommunityProperties = new ActionIPExtendedCommunityProperties() + new StatementActionProperties(RoutePolicyActionType.Deny) { - AddIPExtendedCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/nfa-tool-ts-sdk-ipExtendedCommunity061623" - }, - DeleteIPExtendedCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/nfa-tool-ts-sdk-ipExtendedCommunity061623" - }, - SetIPExtendedCommunityIds = - { - "/subscriptions/61065ccc-9543-4b91-b2d1-0ce42a914507/resourceGroups/nfa-tool-ts-clisdktest-nfrg060523/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/nfa-tool-ts-sdk-ipExtendedCommunity061623" - } - } - }) + LocalPreference = 20, + }) { - Annotation = "annotationValue", + Annotation = "annotation", } - }) + }, + AddressFamilyType = AddressFamilyType.IPv4, + Tags = { - Annotation = "annotationValue", - Tags = - { - ["key8254"] = "", - }, - }; - - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, routePolicyName, data); - RoutePolicyResource createResult = lro.Value; - Assert.AreEqual(createResult.Data.Name, routePolicyName); + ["keyID"] = "keyValue", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, TestEnvironment.RoutePolicyName, data); + NetworkFabricRoutePolicyResource createResult = lro.Value; + Assert.AreEqual(createResult.Data.Name, TestEnvironment.RoutePolicyName); - RoutePolicyResource routePolicy = Client.GetRoutePolicyResource(routePolicyResourceId); + NetworkFabricRoutePolicyResource routePolicy = Client.GetNetworkFabricRoutePolicyResource(routePolicyResourceId); // Get TestContext.Out.WriteLine($"GET started....."); - RoutePolicyResource getResult = await routePolicy.GetAsync(); + NetworkFabricRoutePolicyResource getResult = await routePolicy.GetAsync(); TestContext.Out.WriteLine($"{getResult}"); - Assert.AreEqual(getResult.Data.Name, routePolicyName); + Assert.AreEqual(getResult.Data.Name, TestEnvironment.RoutePolicyName); // List TestContext.Out.WriteLine($"GET - List by Resource Group started....."); - var listByResourceGroup = new List(); - await foreach (RoutePolicyResource item in collection.GetAllAsync()) + var listByResourceGroup = new List(); + await foreach (NetworkFabricRoutePolicyResource item in collection.GetAllAsync()) { listByResourceGroup.Add(item); } Assert.IsNotEmpty(listByResourceGroup); - TestContext.Out.WriteLine($"GET - List by Subscription started....."); - var listBySubscription = new List(); - await foreach (RoutePolicyResource item in DefaultSubscription.GetRoutePoliciesAsync()) - { - listBySubscription.Add(item); - Console.WriteLine($"Succeeded on id: {item}"); - } - Assert.IsNotEmpty(listBySubscription); - // Delete TestContext.Out.WriteLine($"DELETE started....."); var deleteResponse = await routePolicy.DeleteAsync(WaitUntil.Completed);